From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.devel Subject: Re: patch about moving file (or directory) to the Recycle Bin on Windows NT series Date: Tue, 22 Apr 2008 21:58:06 +0100 Message-ID: <480E515E.4050904@gnu.org> References: 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 1208898001 31246 80.91.229.12 (22 Apr 2008 21:00:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Apr 2008 21:00:01 +0000 (UTC) Cc: Toru TSUNEYOSHI , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 22 23:00:36 2008 connect(): Connection refused 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.50) id 1JoPbN-0001cg-7O for ged-emacs-devel@m.gmane.org; Tue, 22 Apr 2008 23:00:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JoPah-00057t-Hr for ged-emacs-devel@m.gmane.org; Tue, 22 Apr 2008 16:59:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JoPZa-0004qc-79 for emacs-devel@gnu.org; Tue, 22 Apr 2008 16:58:42 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JoPZY-0004q2-CG for emacs-devel@gnu.org; Tue, 22 Apr 2008 16:58:41 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JoPZY-0004py-6m for emacs-devel@gnu.org; Tue, 22 Apr 2008 16:58:40 -0400 Original-Received: from mk-outboundfilter-4.mail.uk.tiscali.com ([212.74.114.32]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JoPZT-0000Ne-Rs; Tue, 22 Apr 2008 16:58:36 -0400 Original-X-Trace: 66395730/mk-outboundfilter-2.mail.uk.tiscali.com/F2S/$ACCEPTED/freedom2Surf-customers/83.67.23.108 X-SBRS: None X-RemoteIP: 83.67.23.108 X-IP-MAIL-FROM: jasonr@gnu.org X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlMFAK7uDUhTQxds/2dsb2JhbACBUqtv X-IP-Direction: IN Original-Received: from i-83-67-23-108.freedom2surf.net (HELO wanchan.jasonrumney.net) ([83.67.23.108]) by smtp.f2s.tiscali.co.uk with ESMTP; 22 Apr 2008 21:58:34 +0100 Original-Received: from [192.168.249.27] (chiko.jasonrumney.net [192.168.249.27]) by wanchan.jasonrumney.net (Postfix) with ESMTP id EFC8C790; Tue, 22 Apr 2008 21:59:11 +0100 (BST) User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) In-Reply-To: X-Enigmail-Version: 0.95.6 OpenPGP: id=8086879D X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:95804 Archived-At: Eli Zaretskii wrote: >> +void >> +syms_of_w32 () >> +{ >> + DEFVAR_BOOL ("w32-sys-unlink-use-shellapi", &w32_sys_unlink_use_shellapi, >> + "Non-nil means using shellapi for sys_unlink(), sys_rmdir()."); >> + w32_sys_unlink_use_shellapi = 1; >> +} >> > > Please use a more descriptive name, such as w32-delete-to-recycle-bin > or something similar. I would go further, and define it without the w32_ prefix in fileio.c with a suitable #ifdef (HAVE_TRASHCAN for example). If this feature is useful, then we will want to implement it on other platforms too. There seem to be a limited number of Trash directory implementations that cover Gnome, KDE and Mac OSX, and we should be able to figure out from the filesystem which implementation to use, either directly moving files into the .Trash directory, or calling a function like g_file_trash if the appropriate library is linked.