From: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 29972@debbugs.gnu.org
Subject: bug#29972: 25.3; dired-hide-details-mode does not persist in desktop session
Date: Fri, 5 Jan 2018 17:42:49 +0000 [thread overview]
Message-ID: <CAKDRQS4V3Swz4m2DHwEMMATQvbjBW-dzPVwYTN4niRg3jypTTg@mail.gmail.com> (raw)
In-Reply-To: <83shbk9vzy.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1814 bytes --]
> 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?
>
[-- Attachment #2: Type: text/html, Size: 3041 bytes --]
next prev parent reply other threads:[~2018-01-05 17:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-04 1:11 bug#29972: 25.3; dired-hide-details-mode does not persist in desktop session Yuen Ho Wong
2018-01-04 16:42 ` Eli Zaretskii
2018-01-05 13:08 ` Jimmy Yuen Ho Wong
2018-01-05 14:25 ` Eli Zaretskii
2018-01-05 15:02 ` Jimmy Yuen Ho Wong
2018-01-05 15:16 ` Eli Zaretskii
2018-01-05 17:42 ` Jimmy Yuen Ho Wong [this message]
2018-01-05 18:20 ` Eli Zaretskii
2018-01-05 18:29 ` Noam Postavsky
2018-01-05 18:37 ` Drew Adams
2018-01-05 19:41 ` Eli Zaretskii
2018-01-05 19:54 ` Noam Postavsky
2018-01-05 19:56 ` Eli Zaretskii
2018-01-05 19:59 ` Noam Postavsky
2018-01-08 12:43 ` Jimmy Yuen Ho Wong
2018-01-08 18:54 ` Eli Zaretskii
[not found] ` <<83r2r06v1y.fsf@gnu.org>
2018-01-08 19:08 ` Drew Adams
2022-04-17 18:22 ` Lars Ingebrigtsen
[not found] <<m28tdezavi.fsf@mobilecat.lan>
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=CAKDRQS4V3Swz4m2DHwEMMATQvbjBW-dzPVwYTN4niRg3jypTTg@mail.gmail.com \
--to=wyuenho@gmail.com \
--cc=29972@debbugs.gnu.org \
--cc=eliz@gnu.org \
/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.