From: Eric Hanchrow <offby1@blarg.net>
To: emacs-devel@gnu.org
Cc: emacs-pretest-bug@gnu.org
Subject: Re: 23.0.60; C-x v v in an ordinary file throws strange error
Date: Wed, 27 Feb 2008 07:39:23 -0800 [thread overview]
Message-ID: <87lk56if2s.fsf@offby1.atm01.sea.blarg.net> (raw)
In-Reply-To: 86y796myru.fsf@lola.quinscape.zz
This sounds dimly familiar; I think the fix is to call buffer-live-p
instead of merely checking that the isn't nil (note that the following
three patches are somewhat disorganized; I think one patch obviates
another, but you get the idea):
git show d92d80884f25a3d58d2a799c3426d498dadbc6a6
commit d92d80884f25a3d58d2a799c3426d498dadbc6a6
Author: Eric Hanchrow <offby1@blarg.net>
Date: Fri Feb 15 15:01:00 2008 -0800
(and x (buffer-live-p x)) => (buffer-live-p x)
diff --git a/lisp/vc.el b/lisp/vc.el
index 584b58d..ec59361 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -1354,8 +1354,7 @@ Otherwise, throw an error."
(list (vc-status-current-file)))))
((vc-backend buffer-file-name)
(list buffer-file-name))
- ((and vc-parent-buffer
- (buffer-live-p vc-parent-buffer)
+ ((and (buffer-live-p vc-parent-buffer)
(or (buffer-file-name vc-parent-buffer)
(with-current-buffer vc-parent-buffer
vc-dired-mode)))
@@ -1389,8 +1388,7 @@ Otherwise, throw an error."
((eq major-mode 'vc-status-mode)
(set-buffer (find-file-noselect (vc-status-current-file))))
(t
- (while (and vc-parent-buffer
- (buffer-live-p vc-parent-buffer)
+ (while (and (buffer-live-p vc-parent-buffer)
;; Avoid infinite looping when vc-parent-buffer and
;; current buffer are the same buffer.
(not (eq vc-parent-buffer (current-buffer))))
07:36:29 [erich@debian emacs-via-git]$ git show d20791cd96cf39e630e85b3b77cee4eb945a3783
commit d20791cd96cf39e630e85b3b77cee4eb945a3783
Author: Eric Hanchrow <erich@erich-dev.Kasayka.local>
Date: Fri Feb 15 14:26:00 2008 -0800
vc-deduce-fileset: similarly to dfbfd942, call buffer-live-p
diff --git a/lisp/vc.el b/lisp/vc.el
index 102eeef..584b58d 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -1354,9 +1354,11 @@ Otherwise, throw an error."
(list (vc-status-current-file)))))
((vc-backend buffer-file-name)
(list buffer-file-name))
- ((and vc-parent-buffer (or (buffer-file-name vc-parent-buffer)
- (with-current-buffer vc-parent-buffer
- vc-dired-mode)))
+ ((and vc-parent-buffer
+ (buffer-live-p vc-parent-buffer)
+ (or (buffer-file-name vc-parent-buffer)
+ (with-current-buffer vc-parent-buffer
+ vc-dired-mode)))
(progn
(set-buffer vc-parent-buffer)
(vc-deduce-fileset)))
07:36:46 [erich@debian emacs-via-git]$ git show dfbfd942
commit dfbfd942a3c3e667a6f7b09f2d52f91e541a8b01
Author: Stefan Monnier <monnier@cs.yale.edu>
Date: Sun Jan 6 16:02:38 2008 +0000
(vc-ensure-vc-buffer): Check liveness of vc-parent-buffer.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c8e3dc4..4a874b5 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2008-01-06 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * vc.el (vc-ensure-vc-buffer): Check liveness of vc-parent-buffer.
+
2008-01-06 Dan Nicolaescu <dann@ics.uci.edu>
* vc.el (vc-status-fileinfo): New defstruct.
diff --git a/lisp/vc.el b/lisp/vc.el
index 9e5df68..61a2c67 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -1310,6 +1310,7 @@ Otherwise, throw an error."
(if vc-dired-mode
(set-buffer (find-file-noselect (dired-get-filename)))
(while (and vc-parent-buffer
+ (buffer-live-p vc-parent-buffer)
;; Avoid infinite looping when vc-parent-buffer and
;; current buffer are the same buffer.
(not (eq vc-parent-buffer (current-buffer))))
--
None of the ... actors do anything we couldn't do if we looked
like them.
-- Roger Ebert, reviewing "The Chronicles Of Riddick"
prev parent reply other threads:[~2008-02-27 15:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-27 11:20 23.0.60; C-x v v in an ordinary file throws strange error David Kastrup
2008-02-27 15:39 ` Eric Hanchrow [this message]
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=87lk56if2s.fsf@offby1.atm01.sea.blarg.net \
--to=offby1@blarg.net \
--cc=emacs-devel@gnu.org \
--cc=emacs-pretest-bug@gnu.org \
/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.