GNU bug report logs - #44023
dired-allow-duplicate-buffers

Previous Next

Package: emacs;

Reported by: Boruch Baum <boruch_baum <at> gmx.com>

Date: Thu, 15 Oct 2020 19:23:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Boruch Baum <boruch_baum <at> gmx.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 44023 <at> debbugs.gnu.org
Subject: bug#44023: dired-allow-duplicate-buffers
Date: Fri, 6 Nov 2020 05:01:19 -0500
On 2020-11-05 10:38, Stefan Monnier wrote:
> > 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).

The case you mention sounds like the converse: multiple directories in a
single buffer, versus what I'm addressing which is multiple buffers for
a single directory.

> > +(defcustom dired-allow-duplicate-buffers t
> 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?

I prefer the defcustom route because I like giving a user choices (it's
also more emacs-y). Less subjectively, adding an argument creates a mess
because the modified function is a generic internal function so the
argument would either need to be added to all its potential parents, or
diredc would need to advice or replace those parents (which just
replaces a single messy advice with several messy advices).

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0




This bug report was last modified 4 years and 220 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.