unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* 23.0.60; C-x v v in an ordinary file throws strange error
@ 2008-02-27 11:20 David Kastrup
  2008-02-27 15:39 ` Eric Hanchrow
  0 siblings, 1 reply; 2+ messages in thread
From: David Kastrup @ 2008-02-27 11:20 UTC (permalink / raw)
  To: emacs-pretest-bug


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 emacs-pretest-bug@gnu.org mailing list.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

I pressed C-x v v in a buffer associated with a file not under version
control.

The backtrace is

Debugger entered--Lisp error: (error "Selecting deleted buffer")
  vc-deduce-fileset(nil t)
  vc-next-action(nil)
  call-interactively(vc-next-action nil nil)



In GNU Emacs 23.0.60.3 (i686-pc-linux-gnu, GTK+ Version 2.12.0)
 of 2008-02-08 on lisa
Windowing system distributor `The X.Org Foundation', version 11.0.10300000
configured using `configure  '--prefix=/usr/local/emacs-21' '--without-toolkit-scroll-bars''

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: Debugger

Minor modes in effect:
  shell-dirtrack-mode: t
  TeX-PDF-mode: t
  server-mode: t
  desktop-save-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
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:

C-g <switch-frame> C-x v v C-x v v M-x s e t - v a 
r <tab> <return> d e b u g - o n <tab> e r <tab> <return> 
t <return> C-x v v M-x r e p o r t - e m <tab> <re
turn>

Recent messages:
Quit [3 times]
vc-next-action: Selecting deleted buffer [2 times]
Entering debugger...

-- 
David Kastrup




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: 23.0.60; C-x v v in an ordinary file throws strange error
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Hanchrow @ 2008-02-27 15:39 UTC (permalink / raw)
  To: emacs-devel; +Cc: emacs-pretest-bug

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"





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-27 15:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).