GNU bug report logs -
#2068
23.0.60; dired-get-filename includes `*' for executable in name
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
This is an automatic notification regarding your bug report
which was filed against the emacs,w32 package:
#2068: 23.0.60; dired-get-filename includes `*' for executable in name
It has been closed by Eli Zaretskii <eliz <at> gnu.org>.
Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Eli Zaretskii <eliz <at> gnu.org> by
replying to this email.
--
2068: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=2068
Emacs Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
> 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 part 3 (message/rfc822, inline)]
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'
This bug report was last modified 16 years and 197 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.