GNU bug report logs -
#53776
Modeline indicator when using define-minor-mode
Previous Next
Reported by: goncholden <goncholden <at> protonmail.com>
Date: Fri, 4 Feb 2022 11:56:01 UTC
Severity: wishlist
Tags: notabug
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 53776 in the body.
You can then email your comments to 53776 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#53776
; Package
emacs
.
(Fri, 04 Feb 2022 11:56:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
goncholden <goncholden <at> protonmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 04 Feb 2022 11:56:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Have been using define-minor-mode and noticed that when setting the modeline indicator,
the text is appended with no space between other modeline indicators. Is this how :lighter
is supposed to work?
(define-minor-mode rich-minor-mode
"This is the docstring."
:lighter "rich"
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#53776
; Package
emacs
.
(Fri, 04 Feb 2022 13:03:01 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
On Fri, 04 Feb 2022 11:55:45 +0000 goncholden via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> wrote:
> Have been using define-minor-mode and noticed that when setting the
> modeline indicator, the text is appended with no space between other
> modeline indicators. Is this how :lighter is supposed to work?
Yes, the lack of a space is in the definition of `mode-line-modes':
`(:propertize ("" minor-mode-alist)
I guess the reason is that you can have multiple minor mode lighters and
providing a space between each would complicate the definition of
`mode-line-modes', so that's the job of the minor mode definition
itself:
> (define-minor-mode rich-minor-mode
> "This is the docstring."
> :lighter "rich"
So you should do this: :lighter " rich"
Steve Berman
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#53776
; Package
emacs
.
(Fri, 04 Feb 2022 13:03:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#53776
; Package
emacs
.
(Fri, 04 Feb 2022 13:23:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 53776 <at> debbugs.gnu.org (full text, mbox):
------- Original Message -------
On Friday, February 4th, 2022 at 1:02 PM, Stephen Berman <stephen.berman <at> gmx.net> wrote:
> On Fri, 04 Feb 2022 11:55:45 +0000 goncholden via "Bug reports for GNU Emacs, the Swiss army knife of text editors" bug-gnu-emacs <at> gnu.org wrote:
>
> > Have been using define-minor-mode and noticed that when setting the
> > modeline indicator, the text is appended with no space between other
> > modeline indicators. Is this how :lighter is supposed to work?
>
> Yes, the lack of a space is in the definition of `mode-line-modes':` (:propertize ("" minor-mode-alist)
>
> I guess the reason is that you can have multiple minor mode lighters and
> providing a space between each would complicate the definition of
> `mode-line-modes', so that's the job of the minor mode definition
> itself:
>
> > (define-minor-mode rich-minor-mode
> >
> > "This is the docstring."
> > :lighter "rich"
>
> So you should do this: :lighter " rich"
>
> Steve Berman
Because one can easily add minor-modes that exceed the mode-line mini-buffer, is there
the capability of making a hierarchical modeline indicator.
e.g.
Emacs-Lisp
company
Outl
Gon -> rich
-> gudin
-> cholden
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#53776
; Package
emacs
.
(Fri, 04 Feb 2022 13:36:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 53776 <at> debbugs.gnu.org (full text, mbox):
On Fri, 04 Feb 2022 13:22:08 +0000 goncholden <goncholden <at> protonmail.com> wrote:
> ------- Original Message -------
>
> On Friday, February 4th, 2022 at 1:02 PM, Stephen Berman
> <stephen.berman <at> gmx.net> wrote:
>
>> On Fri, 04 Feb 2022 11:55:45 +0000 goncholden via "Bug reports for GNU
>> Emacs, the Swiss army knife of text editors" bug-gnu-emacs <at> gnu.org wrote:
>>
>> > Have been using define-minor-mode and noticed that when setting the
>> > modeline indicator, the text is appended with no space between other
>> > modeline indicators. Is this how :lighter is supposed to work?
>>
>> Yes, the lack of a space is in the definition of `mode-line-modes':`
>> (:propertize ("" minor-mode-alist)
>>
>> I guess the reason is that you can have multiple minor mode lighters and
>> providing a space between each would complicate the definition of
>> `mode-line-modes', so that's the job of the minor mode definition
>> itself:
>>
>> > (define-minor-mode rich-minor-mode
>> >
>> > "This is the docstring."
>> > :lighter "rich"
>>
>> So you should do this: :lighter " rich"
>>
>> Steve Berman
>
> Because one can easily add minor-modes that exceed the mode-line mini-buffer,
> is there
> the capability of making a hierarchical modeline indicator.
>
> e.g.
>
> Emacs-Lisp
> company
> Outl
> Gon -> rich
> -> gudin
> -> cholden
That would appear to require a multiline mode line, which is not
possible with the current implementation. An alternative, which might
be easier to implement (for someone who knows how, not me), would be to
make the mode line horizontally scrollable. But maybe that's not so
easy, since it seems so obviously useful, yet hasn't been implemented.
Steve Berman
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#53776
; Package
emacs
.
(Fri, 04 Feb 2022 14:07:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 53776 <at> debbugs.gnu.org (full text, mbox):
------- Original Message -------
On Friday, February 4th, 2022 at 1:35 PM, Stephen Berman <stephen.berman <at> gmx.net> wrote:
> On Fri, 04 Feb 2022 13:22:08 +0000 goncholden goncholden <at> protonmail.com wrote:
>
> > ------- Original Message -------
> >
> > On Friday, February 4th, 2022 at 1:02 PM, Stephen Berman
> >
> > stephen.berman <at> gmx.net wrote:
> >
> > > On Fri, 04 Feb 2022 11:55:45 +0000 goncholden via "Bug reports for GNU
> > >
> > > Emacs, the Swiss army knife of text editors" bug-gnu-emacs <at> gnu.org wrote:
> > >
> > > > Have been using define-minor-mode and noticed that when setting the
> > > > modeline indicator, the text is appended with no space between other
> > > > modeline indicators. Is this how :lighter is supposed to work?
> > >
> > > Yes, the lack of a space is in the definition of `mode-line-modes':`
> > >
> > > (:propertize ("" minor-mode-alist)
> > >
> > > I guess the reason is that you can have multiple minor mode lighters and
> > > providing a space between each would complicate the definition of
> > > `mode-line-modes', so that's the job of the minor mode definition
> > > itself:
> > >
> > > > (define-minor-mode rich-minor-mode
> > > > "This is the docstring."
> > > > :lighter "rich"
> > >
> > > So you should do this: :lighter " rich"
> > >
> > > Steve Berman
> >
> > Because one can easily add minor-modes that exceed the mode-line mini-buffer,
> > is there
> > the capability of making a hierarchical modeline indicator.
> >
> > e.g.
> >
> > Emacs-Lisp
> > company
> > Outl
> > Gon -> rich
> > -> gudin
> > -> cholden
>
> That would appear to require a multiline mode line, which is not
> possible with the current implementation. An alternative, which might
> be easier to implement (for someone who knows how, not me), would be to
> make the mode line horizontally scrollable. But maybe that's not so
> easy, since it seems so obviously useful, yet hasn't been implemented.
> Steve Berman
Much useful. Would we be able to include such proposition for emacs?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#53776
; Package
emacs
.
(Fri, 04 Feb 2022 14:39:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 53776 <at> debbugs.gnu.org (full text, mbox):
On Fri, 04 Feb 2022 14:05:58 +0000 goncholden <goncholden <at> protonmail.com> wrote:
> ------- Original Message -------
>
> On Friday, February 4th, 2022 at 1:35 PM, Stephen Berman
> <stephen.berman <at> gmx.net> wrote:
>
>> On Fri, 04 Feb 2022 13:22:08 +0000 goncholden goncholden <at> protonmail.com wrote:
>>
>> > ------- Original Message -------
>> >
>> > On Friday, February 4th, 2022 at 1:02 PM, Stephen Berman
>> >
>> > stephen.berman <at> gmx.net wrote:
>> >
>> > > On Fri, 04 Feb 2022 11:55:45 +0000 goncholden via "Bug reports for GNU
>> > >
>> > > Emacs, the Swiss army knife of text editors" bug-gnu-emacs <at> gnu.org wrote:
>> > >
>> > > > Have been using define-minor-mode and noticed that when setting the
>> > > > modeline indicator, the text is appended with no space between other
>> > > > modeline indicators. Is this how :lighter is supposed to work?
>> > >
>> > > Yes, the lack of a space is in the definition of `mode-line-modes':`
>> > >
>> > > (:propertize ("" minor-mode-alist)
>> > >
>> > > I guess the reason is that you can have multiple minor mode lighters and
>> > > providing a space between each would complicate the definition of
>> > > `mode-line-modes', so that's the job of the minor mode definition
>> > > itself:
>> > >
>> > > > (define-minor-mode rich-minor-mode
>> > > > "This is the docstring."
>> > > > :lighter "rich"
>> > >
>> > > So you should do this: :lighter " rich"
>> > >
>> > > Steve Berman
>> >
>> > Because one can easily add minor-modes that exceed the mode-line mini-buffer,
>> > is there
>> > the capability of making a hierarchical modeline indicator.
>> >
>> > e.g.
>> >
>> > Emacs-Lisp
>> > company
>> > Outl
>> > Gon -> rich
>> > -> gudin
>> > -> cholden
>>
>> That would appear to require a multiline mode line, which is not
>> possible with the current implementation. An alternative, which might
>> be easier to implement (for someone who knows how, not me), would be to
>> make the mode line horizontally scrollable. But maybe that's not so
>> easy, since it seems so obviously useful, yet hasn't been implemented.
>
>> Steve Berman
>
> Much useful. Would we be able to include such proposition for emacs?
It could certainly be a feature request. In fact, maybe this bug report
can be repurposed as such as request, since the lack of a space in the
minor mode lighter isn't a bug per se.
Steve Berman
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#53776
; Package
emacs
.
(Fri, 04 Feb 2022 14:44:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 53776 <at> debbugs.gnu.org (full text, mbox):
------- Original Message -------
On Friday, February 4th, 2022 at 2:38 PM, Stephen Berman <stephen.berman <at> gmx.net> wrote:
> On Fri, 04 Feb 2022 14:05:58 +0000 goncholden goncholden <at> protonmail.com wrote:
> > ------- Original Message -------
> >
> > On Friday, February 4th, 2022 at 1:35 PM, Stephen Berman
> > stephen.berman <at> gmx.net wrote:
> >
> > > On Fri, 04 Feb 2022 13:22:08 +0000 goncholden goncholden <at> protonmail.com wrote:
> > > > ------- Original Message -------
> > > >
> > > > On Friday, February 4th, 2022 at 1:02 PM, Stephen Berman
> > > > stephen.berman <at> gmx.net wrote:
> > > > > On Fri, 04 Feb 2022 11:55:45 +0000 goncholden via "Bug reports for GNU
> > > > > Emacs, the Swiss army knife of text editors" bug-gnu-emacs <at> gnu.org wrote:
> > > > >
> > > > > > Have been using define-minor-mode and noticed that when setting the
> > > > > > modeline indicator, the text is appended with no space between other
> > > > > > modeline indicators. Is this how :lighter is supposed to work?
> > > > >
> > > > > Yes, the lack of a space is in the definition of `mode-line-modes':`
> > > > > (:propertize ("" minor-mode-alist)
> > > > > I guess the reason is that you can have multiple minor mode lighters and
> > > > > providing a space between each would complicate the definition of
> > > > > `mode-line-modes', so that's the job of the minor mode definition
> > > > > itself:
> > > > >
> > > > > > (define-minor-mode rich-minor-mode
> > > > > > "This is the docstring."
> > > > > > :lighter "rich"
> > > > > So you should do this: :lighter " rich"
> > > > >
> > > > > Steve Berman
> > > >
> > > > Because one can easily add minor-modes that exceed the mode-line mini-buffer,
> > > > is there any capability of making a hierarchical modeline indicator.
> > > >
> > > > e.g.
> > > >
> > > > Emacs-Lisp
> > > > company
> > > > Outl
> > > > Gon -> rich
> > > > -> gudin
> > > > -> cholden
> > >
> > > That would appear to require a multiline mode line, which is not
> > > possible with the current implementation. An alternative, which might
> > > be easier to implement (for someone who knows how, not me), would be to
> > > make the mode line horizontally scrollable. But maybe that's not so
> > > easy, since it seems so obviously useful, yet hasn't been implemented.
> >
> > > Steve Berman
> >
> > Much useful. Would we be able to include such proposition for emacs?
>
> It could certainly be a feature request. In fact, maybe this bug report
> can be repurposed as such as request, since the lack of a space in the
> minor mode lighter isn't a bug per se.
>
> Steve Berman
Anything I need to do on my part?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#53776
; Package
emacs
.
(Fri, 04 Feb 2022 14:50:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 53776 <at> debbugs.gnu.org (full text, mbox):
On Fri, 04 Feb 2022 14:43:14 +0000 goncholden <goncholden <at> protonmail.com> wrote:
> ------- Original Message -------
>
> On Friday, February 4th, 2022 at 2:38 PM, Stephen Berman
> <stephen.berman <at> gmx.net> wrote:
>
>> On Fri, 04 Feb 2022 14:05:58 +0000 goncholden goncholden <at> protonmail.com wrote:
>> > ------- Original Message -------
>> >
>> > On Friday, February 4th, 2022 at 1:35 PM, Stephen Berman
>> > stephen.berman <at> gmx.net wrote:
>> >
>> > > On Fri, 04 Feb 2022 13:22:08 +0000 goncholden goncholden <at> protonmail.com wrote:
>> > > > ------- Original Message -------
>> > > >
>> > > > On Friday, February 4th, 2022 at 1:02 PM, Stephen Berman
>> > > > stephen.berman <at> gmx.net wrote:
>> > > > > On Fri, 04 Feb 2022 11:55:45 +0000 goncholden via "Bug reports for GNU
>> > > > > Emacs, the Swiss army knife of text editors" bug-gnu-emacs <at> gnu.org wrote:
>> > > > >
>> > > > > > Have been using define-minor-mode and noticed that when setting the
>> > > > > > modeline indicator, the text is appended with no space between other
>> > > > > > modeline indicators. Is this how :lighter is supposed to work?
>> > > > >
>> > > > > Yes, the lack of a space is in the definition of `mode-line-modes':`
>> > > > > (:propertize ("" minor-mode-alist)
>> > > > > I guess the reason is that you can have multiple minor mode lighters and
>> > > > > providing a space between each would complicate the definition of
>> > > > > `mode-line-modes', so that's the job of the minor mode definition
>> > > > > itself:
>> > > > >
>> > > > > > (define-minor-mode rich-minor-mode
>> > > > > > "This is the docstring."
>> > > > > > :lighter "rich"
>
>> > > > > So you should do this: :lighter " rich"
>> > > > >
>> > > > > Steve Berman
>> > > >
>> > > > Because one can easily add minor-modes that exceed the mode-line mini-buffer,
>> > > > is there any capability of making a hierarchical modeline indicator.
>> > > >
>> > > > e.g.
>> > > >
>> > > > Emacs-Lisp
>> > > > company
>> > > > Outl
>> > > > Gon -> rich
>> > > > -> gudin
>> > > > -> cholden
>> > >
>> > > That would appear to require a multiline mode line, which is not
>> > > possible with the current implementation. An alternative, which might
>> > > be easier to implement (for someone who knows how, not me), would be to
>> > > make the mode line horizontally scrollable. But maybe that's not so
>> > > easy, since it seems so obviously useful, yet hasn't been implemented.
>> >
>> > > Steve Berman
>> >
>> > Much useful. Would we be able to include such proposition for emacs?
>>
>> It could certainly be a feature request. In fact, maybe this bug report
>> can be repurposed as such as request, since the lack of a space in the
>> minor mode lighter isn't a bug per se.
>>
>> Steve Berman
>
> Anything I need to do on my part?
Maybe this issue should be retitled, but let's wait and see if the
maintainers react, maybe they'll prefer making a separate feature
request.
Steve Berman
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#53776
; Package
emacs
.
(Sat, 05 Feb 2022 00:14:01 GMT)
Full text and
rfc822 format available.
Message #32 received at 53776 <at> debbugs.gnu.org (full text, mbox):
On 2022-02-05 02:22, goncholden wrote:
> Because one can easily add minor-modes that exceed the mode-line
> mini-buffer, is there
> the capability of making a hierarchical modeline indicator.
>
> e.g.
>
> Emacs-Lisp
> company
> Outl
> Gon -> rich
> -> gudin
> -> cholden
I've not seen anything which looks like your example, however there
are several libraries available which are designed to reclaim space
in the mode-line by manipulating the appearance of the minor mode
lighter text and/or major mode names.
https://github.com/tarsius/minions turns the minor mode list into
a menu, if you do want a (usually hidden) vertical listing.
If you just want to rename (or hide) certain names, take a look at
https://www.emacswiki.org/emacs/DelightedModes (or alternatively
blackout.el, dim.el, or diminish.el, which are all similar).
https://github.com/Malabarba/rich-minority is an approach which
lets you target rendered lighters with regexps, and modify them
using text properties.
I haven't seen anything "hierarchical" (but then minor modes have
no inherent hierarchy), however you could fake it to some extent by
using conditional elements in your mode-line constructs to combine
multiple lighters into a single multi-mode lighter. For example:
https://stackoverflow.com/questions/23944477/emacs-how-to-consolidate-lighters-for-minor-modes
-Phil
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#53776
; Package
emacs
.
(Sat, 05 Feb 2022 06:47:01 GMT)
Full text and
rfc822 format available.
Message #35 received at 53776 <at> debbugs.gnu.org (full text, mbox):
Stephen Berman <stephen.berman <at> gmx.net> writes:
> Maybe this issue should be retitled, but let's wait and see if the
> maintainers react, maybe they'll prefer making a separate feature
> request.
As has been pointed out, there's many packages that do various minor
mode lighter handling, so I don't think there's much to be done on the
Emacs side? So I'm therefore closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) notabug.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sat, 05 Feb 2022 06:47:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
53776 <at> debbugs.gnu.org and goncholden <goncholden <at> protonmail.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sat, 05 Feb 2022 06:47:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#53776
; Package
emacs
.
(Sun, 06 Feb 2022 03:41:01 GMT)
Full text and
rfc822 format available.
Message #42 received at 53776 <at> debbugs.gnu.org (full text, mbox):
Stephen Berman <stephen.berman <at> gmx.net> writes:
> > Because one can easily add minor-modes that exceed the mode-line
> > mini-buffer,
> > is there
> > the capability of making a hierarchical modeline indicator.
> >
> > e.g.
> >
> > Emacs-Lisp
> > company
> > Outl
> > Gon -> rich
> > -> gudin
> > -> cholden
>
> That would appear to require a multiline mode line, which is not
> possible with the current implementation.
Maybe goncholden wants to visualize alternative "submodes". That's
possible: the :lighter can be any modeline construct so you can do
anything here the modeline supports, e.g. using :eval. See the
definition of `emacs-lock-mode' for an example.
> An alternative, which might be easier to implement (for someone who
> knows how, not me), would be to make the mode line horizontally
> scrollable. But maybe that's not so easy, since it seems so obviously
> useful, yet hasn't been implemented.
It's not hard to achieve, no. But it replaces something that is too
crowded to be useful with something scrollable that is too crowded to be
useful. I tried it once and was very disappointed - a modeline you need
to scroll to see everything is worse than using a help command like C-h
m.
There are better alternatives: The more you use Emacs, the more the
minor modes you use don't change any more. Better choose one of the
available ways to make the mode indicator less longish in appearance.
Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#53776
; Package
emacs
.
(Sun, 06 Feb 2022 12:53:01 GMT)
Full text and
rfc822 format available.
Message #45 received at 53776 <at> debbugs.gnu.org (full text, mbox):
On Sun, 06 Feb 2022 04:39:54 +0100 Michael Heerdegen <michael_heerdegen <at> web.de> wrote:
> Stephen Berman <stephen.berman <at> gmx.net> writes:
[...]
> Maybe goncholden wants to visualize alternative "submodes". That's
> possible: the :lighter can be any modeline construct so you can do
> anything here the modeline supports, e.g. using :eval. See the
> definition of `emacs-lock-mode' for an example.
>
>> An alternative, which might be easier to implement (for someone who
>> knows how, not me), would be to make the mode line horizontally
>> scrollable. But maybe that's not so easy, since it seems so obviously
>> useful, yet hasn't been implemented.
>
> It's not hard to achieve, no. But it replaces something that is too
> crowded to be useful with something scrollable that is too crowded to be
> useful. I tried it once and was very disappointed - a modeline you need
> to scroll to see everything is worse than using a help command like C-h
> m.
Nevertheless, I would be interested in trying it and seeing the code.
Can you post it?
Thanks,
Steve Berman
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#53776
; Package
emacs
.
(Sun, 06 Feb 2022 17:13:02 GMT)
Full text and
rfc822 format available.
Message #48 received at 53776 <at> debbugs.gnu.org (full text, mbox):
------- Original Message -------
On Sunday, February 6th, 2022 at 3:39 AM, Michael Heerdegen <michael_heerdegen <at> web.de> wrote:
> Stephen Berman stephen.berman <at> gmx.net writes:
>
> > > Because one can easily add minor-modes that exceed the mode-line
> > > mini-buffer,
> > > is there
> > > the capability of making a hierarchical modeline indicator.
> > > e.g.
> > > Emacs-Lisp
> > > company
> > > Outl
> > > Gon -> rich
> > > -> gudin
> > > -> cholden
> >
> > That would appear to require a multiline mode line, which is not
> > possible with the current implementation.
>
> Maybe goncholden wants to visualize alternative "submodes". That's
> possible: the :lighter can be any modeline construct so you can do
> anything here the modeline supports, e.g. using :eval. See the
> definition of `emacs-lock-mode' for an example.
It is quite easy to have many minor-modes, and would be good to see them categorised,
perhaps in some kind of menu. Been directed to minions, but would be great if emacs
has such functionality built-in. I am ending with too many minor-modes being activated.
> > An alternative, which might be easier to implement (for someone who
> > knows how, not me), would be to make the mode line horizontally
> > scrollable. But maybe that's not so easy, since it seems so obviously
> > useful, yet hasn't been implemented.
>
> It's not hard to achieve, no. But it replaces something that is too
> crowded to be useful with something scrollable that is too crowded to be
> useful. I tried it once and was very disappointed - a modeline you need
> to scroll to see everything is worse than using a help command like C-h
> m.
>
> There are better alternatives: The more you use Emacs, the more the
> minor modes you use don't change any more. Better choose one of the
> available ways to make the mode indicator less longish in appearance.
>
> Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#53776
; Package
emacs
.
(Sun, 06 Feb 2022 21:53:02 GMT)
Full text and
rfc822 format available.
Message #51 received at 53776 <at> debbugs.gnu.org (full text, mbox):
Stephen Berman <stephen.berman <at> gmx.net> writes:
> Nevertheless, I would be interested in trying it and seeing the code.
> Can you post it?
I don't have it any more. The basic idea was like
#+begin_src emacs-lisp
(defvar ml-scroll-amnt 0)
(setq-default
mode-line-format
`(:eval (substring (format-mode-line ',mode-line-format)
ml-scroll-amnt)))
#+end_src
and let mouse-4 and mouse-5 over the mode-line de- and increase
`ml-scroll-amnt'. That's all.
Be careful when the variable binding of `mode-line-format' changes - the
above hack won't survive that, so when a certain mode redefines
`mode-line-format' (with other words: doesn't use the default value,
like Gnus), you need to do the above after the variable has been set.
Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#53776
; Package
emacs
.
(Sun, 06 Feb 2022 23:14:01 GMT)
Full text and
rfc822 format available.
Message #54 received at 53776 <at> debbugs.gnu.org (full text, mbox):
On Sun, 06 Feb 2022 22:52:13 +0100 Michael Heerdegen <michael_heerdegen <at> web.de> wrote:
> Stephen Berman <stephen.berman <at> gmx.net> writes:
>
>> Nevertheless, I would be interested in trying it and seeing the code.
>> Can you post it?
>
> I don't have it any more. The basic idea was like
>
> #+begin_src emacs-lisp
> (defvar ml-scroll-amnt 0)
>
> (setq-default
> mode-line-format
> `(:eval (substring (format-mode-line ',mode-line-format)
> ml-scroll-amnt)))
> #+end_src
>
> and let mouse-4 and mouse-5 over the mode-line de- and increase
> `ml-scroll-amnt'. That's all.
Thanks, but doesn't this just truncate the mode-line-string
continuously? For scrolling back, it seems necessary to store the
original mode-line-string and concatenate the previously truncated part
of it with the current value.
> Be careful when the variable binding of `mode-line-format' changes - the
> above hack won't survive that, so when a certain mode redefines
> `mode-line-format' (with other words: doesn't use the default value,
> like Gnus), you need to do the above after the variable has been set.
What I had in mind was something like using auto-hscroll-mode on the
mode line, or making it into something like a horizontal scroll bar.
Either of these, if possible at all, requires changes in the C code.
Steve Berman
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#53776
; Package
emacs
.
(Mon, 07 Feb 2022 00:00:02 GMT)
Full text and
rfc822 format available.
Message #57 received at 53776 <at> debbugs.gnu.org (full text, mbox):
Stephen Berman <stephen.berman <at> gmx.net> writes:
> > #+begin_src emacs-lisp
> > (defvar ml-scroll-amnt 0)
> >
> > (setq-default
> > mode-line-format
> > `(:eval (substring (format-mode-line ',mode-line-format)
> > ml-scroll-amnt)))
> > #+end_src
> >
> > and let mouse-4 and mouse-5 over the mode-line de- and increase
> > `ml-scroll-amnt'. That's all.
>
> Thanks, but doesn't this just truncate the mode-line-string
> continuously? For scrolling back, it seems necessary to store the
> original mode-line-string and concatenate the previously truncated part
> of it with the current value.
No, you just have to change the value of `ml-scroll-amnt'. Try it.
That piece of code doesn't work as you describe.
Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#53776
; Package
emacs
.
(Mon, 07 Feb 2022 00:29:01 GMT)
Full text and
rfc822 format available.
Message #60 received at 53776 <at> debbugs.gnu.org (full text, mbox):
On Mon, 07 Feb 2022 00:59:31 +0100 Michael Heerdegen <michael_heerdegen <at> web.de> wrote:
> Stephen Berman <stephen.berman <at> gmx.net> writes:
>
>> > #+begin_src emacs-lisp
>> > (defvar ml-scroll-amnt 0)
>> >
>> > (setq-default
>> > mode-line-format
>> > `(:eval (substring (format-mode-line ',mode-line-format)
>> > ml-scroll-amnt)))
>> > #+end_src
>> >
>> > and let mouse-4 and mouse-5 over the mode-line de- and increase
>> > `ml-scroll-amnt'. That's all.
>>
>> Thanks, but doesn't this just truncate the mode-line-string
>> continuously? For scrolling back, it seems necessary to store the
>> original mode-line-string and concatenate the previously truncated part
>> of it with the current value.
>
> No, you just have to change the value of `ml-scroll-amnt'. Try it.
> That piece of code doesn't work as you describe.
Since I don't have mouse-4 and mouse-5, I just tried evaluating that
sexp with integral values (1, 0, -1) for ml-scroll-amnt, and only got
truncation. Maybe I don't understand what you mean by "let mouse-4 and
mouse-5 over the mode-line de- and increase `ml-scroll-amnt'". Can you
show me bindings I can try with a 3-button mouse, or just with the
keyboard?
Steve Berman
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#53776
; Package
emacs
.
(Mon, 07 Feb 2022 00:52:02 GMT)
Full text and
rfc822 format available.
Message #63 received at 53776 <at> debbugs.gnu.org (full text, mbox):
Stephen Berman <stephen.berman <at> gmx.net> writes:
> Since I don't have mouse-4 and mouse-5
These are the "keys" associated with the mouse wheel. In case you want
to scroll with the mouse wheel.
> I just tried evaluating that sexp with integral values (1, 0, -1) for
>ml-scroll-amnt, and only got truncation. Maybe I don't understand what
>you mean by "let mouse-4 and mouse-5 over the mode-line de- and
>increase `ml-scroll-amnt'". Can you show me bindings I can try with a
>3-button mouse, or just with the keyboard?
I dunno how you want to scroll. Drag with mouse-1, scroll with a wheel
or a key, something else?
The code
#+begin_src emacs-lisp
(defvar ml-scroll-amnt 0)
(setq-default
mode-line-format
`(:eval (substring (format-mode-line ',mode-line-format)
ml-scroll-amnt)))
#+end_src
has to be evaluated once. Mode-line looks like before.
(setq ml-scroll-amnt 3) scrolls the mode-line three chars to the left.
(setq ml-scroll-amnt 0) to scroll back. Changing `ml-scroll-amnt'
changes the scroll amount.
How you implement changing the binding of `ml-scroll-amnt' is up to you,
depends on how you want it to be.
Scrolling to the right would only prepend space to the beginning, so I
didn't handle negative `ml-scroll-amnt' values.
Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#53776
; Package
emacs
.
(Mon, 07 Feb 2022 22:41:02 GMT)
Full text and
rfc822 format available.
Message #66 received at 53776 <at> debbugs.gnu.org (full text, mbox):
On Mon, 07 Feb 2022 01:51:25 +0100 Michael Heerdegen <michael_heerdegen <at> web.de> wrote:
> Stephen Berman <stephen.berman <at> gmx.net> writes:
>
>> Since I don't have mouse-4 and mouse-5
>
> These are the "keys" associated with the mouse wheel. In case you want
> to scroll with the mouse wheel.
Ah, ok.
>> I just tried evaluating that sexp with integral values (1, 0, -1) for
>>ml-scroll-amnt, and only got truncation. Maybe I don't understand what
>>you mean by "let mouse-4 and mouse-5 over the mode-line de- and
>>increase `ml-scroll-amnt'". Can you show me bindings I can try with a
>>3-button mouse, or just with the keyboard?
>
> I dunno how you want to scroll. Drag with mouse-1, scroll with a wheel
> or a key, something else?
>
> The code
>
> #+begin_src emacs-lisp
> (defvar ml-scroll-amnt 0)
>
> (setq-default
> mode-line-format
> `(:eval (substring (format-mode-line ',mode-line-format)
> ml-scroll-amnt)))
> #+end_src
>
> has to be evaluated once. Mode-line looks like before.
>
> (setq ml-scroll-amnt 3) scrolls the mode-line three chars to the left.
> (setq ml-scroll-amnt 0) to scroll back. Changing `ml-scroll-amnt'
> changes the scroll amount.
>
> How you implement changing the binding of `ml-scroll-amnt' is up to you,
> depends on how you want it to be.
Ok. When I have more time to spend on this, I'll try to do it.
Steve Berman
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 08 Mar 2022 12:24:14 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 104 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.