* C-x v u
@ 2003-06-29 3:19 Paul Pogonyshev
0 siblings, 0 replies; 2+ messages in thread
From: Paul Pogonyshev @ 2003-06-29 3:19 UTC (permalink / raw)
This is not actually a bug, but rather a wish for a change.
When i use C-x v u to revert a buffer, Emacs shows changes that
have been made in another window. The problem is that M-next
(M-pgdown) and M-prior (M-pgup) scroll the window with the buffer
being reverted, not the window with changes (as far as i understand
this means that the window with changes is active). Scrolling
changes would be more logical i think.
Paul Pogonyshev
^ permalink raw reply [flat|nested] 2+ messages in thread
[parent not found: <mailman.8826.1056845843.21513.bug-gnu-emacs@gnu.org>]
* Re: C-x v u
[not found] <mailman.8826.1056845843.21513.bug-gnu-emacs@gnu.org>
@ 2003-06-30 15:34 ` Kevin Rodgers
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Rodgers @ 2003-06-30 15:34 UTC (permalink / raw)
Paul Pogonyshev wrote:
> This is not actually a bug, but rather a wish for a change.
>
> When i use C-x v u to revert a buffer, Emacs shows changes that
> have been made in another window. The problem is that M-next
> (M-pgdown) and M-prior (M-pgup) scroll the window with the buffer
> being reverted, not the window with changes (as far as i understand
> this means that the window with changes is active). Scrolling
> changes would be more logical i think.
I agree, but I can't see how to change the relevant code:
(unless (vc-workfile-unchanged-p file)
;; vc-diff selects the new window, which is not what we want:
;; if the new window is on another frame, that'd require the user
;; moving her mouse to answer the yes-or-no-p question.
(let ((win (save-selected-window
(setq status (vc-diff nil t)) (selected-window))))
(vc-exec-after `(message nil))
(when status
(unwind-protect
(unless (yes-or-no-p "Discard changes? ")
(error "Revert canceled"))
(select-window win)
(if (one-window-p t)
(if (window-dedicated-p (selected-window))
(make-frame-invisible))
(delete-window))))))
The problem is that you can't bind minibuffer-scroll-window around the
call to yes-or-no-p like this, because that calls read_minibuf (via
Fread_from_minibuffer ), which resets it to the selected window (which
we don't want to change, as explained in the comment):
(unless (vc-workfile-unchanged-p file)
;; vc-diff selects the new window, which is not what we want:
;; if the new window is on another frame, that'd require the user
;; moving her mouse to answer the yes-or-no-p question.
(let ((win (selected-window))
(status (vc-diff nil t))
(minibuffer-scroll-window (selected-window)))
(when (window-live-p win)
(select-window win))
(vc-exec-after `(message nil))
(when status
(unwind-protect
(unless (yes-or-no-p "Discard changes? ")
(error "Revert canceled"))
(select-window win)
(if (one-window-p t)
(if (window-dedicated-p (selected-window))
(make-frame-invisible))
(delete-window))))))
--
<a href="mailto:<kevin.rodgers@ihs.com>">Kevin Rodgers</a>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-06-30 15:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-29 3:19 C-x v u Paul Pogonyshev
[not found] <mailman.8826.1056845843.21513.bug-gnu-emacs@gnu.org>
2003-06-30 15:34 ` Kevin Rodgers
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.