[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
shell-quote-argument seems quoting backup files incorrectly
From: |
Jin Huang |
Subject: |
shell-quote-argument seems quoting backup files incorrectly |
Date: |
Thu, 13 Aug 2009 20:36:33 +0800 |
User-agent: |
Thunderbird 2.0.0.22 (X11/20090608) |
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?
Best regards.
Jin Huang
- shell-quote-argument seems quoting backup files incorrectly,
Jin Huang <=