all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: 7126@debbugs.gnu.org
Subject: bug#7126: 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	[thread overview]
Message-ID: <EBBFD3116B5B41E983AFFB8CADA1E6B1@us.oracle.com> (raw)

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'
 






             reply	other threads:[~2010-09-28 21:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-28 21:57 Drew Adams [this message]
2010-09-28 23:53 ` bug#7126: 24.0.50; [PATCH] `dired-goto-file' fails when `dired' is passed a cons with absolutefile names Drew Adams
2012-03-07 17:23   ` bug#7126: 24.0.50; [PATCH] `dired-goto-file' fails when `dired' is passed a cons withabsolutefile names Drew Adams
2012-03-10  5:21     ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=EBBFD3116B5B41E983AFFB8CADA1E6B1@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=7126@debbugs.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.