all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Boruch Baum <boruch_baum@gmx.com>
Cc: 44023@debbugs.gnu.org
Subject: bug#44023: dired-allow-duplicate-buffers
Date: Thu, 05 Nov 2020 10:38:40 -0500	[thread overview]
Message-ID: <jwv7dqzlt00.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20201015192231.rezuhk7foiyq3uff@E15-2016.optimum.net> (Boruch Baum's message of "Thu, 15 Oct 2020 15:22:31 -0400")

> In going through the existing dired code, it seems that some functions
> presume that multiple buffers can be visiting the same directory. See:

Because of the functionality of Dired (which allows visiting several
directories (and subdirectories)) in a single buffer, the code basically
"has to" handle that case, indeed (tho I'd be surprised if there aren't
improvements to be made in that regard).

> +(defcustom dired-allow-duplicate-buffers t
[...]
> -         ;; Look for an existing buffer.
> -         (buffer (dired-find-buffer-nocreate dirname mode))
> -	 ;; Note that buffer already is in dired-mode, if found.
> +         (buffer (when (not (bound-and-true-p dired-allow-duplicate-buffers))
> +                   ;; Look for an existing buffer.
> +                   (dired-find-buffer-nocreate dirname mode)
> +                   ;; Note that buffer already is in dired-mode, if found.
> +                   ))

[ The ";; Note ..." comment seems to be misplaced.  ]

I wonder if it's better to add a user-config variable or a new argument
to `dired-internal-noselect`?

E.g. I suspect that diredc wants/needs this feature, but it's not
diredc's job to set user options, so for diredc it would probably make
more sense to pass that as an argument.
WDYT?


        Stefan






  parent reply	other threads:[~2020-11-05 15:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-15 19:22 bug#44023: dired-allow-duplicate-buffers Boruch Baum
2020-10-16  5:32 ` Lars Ingebrigtsen
2020-10-16  6:46   ` Boruch Baum
2020-10-16 16:25     ` Lars Ingebrigtsen
2020-10-18  5:45       ` Boruch Baum
2020-10-19  8:11         ` Lars Ingebrigtsen
2020-10-19  8:38           ` Boruch Baum
2020-11-05 15:38 ` Stefan Monnier [this message]
2020-11-05 16:06   ` Stefan Monnier
2020-11-06 10:01   ` Boruch Baum
2020-11-06 14:29     ` Stefan Monnier
2020-11-08  9:51       ` Boruch Baum
2020-11-08 13:50         ` Stefan Monnier

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv7dqzlt00.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=44023@debbugs.gnu.org \
    --cc=boruch_baum@gmx.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.