emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-bug-tracker] bug#7854: closed (24.0.50; Buffer *temp* modified;


From: GNU bug Tracking System
Subject: [Emacs-bug-tracker] bug#7854: closed (24.0.50; Buffer *temp* modified; kill anyway?)
Date: Mon, 24 Jan 2011 20:29:01 +0000

Your message dated Mon, 24 Jan 2011 15:36:40 -0500
with message-id <address@hidden>
and subject line Re: bug#7854: 24.0.50; Buffer  *temp* modified; kill anyway?
has caused the GNU bug report #7854,
regarding 24.0.50; Buffer  *temp* modified; kill anyway?
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
7854: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7854
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.0.50; Buffer *temp* modified; kill anyway? Date: Mon, 17 Jan 2011 16:43:27 +0100 User-agent: Internet Messaging Program (IMP) H3 (4.1.5)
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug.  If you can, give
a recipe starting from `emacs -Q':

(a) emacs -Q -eval \
    "(defalias 'tramp-completion-file-name-handler 'file-name-non-special)"

    I added this alias because I couldn't prevent tramp kicking in
    (which adds quite a long delay the first time tramp is loaded) by
    simply customizing `tramp-mode' to nil, as I expected to from the
    doc string. Then I found that `file-name-handler-alist' has entries
    for `tramp-completion-file-name-handler' and
    `tramp-file-name-handler', and concluded that aliasing these to the
    default `file-name-non-special' might do the trick.

(b) M-x cvs-update RET

(c) I get a prompt like this:

    "Buffer  *temp* modified; kill anyway? "

(d) With M-x toggle-debug-on-quit RET, I get the following:

   Debugger entered--Lisp error: (quit)
     yes-or-no-p("Buffer  *temp*<4> modified; kill anyway? ")
     kill-buffer(#<buffer  *temp*<4>>)
     byte-code("[...]" [temp-buffer buffer-name kill-buffer] 2)
     byte-code([...] [temp-buffer cvs-cvsrc-file cmd --cl-dolist-temp-- sym
       val generate-new-buffer " *temp*" ((byte-code "..." [temp-buffer
       buffer-name kill-buffer] 2)) insert-file-contents ("cvs" "checkout"
       "status" "log" "diff" "tag" "add" "commit" "remove" "update") nil
       re-search-forward "^" "\\(\\s-+\\(.*\\)\\)?$" t intern "cvs-"
       "-flags" split-string-and-unquote match-string 2 "" 0 error
       "cvs-flags-defaults accessing a non-cvs-flags" 1 cvs-cvs-flags "-f"
       cvs-partition #[(x) "..." [x ("-q" "-Q" "-f")] 2] cvs-flags-query
       noquery value index cl-struct-cvs-flags-tags] 9)
     cvs-reread-cvsrc()
     execute-extended-command(nil)
     call-interactively(execute-extended-command nil nil)


In GNU Emacs 24.0.50.1 (i386-mingw-nt6.0.6002)
 of 2011-01-10 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 6.0.6002
configured using `configure --with-gcc (4.4) --no-opt --cflags
-Ic:/imagesupport/include'

(I have the same behavior with 23.2)

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: DEU
  value of $XMODIFIERS: nil
  locale-coding-system: cp1252
  default enable-multibyte-characters: t

Major mode: Debugger

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x c v s - u p <tab> <return> C-g M-x t o g g l e
- d e b u g - o n - q u i t <return> M-x <up> <up>
<return> C-g M-x r e p o r t - e m a c s - b u g <
return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Quit
Debug on Quit enabled globally
Entering debugger...

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr message rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader emacsbug
debug cus-start cus-load pcvs-parse pcvs-info pcvs-defs easymenu
easy-mmode pcvs-util ewoc tooltip ediff-hook vc-hooks lisp-float-type
mwheel dos-w32 disp-table ls-lisp w32-win w32-vars tool-bar dnd fontset
image fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev button minibuffer faces cus-face files text-properties overlay
md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process multi-tty emacs)




--- End Message ---
--- Begin Message --- Subject: Re: bug#7854: 24.0.50; Buffer *temp* modified; kill anyway? Date: Mon, 24 Jan 2011 15:36:40 -0500 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
>> Can you check to see if the quick-fix below solves the problem?
> It solves the problem.  Thank you!

Thanks for confirming.  I've installed the patch below in the emacs-23
branch, which should fix it right.


        Stefan


=== modified file 'lisp/files.el'
--- lisp/files.el       2011-01-20 02:55:36 +0000
+++ lisp/files.el       2011-01-24 20:22:34 +0000
@@ -6118,8 +6118,7 @@
                          (substitute-in-file-name identity)
                          ;; `add' means add "/:" to the result.
                          (file-truename add 0)
-                         ;; `quote' means add "/:" to buffer-file-name.
-                         (insert-file-contents quote 0)
+                         (insert-file-contents insert-file-contents 0)
                          ;; `unquote-then-quote' means set buffer-file-name
                          ;; temporarily to unquoted filename.
                          (verify-visited-file-modtime unquote-then-quote)
@@ -6150,20 +6149,18 @@
                           "/"
                         (substring (car pair) 2)))))
        (setq file-arg-indices (cdr file-arg-indices))))
-    (cond ((eq method 'identity)
-          (car arguments))
-         ((eq method 'add)
-          (concat "/:" (apply operation arguments)))
-         ((eq method 'quote)
-          (unwind-protect
+    (case method
+      (identity (car arguments))
+      (add (concat "/:" (apply operation arguments)))
+      (insert-file-contents
+       (let ((visit (nth 1 arguments)))
+         (prog1
               (apply operation arguments)
-            (setq buffer-file-name (concat "/:" buffer-file-name))))
-         ((eq method 'unquote-then-quote)
-          (let (res)
-            (setq buffer-file-name (substring buffer-file-name 2))
-            (setq res (apply operation arguments))
-            (setq buffer-file-name (concat "/:" buffer-file-name))
-            res))
+           (when (and visit buffer-file-name)
+             (setq buffer-file-name (concat "/:" buffer-file-name))))))
+      (unquote-then-quote
+       (let ((buffer-file-name (substring buffer-file-name 2)))
+         (apply operation arguments)))
          (t
           (apply operation arguments)))))
 



--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]