unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Feature Request: Function to quote filenames
@ 2015-06-24 15:26 raman
  2015-06-24 15:34 ` Andreas Schwab
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: raman @ 2015-06-24 15:26 UTC (permalink / raw)
  To: emacs-devel

Feature Request:

Motivated by the  increasing number of filenames that show up with spc,
"'"  and other punctuation characters in their name.

The only helper function Emacs provides today is shell-quote-argument --
which often doesn't do the trick.

As an example: Given the filename:

Alice's Adventures in Wonderland

(setq f (shell-quote-argument "Alice's Adventures in Wonderland"))
returns 
"Alice\\'s\\ Adventures\\ in\\ Wonderland"

 But invocations like 
(shell-command (format "ls %s" f))

 throw an error 

it's never obvious what quoting magic to  use to get all the cases
right.

Would be nice if we had a shell-quote-filename elisp function that did
all of the magic quoting.


-- 



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

end of thread, other threads:[~2015-06-24 20:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-24 15:26 Feature Request: Function to quote filenames raman
2015-06-24 15:34 ` Andreas Schwab
2015-06-24 15:34 ` Nicolas Richard
2015-06-24 16:50   ` T.V Raman
2015-06-24 18:53     ` Stefan Monnier
2015-06-24 20:24       ` T.V Raman
2015-06-24 15:53 ` Eli Zaretskii

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).