GNU bug report logs - #7126
24.0.50; `dired-goto-file' fails when `dired' is passed a cons with absolute file names

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Tue, 28 Sep 2010 21:56:02 UTC

Severity: normal

Merged with 5420

Found in version 24.0.50

Done: Chong Yidong <cyd <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 7126 in the body.
You can then email your comments to 7126 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7126; Package emacs. (Tue, 28 Sep 2010 21:56:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 28 Sep 2010 21:56:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 24.0.50;
	`dired-goto-file' fails when `dired' is passed a cons with absolute
	file names
Date: Tue, 28 Sep 2010 14:57:22 -0700
emacs -Q
 
M-: (dired '("AAAAA" "c:/foo.c" "c:/bar.c"))
 
This opens a Dired buffer named `AAAAA' with the same
`default-directory' as before the `M-:'.  The Dired buffer has two
explicit entries, the files listed in the cons arg.  These are absolute
file names.
 
This is a normal, advertised behavior of `dired': you can pass it a cons
arg to have Dired list only explicit files.  And the file names can be
either relative or absolute.  It works for remote files as well as local
ones.  Generally, it works quite well.  There have been some oversights
in the code in the past, but most have now been fixed.
 
Now try `j c:/foo.c'.  (`j' is `dired-goto-file'.)  It fails.
 
The reason it fails is that `dired-goto-file' looks only for the
relative file name (e.g. `foo.c') with a space prepended.  This is so
even when you give it an absolute file name, such as `c:/foo.c'.
 
This is important not just for interactive use but because
`dired-goto-file' is a fundamental function.  It is used all over the
place in the Dired code.  This bug therefore breaks lots of things.  It
makes it impossible for 3rd-party developers to really take advantage of
the Dired feature of listing arbitrary files and directories.
 
Dired functions should make no assumptions about the listed file and
directory names.  In particular, it should not assume that the files and
dirs are in particular parent directories or that they are relative
names.
 
If a file name is absolute, then it must be respected.  If it is
relative, then it needs to be interpreted relative to the (sub)directory
heading that precedes it (as usual).
 

In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2010-09-20 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags
-Ic:/imagesupport/include'
 





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7126; Package emacs. (Tue, 28 Sep 2010 23:53:02 GMT) Full text and rfc822 format available.

Message #8 received at 7126 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <7126 <at> debbugs.gnu.org>
Subject: RE: bug#7126: 24.0.50;
	[PATCH] `dired-goto-file' fails when `dired' is passed a cons with
	absolutefile names
Date: Tue, 28 Sep 2010 16:53:40 -0700
[Message part 1 (text/plain, inline)]
I think the attached patch takes care of it.
But it would be good if others also tested it.
[dired-2010-09-28.patch (application/octet-stream, attachment)]

Merged 5420 7126. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 01 Mar 2011 04:47:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#7126; Package emacs. (Wed, 07 Mar 2012 17:26:01 GMT) Full text and rfc822 format available.

Message #13 received at 7126 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <7126 <at> debbugs.gnu.org>
Subject: RE: bug#7126: 24.0.50;
	[PATCH] `dired-goto-file' fails when `dired' is passed a cons
	withabsolutefile names
Date: Wed, 7 Mar 2012 09:23:50 -0800
> I think the attached patch takes care of it.
> But it would be good if others also tested it.

ping.  The bug is still there.

Tested again with emacs -Q:

In GNU Emacs 24.0.94.1 (i386-mingw-nt5.1.2600)
 of 2012-02-26 on MARVIN
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.6) --no-opt --enable-checking --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-3.0.9/include' 

The patch I sent 1 1/2 years ago would now need to be updated per the
introduction of `dired-switches-escape-p'.  IOW, the same use of that function
in the current save-excursion probably needs to also be added to the preliminary
save-excursion in the patch.

In any case - regardless of the patch, there has been NO response to this bug.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#7126; Package emacs. (Sat, 10 Mar 2012 05:52:01 GMT) Full text and rfc822 format available.

Message #16 received at 7126 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> gnu.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 7126 <at> debbugs.gnu.org
Subject: Re: bug#7126: 24.0.50;
	[PATCH] `dired-goto-file' fails when `dired' is passed a cons
	withabsolutefile names
Date: Sat, 10 Mar 2012 13:21:48 +0800
"Drew Adams" <drew.adams <at> oracle.com> writes:

> ping.  The bug is still there.

I've committed a more complete fix.  Thanks.




bug closed, send any further explanations to 7126 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com> Request was from Chong Yidong <cyd <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 10 Mar 2012 05:52:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 07 Apr 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 43 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.