GNU bug report logs -
#23089
25.0.92; dired-goto-file in `find-dired' buffers
Previous Next
Reported by: Tino Calancha <f92capac <at> gmail.com>
Date: Tue, 22 Mar 2016 11:20:02 UTC
Severity: minor
Found in version 25.0.92
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 23089 in the body.
You can then email your comments to 23089 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#23089
; Package
emacs
.
(Tue, 22 Mar 2016 11:20:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Tino Calancha <f92capac <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 22 Mar 2016 11:20:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Dired buffers output from `find-dired' commands, usually contains
filename including '/'. Command `dired-goto-file' fails
on those files.
; emacs-lisp:
emacs -Q $emacs-lisp
M-x find-name-dired RET *.el RET
j language/thai-word.el RET
;It cannot find the file.
In GNU Emacs 25.0.92.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.30)
of 2016-03-22 built on calancha-pc
Repository revision: dbfbedd3d0f3afcfb811eae0e1a7b1c33fb27735
[dired.patch (text/plain, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#23089
; Package
emacs
.
(Fri, 25 Mar 2016 08:40:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 23089 <at> debbugs.gnu.org (full text, mbox):
> Date: Tue, 22 Mar 2016 20:22:51 +0900 (JST)
> From: Tino Calancha <f92capac <at> gmail.com>
>
> Dired buffers output from `find-dired' commands, usually contains
> filename including '/'. Command `dired-goto-file' fails
> on those files.
>
> ; emacs-lisp:
> emacs -Q $emacs-lisp
> M-x find-name-dired RET *.el RET
> j language/thai-word.el RET
>
> ;It cannot find the file.
Thanks for the report and the patch. Does the alternative patch below
look correct, and does it give good results?
diff --git a/lisp/dired.el b/lisp/dired.el
index ef22d45..5741872 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -2736,9 +2736,18 @@ dired-goto-file
(save-excursion
(goto-char (point-min))
(dired-goto-file-1 file file (point-max)))
- ;; Otherwise, look for it as a relative name. The
- ;; hair is to get the result of `dired-goto-subdir'
- ;; without calling it if we don't have any subdirs.
+ ;; Next, look for it as a relative name with leading
+ ;; subdirectories. (This happens in Dired buffers
+ ;; created by find-dired, for example.)
+ (save-excursion
+ (goto-char (point-min))
+ (dired-goto-file-1 (file-relative-name file
+ default-directory)
+ file (point-max)))
+ ;; Otherwise, look for it as a relative name, a base
+ ;; name only. The hair is to get the result of
+ ;; `dired-goto-subdir' without calling it if we don't
+ ;; have any subdirs.
(save-excursion
(when (if (string= dir (expand-file-name default-directory))
(goto-char (point-min))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#23089
; Package
emacs
.
(Fri, 25 Mar 2016 11:19:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 23089 <at> debbugs.gnu.org (full text, mbox):
> Does the alternative patch below
> look correct, and does it give good results?
Yes, your alternative patch also fix the problem, and it's more elegant.
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Fri, 25 Mar 2016 14:21:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Tino Calancha <f92capac <at> gmail.com>
:
bug acknowledged by developer.
(Fri, 25 Mar 2016 14:21:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 23089-done <at> debbugs.gnu.org (full text, mbox):
> Date: Fri, 25 Mar 2016 20:21:06 +0900 (JST)
> From: Tino Calancha <f92capac <at> gmail.com>
> cc: Tino Calancha <f92capac <at> gmail.com>, 23089 <at> debbugs.gnu.org
>
> > Does the alternative patch below
> > look correct, and does it give good results?
> Yes, your alternative patch also fix the problem, and it's more elegant.
Thanks, I pushed it to emacs-25 branch.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 23 Apr 2016 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 9 years and 56 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.