GNU bug report logs - #63744
28.2; fix dired-guess-default

Previous Next

Package: emacs;

Reported by: Leo Liu <sdl.web <at> gmail.com>

Date: Sat, 27 May 2023 04:11:01 UTC

Severity: normal

Tags: patch

Found in version 28.2

Full log


Message #41 received at 63744 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 63744 <at> debbugs.gnu.org, sdl.web <at> gmail.com
Subject: Re: bug#63744: 28.2; fix dired-guess-default
Date: Tue, 30 May 2023 05:36:11 +0300
> From: Michael Heerdegen <michael_heerdegen <at> web.de>
> Cc: Leo Liu <sdl.web <at> gmail.com>,  63744 <at> debbugs.gnu.org
> Date: Tue, 30 May 2023 02:24:25 +0200
> 
> then you meant to recompute the variable's value every time the user wants
> to open a file with dired?

No, every time the situation changes in a way that requires its
recomputation.  I don't have a clear idea when that happens, but if
the REGEXP part is ".", it is clear to me it happens quite often
already, since the list of commands for a given file depends on the
file, and "." does not.

> It's a defcustom so Emacs should not change the value at all.

We are talking about user customizations.  A user can make his/her
customizations change the value as often as needed.

> And recomputing the whole value every time is much slower than computing
> a list of defaults for one class of files matched by the regexp.

That is not Leo's use case, AFAICT: the list of commands is
dynamically recomputed when needed anyway.

> The conditions that need to be checked are very different for
> different file types in a typical scenario, and the suggested design
> is more efficient: first look at the file type by matching the RE
> part, then decide, at the moment of user request, what applications
> are appropriate for this type of file (and only for this type) in
> this moment.

Like I said: I'm not against extending the value to support this, I
just don't see how this could be considered an urgent bugfix that must
be done in Emacs 29, that's all.




This bug report was last modified 1 year and 155 days ago.

Previous Next


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