Oh, I see. the way I was trying to do things didn't make any sense.
But even with the hide post plugin I still can't get things working quite the way I want. What I'd really like to do is display a link directly to the 'add post' part of the backend when the user is viewing a category to which he can add posts. I tried:
if (current_user_can('publish_posts')) { // display the link}
but this displays the link for all categories if the user can add posts to any category. So I tried:
if (current_user_can('publish_posts', $_GET["cat"])) { //display the link}
This, of course, doesn't work either, and seems to have the opposite effect: the user only sees the link for any category if he can add posts to all categories.
It's very puzzling, because I'm calling edit_post_link in the loop, which seems to be working correctly (it only displays if the user can edit posts in the category). I checked the code and as far as I can tell edit_post_link just calls current_user_can('manage_categories') to determine whether to display the link.
Anyway, all the help is appreciated muchly.