|
From: | raman |
Subject: | Feature Request: Function to quote filenames |
Date: | Wed, 24 Jun 2015 08:26:52 -0700 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
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. --
[Prev in Thread] | Current Thread | [Next in Thread] |