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

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

bug#7854: emacs-23 (regression) - fix breaks `dired' (was: bug#7854: 24.


From: Reiner Steib
Subject: bug#7854: emacs-23 (regression) - fix breaks `dired' (was: bug#7854: 24.0.50; Buffer *temp* modified; kill anyway?)
Date: Thu, 3 Feb 2011 14:12:45 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> 
> >> 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.

This is the relevant commit:

+2011-01-24 Stefan Monnier <address@hidden>
+
+ * files.el (file-name-non-special): Only change buffer-file-name after
+ insert-file-contents if it's `visit'ing the file (bug#7854).

It fixed the original problem, but there's a regression: It breaks `dired' for
me (not sure if I should have opened a new bug?):

$ emacs -Q -l files-emacs23-git.el --eval '(dired "u:/tmp/")'
(files-emacs23-git.el =
http://git.savannah.gnu.org/cgit/emacs.git/plain/lisp/files.el?h=emacs-23&id=8588a5a723f4e5cfa115341a242126a9efc71808)

I get:

| if: Reading directory: "ls -al -- u:/tmp/" exited with status 1

$ emacs -Q -l files-emacs23-git.el -f toggle-debug-on-error \
    --eval '(dired "u:/tmp/")'

| dired-readin()
| dired-internal-noselect("u:/tmp/" nil)
| dired-noselect("u:/tmp/" nil)
| dired("u:/tmp/")
| eval((dired "u:/tmp/"))
| command-line-1(("-l" "files-emacs23-git.el" "-f"
|   "toggle-debug-on-error" "--eval" "(dired \"u:/tmp/\")"))
| command-line()
| normal-top-level()

Edebuging `dired-internal-noselect' ...

| edebug-enter(dired-internal-noselect ("u:/tmp/" nil nil) (lambda nil
|   (edebug-after (edebug-before 0) 121 (let*
|   ... ... ... ... ... ...))))
| dired-internal-noselect("u:/tmp/" nil)
| dired-noselect("u:/tmp/" nil)
| dired("u:/tmp/" nil)
| call-interactively(dired t nil)
| execute-extended-command(nil)
| call-interactively(execute-extended-command nil nil)
| recursive-edit()
| byte-code("..." [unread-command-char debugger-args x debugger-buffer
|   noninteractive debugger-batch-max-lines -1 debug backtrace-debug 4 t
|   backtrace-frame lambda 5 pop-to-buffer debugger-mode
|   debugger-setup-buffer count-lines 2 "...\n" message "%s"
|   buffer-string kill-emacs "" nil recursive-edit middlestart
|   buffer-read-only standard-output] 4)
| debug(error (error "Reading directory: \"ls -al -- u:/tmp/\" exited
|   with status 1"))
| signal(error ("Reading directory: \"ls -al -- u:/tmp/\" exited with
|   status 1"))
| error("Reading directory: \"%s %s -- %s\" exited with status %s"
|   "ls" "-al" "u:/tmp/" 1)
| (if (and (file-directory-p file) (memq system-type ...)) (error
|   "Reading directory: \"%s %s -- %s\" exited with status %s"
|   insert-directory-program (if ... ... switches) file result)
|   (access-file file "Reading directory") (error "Listing directory
|   failed but `access-file' worked"))
| (if (eq 0 result) nil (delete-region beg (point)) (if (and ... ...)
|   (error "Reading directory: \"%s %s -- %s\" exited with status %s"
|   insert-directory-program ... file result) (access-file file "Reading
|   directory") (error "Listing directory failed but `access-file'
|   worked")))
| (unless (eq 0 result) (delete-region beg (point)) (if (and ... ...)
|   (error "Reading directory: \"%s %s -- %s\" exited with status %s"
|   insert-directory-program ... file result) (access-file file "Reading
|   directory") (error "Listing directory failed but `access-file'
|   worked")))
| (let (result (beg ...)) (let* (... ...) (setq result ...)) (when (if
|   ... ... ...) (save-excursion ... ... ...)) (when (and ... ...) (let
|   ... ...)) (when (and ... ...) (setq result 0)) (unless (eq 0 result)
|   (delete-region beg ...) (if ... ... ... ...)) (when (if ... ... ...)
|   (forward-line -2) (when ... ... ...) (if ... ... ...) (if ... ...))
|   (let (... coding-no-eol val pos) (when ... ... ...)) (if
|   full-directory-p (save-excursion ... ...)))
| (if handler (funcall handler (quote insert-directory) file switches
|   wildcard full-directory-p) (let (result ...) (let* ... ...) (when
|   ... ...) (when ... ...) (when ... ...) (unless ... ... ...) (when
|   ... ... ... ... ...) (let ... ...) (if full-directory-p ...)))
| (let ((handler ...)) (if handler (funcall handler ... file switches
|   wildcard full-directory-p) (let
|   ... ... ... ... ... ... ... ... ...)))
| insert-directory("u:/tmp/" "-al" nil t)
| dired-insert-directory("u:/tmp/" "-al" nil nil t)
| dired-readin-insert()
| dired-readin()
| dired-internal-noselect("u:/tmp/" nil)
| dired-noselect("u:/tmp/" nil)
| dired("u:/tmp/")
| eval((dired "u:/tmp/"))
| command-line-1(("-l" "files-emacs23-git.el" "-f"
|   "toggle-debug-on-error" "--eval" "(dired \"u:/tmp/\")"))
| command-line()
| normal-top-level()

| $ u:/bin/ls --version
| ls (fileutils) 4.4.219 2010/05
| Written by Richard Stallman and David MacKenzie
| Microsoft Windows extensions by Alan Klietz.
| 
| Copyright (C) 2001 Free Software Foundation, Inc.
| 
| Microsoft Windows extensions copyright (C) 2010, Algin Technology LLC
| Distributed under GNU General Public License version 2.
| 
| This is free software; see the source for copying conditions.  There is NO
| warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Executing (shell-command-to-string "ls -al u:/tmp/") in IELM gives
resonable a result.







reply via email to

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