* Re: [Emacs-diffs] master 306a6f8: * lisp/gnus/gnus-art.el (gnus-article-prepare): Make sure the article
[not found] ` <20180412231940.042652052F@vcs0.savannah.gnu.org>
@ 2018-04-13 2:27 ` Stefan Monnier
2018-04-13 6:31 ` martin rudalics
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2018-04-13 2:27 UTC (permalink / raw)
To: emacs-devel; +Cc: Katsumi Yamaoka
> + ;; Make sure the article begins with the top of the header.
> + (save-selected-window
> + (select-window (get-buffer-window gnus-article-buffer))
> + (goto-char (point-min)))
Any reason this doesn't use `with-selected-window`?
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Emacs-diffs] master 306a6f8: * lisp/gnus/gnus-art.el (gnus-article-prepare): Make sure the article
2018-04-13 2:27 ` [Emacs-diffs] master 306a6f8: * lisp/gnus/gnus-art.el (gnus-article-prepare): Make sure the article Stefan Monnier
@ 2018-04-13 6:31 ` martin rudalics
2018-04-13 7:42 ` Katsumi Yamaoka
2018-04-13 17:35 ` Stefan Monnier
0 siblings, 2 replies; 4+ messages in thread
From: martin rudalics @ 2018-04-13 6:31 UTC (permalink / raw)
To: Stefan Monnier, emacs-devel; +Cc: Katsumi Yamaoka
>> + ;; Make sure the article begins with the top of the header.
>> + (save-selected-window
>> + (select-window (get-buffer-window gnus-article-buffer))
>> + (goto-char (point-min)))
>
> Any reason this doesn't use `with-selected-window`?
There's no need to _select_ the window. What Lars wants is probably
something like
(let ((window (get-buffer-window gnus-article-buffer)))
(when window
(with-current-buffer (window-buffer window)
(set-window-point window (point-min)))))
martin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Emacs-diffs] master 306a6f8: * lisp/gnus/gnus-art.el (gnus-article-prepare): Make sure the article
2018-04-13 6:31 ` martin rudalics
@ 2018-04-13 7:42 ` Katsumi Yamaoka
2018-04-13 17:35 ` Stefan Monnier
1 sibling, 0 replies; 4+ messages in thread
From: Katsumi Yamaoka @ 2018-04-13 7:42 UTC (permalink / raw)
To: martin rudalics; +Cc: Stefan Monnier, emacs-devel
On Fri, 13 Apr 2018 08:31:32 +0200, martin rudalics wrote:
> There's no need to _select_ the window. What Lars wants is probably
> something like
> (let ((window (get-buffer-window gnus-article-buffer)))
> (when window
> (with-current-buffer (window-buffer window)
> (set-window-point window (point-min)))))
Cool. I verified it works and committed this change. Thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Emacs-diffs] master 306a6f8: * lisp/gnus/gnus-art.el (gnus-article-prepare): Make sure the article
2018-04-13 6:31 ` martin rudalics
2018-04-13 7:42 ` Katsumi Yamaoka
@ 2018-04-13 17:35 ` Stefan Monnier
1 sibling, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2018-04-13 17:35 UTC (permalink / raw)
To: emacs-devel
>>> + ;; Make sure the article begins with the top of the header.
>>> + (save-selected-window
>>> + (select-window (get-buffer-window gnus-article-buffer))
>>> + (goto-char (point-min)))
>> Any reason this doesn't use `with-selected-window`?
> There's no need to _select_ the window. What Lars wants is probably
Duh! I focused on the `save-selected-window` (which is rarely "quite
right" in my experience) and completely missed the rest. Thanks!
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-04-13 17:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20180412231938.8195.10463@vcs0.savannah.gnu.org>
[not found] ` <20180412231940.042652052F@vcs0.savannah.gnu.org>
2018-04-13 2:27 ` [Emacs-diffs] master 306a6f8: * lisp/gnus/gnus-art.el (gnus-article-prepare): Make sure the article Stefan Monnier
2018-04-13 6:31 ` martin rudalics
2018-04-13 7:42 ` Katsumi Yamaoka
2018-04-13 17:35 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.