* Does with-selected-window set current buffer?
@ 2008-09-05 20:01 Lennart Borgman (gmail)
2008-09-05 20:35 ` Francis Litterio
2008-09-05 21:49 ` Stefan Monnier
0 siblings, 2 replies; 4+ messages in thread
From: Lennart Borgman (gmail) @ 2008-09-05 20:01 UTC (permalink / raw)
To: Emacs Devel
I am trying to understand if with-selected-window sets current buffer to
the selected window.
with-selected-window calls select-window. The doc string for
select-window makes me a bit confused. At the end of it is a notion that
the command loop selects the buffer of selected window.
Does that mean that select-window does not select that window? Or what
is the comment about?
The reason I am asking is that I have recently seen some cases where I
use with-selected-window in a timer and it looks to me like the code has
been carried out in the wrong buffer. I am not sure yet what is
happening though.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Does with-selected-window set current buffer?
2008-09-05 20:01 Does with-selected-window set current buffer? Lennart Borgman (gmail)
@ 2008-09-05 20:35 ` Francis Litterio
2008-09-05 21:49 ` Stefan Monnier
1 sibling, 0 replies; 4+ messages in thread
From: Francis Litterio @ 2008-09-05 20:35 UTC (permalink / raw)
To: emacs-devel
Lennart Borgman (gmail) wrote:
> I am trying to understand if with-selected-window sets current buffer to
> the selected window.
Well, the current buffer can't be a window object. I think you meant to
ask if with-selected-window sets the current buffer to the buffer
displayed in the specified window. As far as I can tell, it does.
--
Fran
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Does with-selected-window set current buffer?
2008-09-05 20:01 Does with-selected-window set current buffer? Lennart Borgman (gmail)
2008-09-05 20:35 ` Francis Litterio
@ 2008-09-05 21:49 ` Stefan Monnier
2008-09-06 1:21 ` Lennart Borgman (gmail)
1 sibling, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2008-09-05 21:49 UTC (permalink / raw)
To: Lennart Borgman (gmail); +Cc: Emacs Devel
> I am trying to understand if with-selected-window sets current buffer to
> the selected window.
Not always. Sadly, it does it in most cases, so it's easy to be mislead
into thinking that it does.
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Does with-selected-window set current buffer?
2008-09-05 21:49 ` Stefan Monnier
@ 2008-09-06 1:21 ` Lennart Borgman (gmail)
0 siblings, 0 replies; 4+ messages in thread
From: Lennart Borgman (gmail) @ 2008-09-06 1:21 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Emacs Devel
Stefan Monnier wrote:
>> I am trying to understand if with-selected-window sets current buffer to
>> the selected window.
>
> Not always. Sadly, it does it in most cases, so it's easy to be mislead
> into thinking that it does.
Thanks. Then it would be very good if the doc string reflected this.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-09-06 1:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-05 20:01 Does with-selected-window set current buffer? Lennart Borgman (gmail)
2008-09-05 20:35 ` Francis Litterio
2008-09-05 21:49 ` Stefan Monnier
2008-09-06 1:21 ` Lennart Borgman (gmail)
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).