unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19498: 24.3; Dired unable to list single file with backquote-containing name
@ 2015-01-03 22:54 sea
  2015-01-04 21:50 ` Paul Eggert
  0 siblings, 1 reply; 2+ messages in thread
From: sea @ 2015-01-03 22:54 UTC (permalink / raw)
  To: 19498


It looks like using dired on a single file with the name "Hit`N`Hide"
(without the quotes) doesn't work. It should have opened a dired buffer
with just that file listed, but instead it prints the message:

insert-directory: Listing directory failed but `access-file' worked

I think it might be that any filename with a backquote will result in
this behavior when dired is applied to that file only.

Best,
sea


==

In GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.12.2)
 of 2014-12-12 on Darkness
Windowing system distributor `The X.Org Foundation', version 11.0.11500000
Configured using:
 `configure '--with-wide-int' '--with-x''

Important settings:
  value of $LC_COLLATE: C
  value of $LANG: en_US.utf8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp

Minor modes in effect:
  gpm-mouse-mode: t
  global-semanticdb-minor-mode: t
  global-semantic-idle-scheduler-mode: t
  semantic-mode: t
  erc-track-mode: t
  erc-track-minor-mode: t
  erc-ring-mode: t
  erc-notify-mode: t
  erc-networks-mode: t
  erc-netsplit-mode: t
  erc-menu-mode: t
  erc-match-mode: t
  erc-log-mode: t
  erc-list-mode: t
  erc-pcomplete-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-autojoin-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  slime-trace-dialog-minor-mode: t
  slime-autodoc-mode: t
  eldoc-mode: t
  slime-mode: t
  shell-dirtrack-mode: t
  show-paren-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
SPC ESC b ESC b ESC f C-f C-k d o SPC d i r e d SPC 
s p e c i f i c a l l y SPC o n SPC t h a t SPC f i 
l e SPC ( t o SPC j u s t SPC d DEL g e t SPC a SPC 
d i r e d SPC b u f f e r SPC w i t h SPC o n l y SPC 
t h a t SPC f i l e SPC l i s t e d ) RET I SPC t h 
i n k SPC i t SPC m i g h t SPC b e SPC t h a t SPC 
b a c k q u o t s DEL e s SPC i n SPC f i l e n a m 
e s SPC i n SPC g e n e r a l SPC c a u s e s SPC d 
i r e d SPC t o SPC a c t SPC s t r a n g e l y RET 
C-x b RET C-x b RET C-x o C-v C-n C-s L e t SPC I t 
SPC RET C-c e d C-n C-p C-c p C-x b # p TAB RET H a 
, SPC m y SPC h a m SPC s a n d w i c h SPC i s SPC 
d i v i n e C-x b # TAB RET T h e r e ' s SPC a C-a 
C-k e <backspace> M-x m e n u - b a r <tab> m <tab> 
<return> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <menu-bar> <help-menu> <se
nd-emacs-bug-report>

Recent messages:
Checking new news...
Reading active file via nnml...
Reading incoming mail from file...
nnml: Reading incoming mail (no new mail)...done
Reading active file via nnml...done
Reading active file from archive via nnfolder...done
Reading active file via nndraft...done
Checking new news...done
When done with this frame, type C-x 5 0
Menu-Bar mode enabled

Load-path shadows:
~/.emacs.d/emms-3.0/tq hides /usr/local/share/emacs/24.3/lisp/emacs-lisp/tq
/home/sea/.emacs.d/elpa/cl-lib-0.5/cl-lib hides /usr/local/share/emacs/24.3/lisp/emacs-lisp/cl-lib

