From: Michael Heerdegen <michael_heerdegen@web.de>
To: Stephen Berman <stephen.berman@gmx.net>
Cc: 53776@debbugs.gnu.org, goncholden <goncholden@protonmail.com>
Subject: bug#53776: Modeline indicator when using define-minor-mode
Date: Mon, 07 Feb 2022 01:51:25 +0100 [thread overview]
Message-ID: <87v8xr5wj6.fsf@web.de> (raw)
In-Reply-To: <87mtj3cyfp.fsf@gmx.net> (Stephen Berman's message of "Mon, 07 Feb 2022 01:28:26 +0100")
Stephen Berman <stephen.berman@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.
next prev parent reply other threads:[~2022-02-07 0:51 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-04 11:55 bug#53776: Modeline indicator when using define-minor-mode goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-04 13:02 ` Stephen Berman
2022-02-04 13:22 ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-04 13:35 ` Stephen Berman
2022-02-04 14:05 ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-04 14:38 ` Stephen Berman
2022-02-04 14:43 ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-04 14:49 ` Stephen Berman
2022-02-05 6:45 ` Lars Ingebrigtsen
2022-02-06 3:39 ` Michael Heerdegen
2022-02-06 12:52 ` Stephen Berman
2022-02-06 21:52 ` Michael Heerdegen
2022-02-06 23:13 ` Stephen Berman
2022-02-06 23:59 ` Michael Heerdegen
2022-02-07 0:28 ` Stephen Berman
2022-02-07 0:51 ` Michael Heerdegen [this message]
2022-02-07 22:40 ` Stephen Berman
2022-02-06 17:12 ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-05 0:12 ` Phil Sainty
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=87v8xr5wj6.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=53776@debbugs.gnu.org \
--cc=goncholden@protonmail.com \
--cc=stephen.berman@gmx.net \
/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.