unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: 53776@debbugs.gnu.org, goncholden <goncholden@protonmail.com>
Subject: bug#53776: Modeline indicator when using define-minor-mode
Date: Mon, 07 Feb 2022 00:13:39 +0100	[thread overview]
Message-ID: <87sfsvd1wc.fsf@rub.de> (raw)
In-Reply-To: <878run7jea.fsf@web.de> (Michael Heerdegen's message of "Sun, 06 Feb 2022 22:52:13 +0100")

On Sun, 06 Feb 2022 22:52:13 +0100 Michael Heerdegen <michael_heerdegen@web.de> wrote:

> Stephen Berman <stephen.berman@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





  reply	other threads:[~2022-02-06 23:13 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 [this message]
2022-02-06 23:59               ` Michael Heerdegen
2022-02-07  0:28                 ` Stephen Berman
2022-02-07  0:51                   ` Michael Heerdegen
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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sfsvd1wc.fsf@rub.de \
    --to=stephen.berman@gmx.net \
    --cc=53776@debbugs.gnu.org \
    --cc=goncholden@protonmail.com \
    --cc=michael_heerdegen@web.de \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).