bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#29972: 25.3; dired-hide-details-mode does not persist in desktop ses


From: Jimmy Yuen Ho Wong
Subject: bug#29972: 25.3; dired-hide-details-mode does not persist in desktop session
Date: Fri, 5 Jan 2018 17:42:49 +0000

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@gnu.org> wrote:
> From: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
> Date: Fri, 05 Jan 2018 15:02:21 +0000
> Cc: 29972@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?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]