[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Operation of format-mode-line
From: |
Eli Zaretskii |
Subject: |
Re: Operation of format-mode-line |
Date: |
Sat, 27 Jul 2024 09:01:02 +0300 |
> Date: Fri, 26 Jul 2024 22:30:21 +0200
> From: Michael Heerdegen via Users list for the GNU Emacs text editor
> <help-gnu-emacs@gnu.org>
>
> > (setq-default mode-line-buffer-identification
> > (propertized-buffer-identification
> > (format " %s "
> > (let ( (name (buffer-name)) )
> > (if (> (length name) wmax)
> > (concat (substring name 0 (- wmax 3)) "...")
> > name))))) )
>
> This is expected: the display engine doesn't switch buffers when drawing
> mode-lines all the time. With other words: In the above context the
> return value of `buffer-name' does not always correspond to the buffer
> of the window whose mode-line gets computed.
IOW, instead of (buffer-name), one should probably use something like
(buffer-name (window-buffer))
- Re: Operation of format-mode-line, (continued)
- Re: Operation of format-mode-line, Michael Heerdegen, 2024/07/25
- Re: Operation of format-mode-line, Heime, 2024/07/25
- Re: Operation of format-mode-line, Michael Heerdegen, 2024/07/26
- Re: Operation of format-mode-line, Heime, 2024/07/26
- Re: Operation of format-mode-line, Michael Heerdegen, 2024/07/26
- Re: Operation of format-mode-line, Heime, 2024/07/26
- Re: Operation of format-mode-line, Yuri Khan, 2024/07/26
- Re: Operation of format-mode-line, Heime, 2024/07/26
- Re: Operation of format-mode-line, Heime, 2024/07/26
- Re: Operation of format-mode-line, Michael Heerdegen, 2024/07/26
- Re: Operation of format-mode-line,
Eli Zaretskii <=
- Re: Operation of format-mode-line, Heime, 2024/07/27
- Re: Operation of format-mode-line, Michael Heerdegen, 2024/07/27
- Re: Operation of format-mode-line, Heime, 2024/07/28
- Re: Operation of format-mode-line, Manuel Giraud, 2024/07/28
- Re: Operation of format-mode-line, Heime, 2024/07/28
- Re: Operation of format-mode-line, Heime, 2024/07/28
- Re: Operation of format-mode-line, Heime, 2024/07/28
- Operation of format-mode-line, Christopher Dimech, 2024/07/28
- Re: Operation of format-mode-line, Manuel Giraud, 2024/07/28
- Re: Operation of format-mode-line, Heime, 2024/07/28