From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: shell-quote-argument seems quoting backup files incorrectly
Date: Sat, 15 Aug 2009 05:48:18 -0600 [thread overview]
Message-ID: <h667a4$qhu$1@ger.gmane.org> (raw)
In-Reply-To: <4A8408D1.8010700@cad.zju.edu.cn>
Jin Huang wrote:
>
> Dear All,
>
> I just set my emacs (GNU Emacs 23.0.91.1) to use the system (Ubuntu
> 9.04) trash. It works fine for most of the file, however cannot move
> backup files (with ~ in the end of the file name) into trash, even
> cannot delete it.
>
> I followed the instruction from
> http://www.emacswiki.org/emacs/SystemTrash. Then I shrunk the code
> for the minimal set to reproduce the problem:
>
> ========== Code A ==========
> (setq delete-by-moving-to-trash t)
> (defun system-move-file-to-trash (filename)
> (call-process "gvfs-trash" nil nil nil filename))
>
> ========== Code B ==========
> (setq delete-by-moving-to-trash t)
> (defun system-move-file-to-trash (filename)
> (call-process "gvfs-trash" nil nil nil (shell-quote-argument filename)))
>
> Code A can move the backup file into trash correctly, however Code B
> cannot.
>
> One possible reason is that the backup suffix "~" mixes up with the
> notation for home directory.
>
> Is there any solution?
call-process does not invoke the shell, so you should not use
shell-quote-argument with it (cf. call-process-shell-command
and shell-command).
--
Kevin Rodgers
Denver, Colorado, USA
prev parent reply other threads:[~2009-08-15 11:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-13 12:36 shell-quote-argument seems quoting backup files incorrectly Jin Huang
2009-08-15 11:48 ` Kevin Rodgers [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='h667a4$qhu$1@ger.gmane.org' \
--to=kevin.d.rodgers@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.