From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jin Huang Newsgroups: gmane.emacs.help Subject: shell-quote-argument seems quoting backup files incorrectly Date: Thu, 13 Aug 2009 20:36:33 +0800 Message-ID: <4A8408D1.8010700@cad.zju.edu.cn> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1250225008 14650 80.91.229.12 (14 Aug 2009 04:43:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Aug 2009 04:43:28 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 14 06:43:20 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MbodM-0005lk-44 for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Aug 2009 06:43:20 +0200 Original-Received: from localhost ([127.0.0.1]:53576 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbodL-000084-GE for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Aug 2009 00:43:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MbZY4-0007ZE-AK for help-gnu-emacs@gnu.org; Thu, 13 Aug 2009 08:36:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MbZXy-0007Yl-BC for help-gnu-emacs@gnu.org; Thu, 13 Aug 2009 08:36:50 -0400 Original-Received: from [199.232.76.173] (port=59856 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbZXy-0007Yi-3O for help-gnu-emacs@gnu.org; Thu, 13 Aug 2009 08:36:46 -0400 Original-Received: from cad.zju.edu.cn ([210.32.131.2]:33247) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MbZXx-0003Jy-GN for help-gnu-emacs@gnu.org; Thu, 13 Aug 2009 08:36:45 -0400 X-scanvirus: By EQAVSE AntiVirus Engine X-scanresult: CLEAN X-MAILFROM: X-RCPTTO: X-FROMIP: 10.76.7.234 X-EQManager-Scaned: 1 X-EQAUTHUSER: hj@cad.zju.edu.cn X-Received: unknown,10.76.7.234,20090813204505 Original-Received: from unknown (HELO ?10.76.7.234?) (hj@cad.zju.edu.cn@10.76.7.234) by localhost with SMTP; 13 Aug 2009 12:45:05 -0000 User-Agent: Thunderbird 2.0.0.22 (X11/20090608) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-Mailman-Approved-At: Fri, 14 Aug 2009 00:42:54 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:67138 Archived-At: 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