[Top][All Lists]

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

Re: [Emacs-diffs] master c711991: Allow not erase output buffer in shell

From: Stefan Monnier
Subject: Re: [Emacs-diffs] master c711991: Allow not erase output buffer in shell commands
Date: Tue, 20 Sep 2016 12:22:45 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

> I guess, in cases where the buffer is not displayed, (goto-char pos)
> might not always work as `set-window-point': a posterior
> display of the buffer maybe doesn't show point at pos.

When a buffer is displayed in a window for the first time, the window's
point is initialized from the buffer's point, so it should work for
those cases.  If the goto-char happens for a buffer that used to be
displayed in a window and later gets displayed again in that window, it
may be the case that we remember the old window-point somewhere and try
to return to that, indeed.  Let's not worry about it for now.

Tho, maybe it would be a good idea to introduce a new function (not sure
how to call it: window-goto-char?  set-buffer-window-point?) which would
work like set-window-point but takes a buffer as argument.  After all,
it's a fairly common need, and if we ever want to fix the corner case
mentioned above, we could fix it there once and for all.


PS: Haven't checked the new patch, sorry.

reply via email to

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