GNU bug report logs -
#25983
25.2; set dired-directory in vc-dir mode
Previous Next
Reported by: Tom Tromey <tom <at> tromey.com>
Date: Sun, 5 Mar 2017 17:56:01 UTC
Severity: wishlist
Tags: wontfix
Found in version 25.2
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Tom Tromey <tom <at> tromey.com> writes:
>>>>>> "GM" == Glenn Morris <rgm <at> gnu.org> writes:
>
> GM> Is dired-directory not basically an internal dired variable that should
> GM> only be set in Dired mode, and modes derived from it, which vc-dir is not?
>
> Various bits of code (and some other code I have seen, not part of
> Emacs) seem to examine it. And vc-dir seems dired-like.
Hm... Well, there's a bunch of buffers that are kinda-sorta dired-like
(like `M-x grep'), so adding this just to vc-dir seems a bit odd to me.
> The backstory for this bug is that I have this handy bit of code I got
> from someone on #emacs:
>
> ;; From fledermaus
> (defun kill-buffers-under (under)
[...]
> (and dired-directory
> (expand-file-name dired-directory)) )) ))
[...]
> ... and I'd rather not add a special hack just for vc-dir, and then for
> whatever other modes crop up.
>
> I guess I'm being a bit lazy trying to avoid introducing a new variable.
> But maybe I should?
All buffers have a default-directory, but you want to make a function
that kills are buffers that are "like" dired (in that they display a
buffer pointing to a directory, and there are things you can do there)?
I don't think you'll be able to find a definition of what's "like" dired
enough that this would make sense... especially when the use case
doesn't seem that ... comprehensible? That is, I think only the user
that writes a function like this knows what buffer types they want to
consider killing. Finding a general solution here doesn't seem very
likely, so I'm closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 4 years and 300 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.