From: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>
To: "Daniel Martín" <mardani29@yahoo.es>
Cc: "T.V Raman" <raman@google.com>, emacs-devel@gnu.org
Subject: Re: Thought: Group Minor Modes Into Logical "Bundles"?
Date: Fri, 25 Nov 2022 09:51:09 +0100 [thread overview]
Message-ID: <87bkovl8n6.fsf@gmail.com> (raw)
In-Reply-To: <m1mt8g7kpb.fsf@yahoo.es> ("Daniel Martín"'s message of "Thu, 24 Nov 2022 10:42:08 +0100")
Daniel Martín <mardani29@yahoo.es> writes:
> "T.V Raman" <raman@google.com> writes:
>
>> The minor mode indicators in the modeline are getting to be too many
>> -- and though :lighter for shorter indicators help, I'm still finding
>> them overly heavy to consume --- it's painful to listen to :-) though
>> I suspect they also place a level of cognitive load on users who can
>> that we might be able to reduce.
>>
>> For instance, in programming language modes, I suspect it's
>> increasingly common to have autofill, abbrev, -- perhaps company etc
>> turned on; would be nice if a user could:
>>
>> 1. Define a "logical bundle of minor modes " that are specific to
>> various tasks, and then have a modeline indicater for that "bundle"
>> defined -- so the Modeline would indicate "prog" for the user to
>> know and remember that a preferred set of programming affordances
>> are turned on. Thoghts?
>
> There is the Diminish package in GNU ELPA:
> https://elpa.gnu.org/packages/diminish.html I don't know if it already
> supports the "bundling" feature that you propose, or something
> equivalent.
AFAIK Diminish (and delight, and rich-minority, and maybe others) simply
let the user redefine (or disable) the lighter for individual minor
modes.
Off the top of my head, if I wanted to implement Raman's proposal today
(as I undertand it) through user code, I guess I'd replace
mode-line-modes in mode-line-format with an :eval form that hrm… runs
through a list of {PRED ↦ LIGHTER} functions, where each PRED is fed (or
looks up) the list of enabled minor modes, and outputs a short LIGHTER
for a logical bundle? E.g.
(defvar my/prog-minor-modes
'(auto-fill-function
abbrev-mode))
(defun my/prog-lighters ()
(and (derived-mode-p 'prog-mode)
(seq-every-p 'identity my/prog-minor-modes)
" prog"))
… and then append my/prog-lighters to another list variable that the
:eval form will go through… hm, it's clearly half-baked (e.g. if any of
the modes are disabled, then the lighter won't be shown, so should
my/prog-lighters fall back to listing all enabled modes? 🤷), and/or
over-engineered.
I'm mostly posting this to see if my understanding of Raman's proposal
is correct.
next prev parent reply other threads:[~2022-11-25 8:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-24 3:15 Thought: Group Minor Modes Into Logical "Bundles"? T.V Raman
2022-11-24 3:21 ` Stefan Monnier
2022-11-24 4:54 ` T.V Raman
2022-11-24 9:42 ` Daniel Martín
2022-11-25 8:51 ` Kévin Le Gouguec [this message]
2022-11-25 15:09 ` T.V Raman
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=87bkovl8n6.fsf@gmail.com \
--to=kevin.legouguec@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=mardani29@yahoo.es \
--cc=raman@google.com \
/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.