GNU bug report logs - #29972
25.3; dired-hide-details-mode does not persist in desktop session

Previous Next

Package: emacs;

Reported by: Yuen Ho Wong <wyuenho <at> gmail.com>

Date: Thu, 4 Jan 2018 01:14:01 UTC

Severity: minor

Found in version 25.3

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Jimmy Yuen Ho Wong <wyuenho <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 29972 <at> debbugs.gnu.org
Subject: Re: bug#29972: 25.3; dired-hide-details-mode does not persist in
 desktop session
Date: Fri, 5 Jan 2018 17:42:49 +0000
[Message part 1 (text/plain, inline)]
> Because minor-mode-alist is for displaying an indication of a minor
mode in the mode line?

Right, but there doesn't appear to be any other more reliable way to know
what minor mode is active in a buffer. An alternative I can think of is see
if there's buffer local variable that also exists in `minor-mode-list`, but
that's still not reliable, hence we have these `desktop-minor-mode-*` vars.

The fundamental reason appears to be desktop.el needs an efficient and
reliable way to know what buffer local variables are minor modes, since
`minor-mode-list` is just a global list of loaded minor-modes,
`minor-mode-alist` is as close as you get.

If my patch make it in, it will not be the first minor mode in emacs that
defines an empty string lighter. `xref`, `linum`, `erc-track` and `rcirc`
all do this. There are even more examples in the wild. I have at least 8
other packages in my ~/.emacs.d/elpa that do the same thing.

I agree, however, that this is an abuse. There should be perhaps some
buffer local variable called `buffer-minor-modes`, but I think this should
be a separate issue and a new feature, so perhaps wait til after 26.1?


On Fri, Jan 5, 2018 at 3:16 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Jimmy Yuen Ho Wong <wyuenho <at> gmail.com>
> > Date: Fri, 05 Jan 2018 15:02:21 +0000
> > Cc: 29972 <at> debbugs.gnu.org
> >
> > Actually I would question why we have minor modes not added to
> minor-mode-alist at all just because both
> > lighter and keymap are missing.
>
> Because minor-mode-alist is for displaying an indication of a minor
> mode in the mode line?
>
> > What do you think about changing define-minor-mode?
>
> IMO, a better idea is to find out why desktop.el requires a minor mode
> to be in minor-mode-alist before it saves it.  Is there really a
> justification for that?
>
[Message part 2 (text/html, inline)]

This bug report was last modified 3 years and 113 days ago.

Previous Next


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