From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: C-x v u
Date: Mon, 30 Jun 2003 09:34:32 -0600 [thread overview]
Message-ID: <3F005888.9050609@yahoo.com> (raw)
In-Reply-To: mailman.8826.1056845843.21513.bug-gnu-emacs@gnu.org
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>
next parent reply other threads:[~2003-06-30 15:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.8826.1056845843.21513.bug-gnu-emacs@gnu.org>
2003-06-30 15:34 ` Kevin Rodgers [this message]
2003-06-29 3:19 C-x v u Paul Pogonyshev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3F005888.9050609@yahoo.com \
--to=ihs_4664@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.