Features:
(shadow emacsbug semantic/wisent/javascript-jv semantic/wisent/js-wy
semantic/wisent semantic/wisent/wisent semantic/java semantic/doc js
json imenu semantic/html sgml-mode gnus-draft face-remap em-unix em-term
em-script em-prompt em-ls em-hist em-pred em-glob em-dirs em-cmpl
em-basic em-banner em-alias esh-var esh-io esh-cmd esh-opt esh-ext
esh-proc esh-arg esh-groups eshell esh-module esh-mode esh-util
find-dired mailalias tmm epa-file epa epg term ehelp electric
semantic/tag-write semantic/edit semantic/tag-file semantic/db-file
data-debug cedet-files semantic/bovine/c semantic/decorate/include
semantic/decorate/mode hideif semantic/bovine/c-by semantic/lex-spp
semantic/bovine/gcc semantic/dep semantic/bovine cc-langs tramp-sh
gnus-topic smiley gnus-cite semantic/ia semantic/analyze/refs
semantic/db-find semantic/db-ref semantic/senator semantic/decorate
pulse semantic/analyze semantic/sort semantic/scope semantic/analyze/fcn
parse-time shr-color color shr mm-archive mail-extr gnus-bcklg qp
t-mouse tabify man w3m-cookie w3m-search w3m-form mule-util w3m-bookmark
w3m-tabmenu w3m-session ffap url-parse url-vars pcmpl-unix sh-script
smie executable dired-aux tramp-cache gnus-async gnus-ml disp-table
nndraft nnmh nnfolder nnml gnus-agent gnus-srvr gnus-score score-mode
nnvirtual gnus-msg gnus-art mm-uu mml2015 epg-config mm-view mml-smime
smime dig mailcap nntp gnus-cache gnus-sum nnoo gnus-group gnus-undo
nnmail mail-source gnus-start gnus-spec gnus-int gnus-range message
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader gnus-win gnus gnus-ems nnheader misearch
multi-isearch gnutls server semantic/db-mode semantic/db eieio-base
semantic/idle semantic/format semantic/tag-ls semantic/find
semantic/ctxt semantic/util-modes semantic/util semantic semantic/tag
semantic/lex semantic/fw mode-local cedet auctex-autoloads tex-site info
cl-lib-autoloads memory-usage-autoloads register-list-autoloads
w3-autoloads windresize-autoloads xclip-autoloads package network-stream
erc-track erc-ring erc-notify erc-networks erc-netsplit erc-menu
erc-match erc-log erc-pcomplete erc-button erc-fill erc-stamp erc-join
color-theme lua-mode rx apl quail help-mode geiser erc-goodies erc
erc-backend erc-compat tls windmove warnings slime-fancy
slime-trace-dialog slime-fontifying-fu slime-package-fu slime-references
slime-compiler-notes-tree slime-scratch slime-presentations bridge
slime-fuzzy slime-fancy-trace slime-fancy-inspector slime-c-p-c
slime-editing-commands slime-autodoc eldoc slime-repl slime-parse slime
gud apropos compile arc-mode archive-mode noutline outline easy-mmode pp
hyperspec thingatpt smtpmail sendmail rfc2047 rfc2045 ietf-drums
mail-utils starttls emms-playing-time emms-browser sort
emms-playlist-sort cl-macs gv cl emms-score emms-cache emms-info-ogginfo
emms-info-mp3info emms-info later-do emms-playlist-mode edmacro kmacro
emms-player-mplayer emms-player-simple emms-source-playlist
emms-source-file locate emms-setup emms emms-compat midnight w3m
browse-url doc-view jka-compr dired image-mode timezone w3m-hist w3m-fb
bookmark-w3m w3m-ems w3m-ccl ccl w3m-favicon w3m-image w3m-proc w3m-util
tramp tramp-compat auth-source eieio byte-opt bytecomp byte-compile
cconv gnus-util mm-util mail-prsvr password-cache tramp-loaddefs shell
pcomplete comint ansi-color format-spec php-mode derived etags ring
cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs speedbar sb-image ezimage dframe advice help-fns cl-lib
advice-preload cus-edit easymenu cus-start cus-load wid-edit time
time-date paren battery tooltip ediff-hook vc-hooks lisp-float-type
mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
make-network-process dbusbind dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#19498: 24.3; Dired unable to list single file with backquote-containing name
  2015-01-03 22:54 bug#19498: 24.3; Dired unable to list single file with backquote-containing name sea
@ 2015-01-04 21:50 ` Paul Eggert
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggert @ 2015-01-04 21:50 UTC (permalink / raw)
  To: 19498-done

[-- Attachment #1: Type: text/plain, Size: 160 bytes --]

Thanks for reporting that bug.  I installed the attached patch as emacs-24 
commit 031eadcbeda4f5ec632db810207a7faf7e50e5d9 and am marking this report as done.

[-- Attachment #2: 0001-Fix-dired-quoting-bug-with-Hit-N-Hide.patch --]
[-- Type: text/x-diff, Size: 2456 bytes --]

From 4c94a37e8dc4287e59ea2adf143cd297a4a4ae88 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Sun, 4 Jan 2015 13:45:07 -0800
Subject: [PATCH] Fix dired quoting bug with "Hit`N`Hide"

Fixes Bug#19498.
* files.el (shell-quote-wildcard-pattern): Also quote "`".
---
 lisp/ChangeLog | 6 ++++++
 lisp/files.el  | 8 ++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ddc0c9e..7c6485c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2015-01-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+	Fix dired quoting bug with "Hit`N`Hide"
+	Fixes Bug#19498.
+	* files.el (shell-quote-wildcard-pattern): Also quote "`".
+
 2015-01-04  Dmitry Gutov  <dgutov@yandex.ru>
 
 	Unbreak `mouse-action' property in text buttons.
diff --git a/lisp/files.el b/lisp/files.el
index 568242a..0889244 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -6051,7 +6051,7 @@ and `list-directory-verbose-switches'."
 
 PATTERN is assumed to represent a file-name wildcard suitable for the
 underlying filesystem.  For Unix and GNU/Linux, each character from the
-set [ \\t\\n;<>&|()'\"#$] is quoted with a backslash; for DOS/Windows, all
+set [ \\t\\n;<>&|()`'\"#$] is quoted with a backslash; for DOS/Windows, all
 the parts of the pattern which don't include wildcard characters are
 quoted with double quotes.
 
@@ -6065,12 +6065,12 @@ need to be passed verbatim to shell commands."
       ;; argument has quotes, we can safely assume it is already
       ;; quoted by the caller.
       (if (or (string-match "[\"]" pattern)
-	      ;; We quote [&()#$'] in case their shell is a port of a
+	      ;; We quote [&()#$`'] in case their shell is a port of a
 	      ;; Unixy shell.  We quote [,=+] because stock DOS and
 	      ;; Windows shells require that in some cases, such as
 	      ;; passing arguments to batch files that use positional
 	      ;; arguments like %1.
-	      (not (string-match "[ \t;&()#$',=+]" pattern)))
+	      (not (string-match "[ \t;&()#$`',=+]" pattern)))
 	  pattern
 	(let ((result "\"")
 	      (beg 0)
@@ -6085,7 +6085,7 @@ need to be passed verbatim to shell commands."
 	  (concat result (substring pattern beg) "\""))))
      (t
       (let ((beg 0))
-	(while (string-match "[ \t\n;<>&|()'\"#$]" pattern beg)
+	(while (string-match "[ \t\n;<>&|()`'\"#$]" pattern beg)
 	  (setq pattern
 		(concat (substring pattern 0 (match-beginning 0))
 			"\\"
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-01-04 21:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-03 22:54 bug#19498: 24.3; Dired unable to list single file with backquote-containing name sea
2015-01-04 21:50 ` Paul Eggert

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).