emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Temporarily select-window, without updating mode-line face and curso


From: JD Smith
Subject: Re: Temporarily select-window, without updating mode-line face and cursor fill?
Date: Sun, 2 May 2021 22:23:21 -0400

I need line position, not points in a buffer, so I need to calculate those. The 
set-window-point is really just so I can harvest the speed of (format-mode-line 
ā€œ%lā€), which works in windows.  I think without that need, I indeed could just 
use a with-current-buffer, and do all my line position calculating there, as 
you suggest.  Either way I would still need final set-window-start to scroll a 
particular window once I have a new location. 

But perhaps there is a simpler approach; happy for more input. 

> On May 2, 2021, at 3:40 AM, martin rudalics <rudalics@gmx.at> wrote:
> 
> > Sure, thanks.  I compute line positions at a number of points
> > (window-start, window-end, and point-max) inside a mode line :eval
> > form.
> 
> But `window-start' and `window-end' already provide the buffer positions
> you need.  So why do think you have to care about the window after all
> and do things like `set-window-start' and `set-window-point' in your
> following post?
> 
> martin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]