From: Reiner Steib <reinersteib+gmane@imap.cc>
To: bug-gnu-emacs@gnu.org
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) [thread overview]
Message-ID: <loom.20110203T142346-280@post.gmane.org> (raw)
In-Reply-To: <20110117164327.72fn7tc54w0ks8cs@imap.uni-ulm.de>
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 <monnier@iro.umontreal.ca>
+
+ * 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.
next prev parent reply other threads:[~2011-02-03 14:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-17 15:43 bug#7854: 24.0.50; Buffer *temp* modified; kill anyway? Reiner Steib
2011-01-17 21:54 ` Stefan Monnier
2011-01-18 7:15 ` Reiner Steib
2011-01-20 12:39 ` Reiner Steib
2011-01-20 15:22 ` Stefan Monnier
2011-01-22 12:06 ` Reiner Steib
2011-01-24 20:36 ` Stefan Monnier
2011-02-03 14:12 ` Reiner Steib [this message]
2011-02-12 20:20 ` bug#7854: emacs-23 (regression) - fix breaks `dired' Chong Yidong
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20110203T142346-280@post.gmane.org \
--to=reinersteib+gmane@imap.cc \
--cc=bug-gnu-emacs@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 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).