From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Newsgroups: gmane.emacs.devel Subject: Re: delete-file to trash Date: Sun, 23 May 2010 09:57:45 +0100 Message-ID: References: <877hmvxyuv.fsf@stupidchicken.com> <87hblz1hxi.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1274605083 23300 80.91.229.12 (23 May 2010 08:58:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 23 May 2010 08:58:03 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 23 10:58:02 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OG70S-0005iy-FK for ged-emacs-devel@m.gmane.org; Sun, 23 May 2010 10:58:00 +0200 Original-Received: from localhost ([127.0.0.1]:60656 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OG70R-0003Cf-Bl for ged-emacs-devel@m.gmane.org; Sun, 23 May 2010 04:57:59 -0400 Original-Received: from [140.186.70.92] (port=47868 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OG70I-0003CY-Rj for emacs-devel@gnu.org; Sun, 23 May 2010 04:57:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OG70H-00011N-1P for emacs-devel@gnu.org; Sun, 23 May 2010 04:57:50 -0400 Original-Received: from ppsw-31.csi.cam.ac.uk ([131.111.8.131]:57051) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OG70G-00011B-TP for emacs-devel@gnu.org; Sun, 23 May 2010 04:57:49 -0400 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: not scanned X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Original-Received: from smaug.linux.pwf.cam.ac.uk ([193.60.95.72]:46897) by ppsw-31.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.157]:587) with esmtpsa (LOGIN:sl392) (TLSv1:DHE-RSA-AES128-SHA:128) id 1OG70D-0001Fr-CK (Exim 4.70) (return-path ); Sun, 23 May 2010 09:57:45 +0100 In-Reply-To: <87hblz1hxi.fsf@stupidchicken.com> (Chong Yidong's message of "Sat, 22 May 2010 22:16:25 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:125100 Archived-At: On 2010-05-23 03:16 +0100, Chong Yidong wrote: > Stefan Monnier writes: > >> PS: And yes, for interactive calls to delete-file, the `allow-trash' >> should be non-nil, I think. > > Yeah, but omitted means nil. Hmm. If the interactive-form is like the following: (interactive (list (read-file-name "Delete file: " nil default-directory (confirm-nonexistent-file-or-buffer)) 'allow-trash)) it is not omitted and the doc-string can say when called interactively it always respects delete-by-moving-to-trash. Then > Here's an idea: allow the variable `delete-by-moving-to-trash' to be a > list of values of `this-command', for which to trash instead of > delete. Then we could set the default value of this list to be > `delete-file', `dired-do-flagged-delete', etc. we can avoid maintaining a list of commands and make delete-by-moving-to-trash a much easier to customise option since it requires less information to customise. It looks to me delete-file is almost exclusively used non-interactively. Leo