GNU bug report logs -
#2068
23.0.60; dired-get-filename includes `*' for executable in name
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 2068 in the body.
You can then email your comments to 2068 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#2068
; Package
emacs
.
(Mon, 26 Jan 2009 17:55:04 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
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Mon, 26 Jan 2009 17:55:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
emacs -Q
Create a file named `grep.exe' in some directory. The file content is
unimportant.
Use `C-u C-x d' to visit the directory, and specify `-alF' as the
listing switches.
Put the cursor on the line of the file named `grep.exe', which is
displayed as `grep.exe*' to show that it is executable.
M-: (dired-get-filename) returns "/the/dir/to/grep.exe*"
That is, the display artifact `*' is included as part of the file
name. This is also a bug in Emacs 22.3. It is a regression from Emacs
21.3.1.
In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
of 2009-01-04 on LENNART-69DE564
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include
-fno-crossjumping'
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#2068
; Package
emacs
.
(Tue, 27 Jan 2009 20:30:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Chong Yidong <cyd <at> stupidchicken.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Tue, 27 Jan 2009 20:30:03 GMT)
Full text and
rfc822 format available.
Message #10 received at 2068 <at> emacsbugs.donarmstrong.com (full text, mbox):
> emacs -Q
>
> Create a file named `grep.exe' in some directory.
>
> Use `C-u C-x d' to visit the directory, and specify `-alF' as the
> listing switches.
>
> Put the cursor on the line of the file named `grep.exe', which is
> displayed as `grep.exe*' to show that it is executable.
> M-: (dired-get-filename) returns "/the/dir/to/grep.exe*"
Can't reproduce this. If this bug exists, it's probably Windows-only.
bug reassigned from package `emacs' to `emacs,w32'.
Request was from
Chong Yidong <cyd <at> stupidchicken.com>
to
control <at> emacsbugs.donarmstrong.com
.
(Tue, 27 Jan 2009 20:30:05 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
:
bug#2068
; Package
emacs,w32
.
(Tue, 27 Jan 2009 20:50:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Drew Adams" <drew.adams <at> oracle.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
.
(Tue, 27 Jan 2009 20:50:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 2068 <at> emacsbugs.donarmstrong.com (full text, mbox):
> > emacs -Q
> >
> > Create a file named `grep.exe' in some directory.
> >
> > Use `C-u C-x d' to visit the directory, and specify `-alF' as the
> > listing switches.
> >
> > Put the cursor on the line of the file named `grep.exe', which is
> > displayed as `grep.exe*' to show that it is executable.
>
> > M-: (dired-get-filename) returns "/the/dir/to/grep.exe*"
>
> Can't reproduce this. If this bug exists, it's probably Windows-only.
Yes, I pretty much figured it was Windows-only.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
:
bug#2068
; Package
emacs,w32
.
(Wed, 28 Jan 2009 14:05:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jason Rumney <jasonr <at> gnu.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
.
(Wed, 28 Jan 2009 14:05:03 GMT)
Full text and
rfc822 format available.
Message #22 received at 2068 <at> emacsbugs.donarmstrong.com (full text, mbox):
Chong Yidong wrote:
>> emacs -Q
>>
>> Create a file named `grep.exe' in some directory.
>>
>> Use `C-u C-x d' to visit the directory, and specify `-alF' as the
>> listing switches.
>>
>> Put the cursor on the line of the file named `grep.exe', which is
>> displayed as `grep.exe*' to show that it is executable.
>>
>
>
>> M-: (dired-get-filename) returns "/the/dir/to/grep.exe*"
>>
>
> Can't reproduce this. If this bug exists, it's probably Windows-only.
>
It seems to be another bug in ls-lisp.
emacs -Q
(require 'ls-lisp)
(setq ls-lisp-use-insert-directory-program nil)
then C-u C-x d as above to visit a directory with executable files in it.
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Wed, 28 Jan 2009 19:15:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
"Drew Adams" <drew.adams <at> oracle.com>
:
bug acknowledged by developer.
(Wed, 28 Jan 2009 19:15:03 GMT)
Full text and
rfc822 format available.
Message #27 received at 2068-done <at> emacsbugs.donarmstrong.com (full text, mbox):
> From: "Drew Adams" <drew.adams <at> oracle.com>
> Date: Tue, 27 Jan 2009 12:43:25 -0800
> Cc:
>
> > > emacs -Q
> > >
> > > Create a file named `grep.exe' in some directory.
> > >
> > > Use `C-u C-x d' to visit the directory, and specify `-alF' as the
> > > listing switches.
> > >
> > > Put the cursor on the line of the file named `grep.exe', which is
> > > displayed as `grep.exe*' to show that it is executable.
> >
> > > M-: (dired-get-filename) returns "/the/dir/to/grep.exe*"
> >
> > Can't reproduce this. If this bug exists, it's probably Windows-only.
>
> Yes, I pretty much figured it was Windows-only.
ls-lisp.el was putting the `dired-filename' property incorrectly when
the "-F" switch was used. Fixed as below.
If you want to try this without rebuilding Emacs, you will need to
issue 2 commands, after byte-compiling the patched ls-lisp.el:
M-x load-library RET files RET
M-x load-library RET ls-lisp RET
IOW, files.elc needs to be loaded before ls-lisp, because the latter
redefines some functions in the former, and redefining them again will
give you trouble.
2009-01-28 Eli Zaretskii <eliz <at> gnu.org>
* ls-lisp.el (ls-lisp-classify): Propertize file name before
concatenating the type indicating character.
(ls-lisp-format): Don't propertize file-name only if
ls-lisp-classify already did.
Index: lisp/ls-lisp.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ls-lisp.el,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- lisp/ls-lisp.el 5 Jan 2009 03:19:31 -0000 1.80
+++ lisp/ls-lisp.el 28 Jan 2009 19:01:42 -0000 1.81
@@ -531,13 +531,17 @@
(type (cadr filedata)))
(cond (type
(cons
- (concat file-name (if (eq type t) "/" "@"))
+ (concat (propertize file-name 'dired-filename t)
+ (if (eq type t) "/" "@"))
(cdr filedata)))
((string-match "x" (nth 9 filedata))
(cons
- (concat file-name "*")
+ (concat (propertize file-name 'dired-filename t) "*")
(cdr filedata)))
- (t filedata))))
+ (t
+ (cons
+ (propertize file-name 'dired-filename t)
+ (cdr filedata))))))
(defun ls-lisp-extension (filename)
"Return extension of FILENAME (ignoring any version extension)
@@ -632,7 +636,9 @@
" "
(ls-lisp-format-time file-attr time-index now)
" "
- (propertize file-name 'dired-filename t)
+ (if (not (memq ?F switches)) ; ls-lisp-classify already did that
+ (propertize file-name 'dired-filename t)
+ file-name)
(if (stringp file-type) ; is a symbolic link
(concat " -> " file-type))
"\n"
Message #28 received at 2068-done <at> emacsbugs.donarmstrong.com (full text, mbox):
> ls-lisp.el was putting the `dired-filename' property incorrectly when
> the "-F" switch was used. Fixed as below.
>
> If you want to try this without rebuilding Emacs, you will need to
No, I don't need to try it; I'm OK with your statement that it was fixed.
Thanks - Drew
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Thu, 26 Feb 2009 15:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 16 years and 196 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.