GNU bug report logs -
#5310
23.1; vc-revert modifies window configuration
Previous Next
Reported by: Nathaniel Flath <flat0103 <at> gmail.com>
Date: Tue, 5 Jan 2010 14:09:06 UTC
Severity: normal
Tags: patch
Done: martin rudalics <rudalics <at> gmx.at>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5310 in the body.
You can then email your comments to 5310 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5310
; Package
emacs
.
(Tue, 05 Jan 2010 14:09:06 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Nathaniel Flath <flat0103 <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 05 Jan 2010 14:09:06 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
To: bug-gnu-emacs <at> gnu.org
Subject: 23.1; vc-revert modifies window configuration
--text follows this line--
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.
Your bug report will be posted to the bug-gnu-emacs <at> gnu.org mailing list,
and to the gnu.emacs.bug news group.
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
When calling vc-revert on a window configuration other than the default, it
is likely to change as a result.
To reproduce:
emacs -q
C-x 3
In one window, open a file under version control and modify it
M-x vc-revert
confirm the reversion
At this point, the second window will be closed.
The attached patch fixes this problem.
If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
`bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/share/emacs/23.1/etc/DEBUG for instructions.
In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.18.3)
of 2009-11-10 on vernadsky, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.10604000
configured using `configure '--build=i486-linux-gnu'
'--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib'
'--libexecdir=/usr/lib' '--localstatedir=/var/lib'
'--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes'
'--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim'
'--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars'
'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g
-O2' 'LDFLAGS=-g' 'CPPFLAGS=''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default-enable-multibyte-characters: t
Major mode: Shell
Minor modes in effect:
diff-auto-refine-mode: t
save-visited-files-mode: t
savehist-mode: t
dirtrack-mode: t
global-pabbrev-mode: t
icomplete-mode: t
display-battery-mode: t
display-time-mode: t
show-paren-mode: t
cua-mode: t
command-frequency-autosave-mode: t
command-frequency-mode: t
tooltip-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
global-auto-composition-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
C-n C-n C-n C-n C-n C-p M-< C-x o M-> M-p C-a M-f C-f
v c . e l SPC C-a M-f SPC - j <backspace> u <return>
C-x C-f <backspace> <backspace> v c <return> M-< C-n
C-n C-k C-k C-k C-k C-k C-/ C-/ C-k C-k C-k C-d C-d
C-d C-d C-d C-d C-d C-d C-p C-p C-k C-k C-k C-k C-d
C-d C-d C-d C-d C-d C-d C-d C-n C-x C-s C-x b <return>
M-p <return> M-p M-p M-p M-p M-p M-m M-n C-a M-f M-f
M-f <tab> b <home> <backspace> <backspace> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <backspace> <backspace>
N a u f <backspace> r <return> C-x p o C-x <tab> t
t C-g C-g C-c C-c M-p C-w C-w <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <return>
C-x o C-x C-f v c . e l <return> y C-p C-n C-M-b C-n
C-n C-n C-n C-n C-x C-s C-a C-f C-f C-f C-f C-f C-f
C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f
C-f C-f C-f C-f C-f C-f C-f C-f C-f C-a C-p C-p C-p
C-p C-x v = C-x k <return> C-x o M-x v c SPC r e v
e r t SPC f <backspace> <backspace> <return> <return>
y C-n C-n C-n C-n C-n C-p C-x v = C-x k <return> C-x
o C-x o C-x b <return> C-c C-c M-p M-p M-p M-p M-n
<return> C-x o d r C-x o r r <backspace> C-x C-s C-x
o M-x r e p o r t SPC e m a c s SPC b u g <return>
Recent messages:
vc.el changed on disk; really edit the buffer? (y, n, r or C-h)
Please type y, n or r; or ? for help
vc.el changed on disk; really edit the buffer? (y, n, r or C-h)
byte-code: File reverted: /home/nflath/emacs/lisp/vc.el
Saving file /home/nflath/emacs/lisp/vc.el...
Wrote /home/nflath/emacs/lisp/vc.el
Saving file /home/nflath/.emacs.d/emacs-visited-files...
Wrote /home/nflath/.emacs.d/emacs-visited-files
defun: (NAME ARGLIST [DOCSTRING] BODY...)
[Message part 2 (text/html, inline)]
[vc-revert.patch (text/x-patch, attachment)]
Added tag(s) patch.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Thu, 07 Jan 2010 21:47:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5310
; Package
emacs
.
(Sat, 30 Jan 2010 03:15:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 5310 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
My apologies - looking at this in the bug tracker does not appear to show
the patch. I must have forgotten to attach it, somehow. The patch is as
follows:
--- vc.el 7 Dec 2009 09:02:16 -0000 1.746
+++ vc.el 4 Jan 2010 04:10:54 -0000
@@ -1975,37 +1975,38 @@
This asks for confirmation if the buffer contents are not identical
to the working revision (except for keyword expansion)."
(interactive)
- (let* ((vc-fileset (vc-deduce-fileset))
- (files (cadr vc-fileset)))
- ;; If any of the files is visited by the current buffer, make
- ;; sure buffer is saved. If the user says `no', abort since
- ;; we cannot show the changes and ask for confirmation to
- ;; discard them.
- (when (or (not files) (memq (buffer-file-name) files))
- (vc-buffer-sync nil))
- (dolist (file files)
- (let ((buf (get-file-buffer file)))
- (when (and buf (buffer-modified-p buf))
- (error "Please kill or save all modified buffers before reverting")))
- (when (vc-up-to-date-p file)
- (unless (yes-or-no-p (format "%s seems up-to-date. Revert anyway? "
file))
- (error "Revert canceled"))))
- (when (vc-diff-internal vc-allow-async-revert vc-fileset nil nil)
- (unless (yes-or-no-p
- (format "Discard changes in %s? "
- (let ((str (vc-delistify files))
- (nfiles (length files)))
- (if (< (length str) 50)
- str
- (format "%d file%s" nfiles
- (if (= nfiles 1) "" "s"))))))
- (error "Revert canceled"))
- (delete-windows-on "*vc-diff*")
- (kill-buffer "*vc-diff*"))
- (dolist (file files)
- (message "Reverting %s..." (vc-delistify files))
- (vc-revert-file file)
- (message "Reverting %s...done" (vc-delistify files)))))
+ (save-window-excursion
+ (let* ((vc-fileset (vc-deduce-fileset))
+ (files (cadr vc-fileset)))
+ ;; If any of the files is visited by the current buffer, make
+ ;; sure buffer is saved. If the user says `no', abort since
+ ;; we cannot show the changes and ask for confirmation to
+ ;; discard them.
+ (when (or (not files) (memq (buffer-file-name) files))
+ (vc-buffer-sync nil))
+ (dolist (file files)
+ (let ((buf (get-file-buffer file)))
+ (when (and buf (buffer-modified-p buf))
+ (error "Please kill or save all modified buffers before
reverting")))
+ (when (vc-up-to-date-p file)
+ (unless (yes-or-no-p (format "%s seems up-to-date. Revert anyway?
" file))
+ (error "Revert canceled"))))
+ (when (vc-diff-internal vc-allow-async-revert vc-fileset nil nil)
+ (unless (yes-or-no-p
+ (format "Discard changes in %s? "
+ (let ((str (vc-delistify files))
+ (nfiles (length files)))
+ (if (< (length str) 50)
+ str
+ (format "%d file%s" nfiles
+ (if (= nfiles 1) "" "s"))))))
+ (error "Revert canceled"))
+ (delete-windows-on "*vc-diff*")
+ (kill-buffer "*vc-diff*"))
+ (dolist (file files)
+ (message "Reverting %s..." (vc-delistify files))
+ (vc-revert-file file)
+ (message "Reverting %s...done" (vc-delistify files))))))
;;;###autoload
(defun vc-rollback ()
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#5310
; Package
emacs
.
(Mon, 10 Oct 2011 18:20:03 GMT)
Full text and
rfc822 format available.
Message #13 received at 5310 <at> debbugs.gnu.org (full text, mbox):
> When calling vc-revert on a window configuration other than the default, it
> is likely to change as a result.
>
> To reproduce:
> emacs -q
> C-x 3
> In one window, open a file under version control and modify it
> M-x vc-revert
> confirm the reversion
>
> At this point, the second window will be closed.
I checked in a slightly different fix. Please have a look.
Thanks, martin
Reply sent
to
martin rudalics <rudalics <at> gmx.at>
:
You have taken responsibility.
(Wed, 12 Oct 2011 07:02:04 GMT)
Full text and
rfc822 format available.
Notification sent
to
Nathaniel Flath <flat0103 <at> gmail.com>
:
bug acknowledged by developer.
(Wed, 12 Oct 2011 07:02:05 GMT)
Full text and
rfc822 format available.
Message #18 received at 5310-done <at> debbugs.gnu.org (full text, mbox):
> I checked in a slightly different fix. Please have a look.
Closed, martin
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 09 Nov 2011 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 13 years and 225 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.