From: Lars Ingebrigtsen <larsi@gnus.org>
To: Tom Tromey <tom@tromey.com>
Cc: Glenn Morris <rgm@gnu.org>, 25983@debbugs.gnu.org
Subject: bug#25983: 25.2; set dired-directory in vc-dir mode
Date: Tue, 15 Sep 2020 17:51:22 +0200 [thread overview]
Message-ID: <871rj36nt1.fsf@gnus.org> (raw)
In-Reply-To: <87h9371d9f.fsf@tromey.com> (Tom Tromey's message of "Sun, 05 Mar 2017 17:04:44 -0700")
Tom Tromey <tom@tromey.com> writes:
>>>>>> "GM" == Glenn Morris <rgm@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
prev parent reply other threads:[~2020-09-15 15:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-05 17:55 bug#25983: 25.2; set dired-directory in vc-dir mode Tom Tromey
2017-03-05 23:54 ` Glenn Morris
2017-03-06 0:04 ` Tom Tromey
2020-09-15 15:51 ` Lars Ingebrigtsen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871rj36nt1.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=25983@debbugs.gnu.org \
--cc=rgm@gnu.org \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).