[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Temporarily select-window, without updating mode-line face and curso
From: |
martin rudalics |
Subject: |
Re: Temporarily select-window, without updating mode-line face and cursor fill? |
Date: |
Mon, 3 May 2021 09:50:49 +0200 |
>> Sure, but the event gives you the window, and through it the buffer of
>> that window, so I see no particular reason to make the window
>> selected.
>
>
> A given buffer may appear in multiple windows, which likely will have
> different “window-start” and “window-end”. So you have to find the
> line position in the buffer relevant for that particular window. Also
> tying me to this is the fact that the format-mode-line method
> obviously uses windows, not buffers.
I'm still missing you. Both `window-start' and `window-point' have a
WINDOW argument. So running `get-buffer-window-list' for the buffer you
want to manage and calling the former for each window you get that way
should all do what you want.
And please keep in mind: Calling `select-window' in an :eval form within
`mode-line-format' means asking for trouble. Calling `set-window-start'
and `set-window-point' anywhere within `mode-line-format' or a hook like
`window-scroll-functions' or `window-state-change-functions' means
asking for more trouble. All these serve to react to changes in the
window configuration but should never change that configuration itself.
martin
- Temporarily select-window, without updating mode-line face and cursor fill?, JD Smith, 2021/05/01
- Re: Temporarily select-window, without updating mode-line face and cursor fill?, Eli Zaretskii, 2021/05/01
- Re: Temporarily select-window, without updating mode-line face and cursor fill?, JD Smith, 2021/05/01
- Re: Temporarily select-window, without updating mode-line face and cursor fill?, Eli Zaretskii, 2021/05/02
- Re: Temporarily select-window, without updating mode-line face and cursor fill?, JD Smith, 2021/05/02
- Re: Temporarily select-window, without updating mode-line face and cursor fill?,
martin rudalics <=
- Re: Temporarily select-window, without updating mode-line face and cursor fill?, JD Smith, 2021/05/03
- Re: Temporarily select-window, without updating mode-line face and cursor fill?, martin rudalics, 2021/05/03
- Re: Temporarily select-window, without updating mode-line face and cursor fill?, martin rudalics, 2021/05/02
- Re: Temporarily select-window, without updating mode-line face and cursor fill?, JD Smith, 2021/05/02
Re: Temporarily select-window, without updating mode-line face and cursor fill?, JD Smith, 2021/05/01
- Re: Temporarily select-window, without updating mode-line face and cursor fill?, Eli Zaretskii, 2021/05/02
- Re: Temporarily select-window, without updating mode-line face and cursor fill?, JD Smith, 2021/05/02
- Re: Temporarily select-window, without updating mode-line face and cursor fill?, Stefan Monnier, 2021/05/02
- Re: Temporarily select-window, without updating mode-line face and cursor fill?, JD Smith, 2021/05/02
- Re: Temporarily select-window, without updating mode-line face and cursor fill?, JD Smith, 2021/05/04