From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#21340: 24.5; trash-directory uses FreeDesktop location on OSX Date: Thu, 2 Dec 2021 21:58:35 +0000 Message-ID: References: <831tesh9t6.fsf@gnu.org> <70E8D053-E9ED-4E5A-8BB4-36BDA8B4BDA8@3gfp.com> <83y4h0ftrk.fsf@gnu.org> <878rx373ps.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19668"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Glenn Morris , Harvey Chapman , Stefan Monnier , 21340@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 02 22:59:12 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1msu6g-0004sl-Vl for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Dec 2021 22:59:11 +0100 Original-Received: from localhost ([::1]:49966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msu6f-0000YL-M9 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Dec 2021 16:59:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59924) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msu6Y-0000Xa-Da for bug-gnu-emacs@gnu.org; Thu, 02 Dec 2021 16:59:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37948) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1msu6Y-0003f2-6F for bug-gnu-emacs@gnu.org; Thu, 02 Dec 2021 16:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1msu6Y-0007MY-3s for bug-gnu-emacs@gnu.org; Thu, 02 Dec 2021 16:59:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Dec 2021 21:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21340 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 21340-submit@debbugs.gnu.org id=B21340.163848233128285 (code B ref 21340); Thu, 02 Dec 2021 21:59:02 +0000 Original-Received: (at 21340) by debbugs.gnu.org; 2 Dec 2021 21:58:51 +0000 Original-Received: from localhost ([127.0.0.1]:49494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msu6M-0007M8-UT for submit@debbugs.gnu.org; Thu, 02 Dec 2021 16:58:51 -0500 Original-Received: from outbound.soverin.net ([116.202.126.228]:55467) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msu6H-0007Lr-9T for 21340@debbugs.gnu.org; Thu, 02 Dec 2021 16:58:48 -0500 Original-Received: from smtp.soverin.net (unknown [10.10.3.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id EC23F66; Thu, 2 Dec 2021 21:58:38 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.138]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1638482317; bh=EgQz46ztQsWOhQRr9/6pD6bd2zrUSI4Vrq+EQyEcQHE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Q5JgzLcRepEcB6j3uBC30oFFFn2Ew9xVg4jqRx4Oh8ApHqIchX4E1GCR23MTG77bs RZ7wiP+aToHbIme/Vzx/TmwnMZWPZs85kmsBnZkM1yccZ/e6/6ak5UBZZkcX4xy+7L SS0ryAG9YTHI3X51iV7y4CVaakWdwnvac4gnT02o+WKsxyH5z64lFL8bWSKGg2Ysio d7XJV1NPkAQDSwYU9RwF7aCApQ3fIbnDE4Yv1tUJz7yVj5nUtaPUrNRVEWkPDjTofz 8zLXQH8Jr1II7OtJ+AtTuOogBNSPg3ihfC46714H1qkOPezvOr4ITbQ8R02DEOA+5A Chg3MiEL6JLMg== Original-Received: from alan by faroe.holly.idiocy.org with local (Exim 4.95-RC2) (envelope-from ) id 1msu67-000xjz-Dm; Thu, 02 Dec 2021 21:58:35 +0000 Mail-Followup-To: Alan Third , Lars Ingebrigtsen , Stefan Monnier , Glenn Morris , 21340@debbugs.gnu.org, Harvey Chapman Content-Disposition: inline In-Reply-To: <878rx373ps.fsf@gnus.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:221349 Archived-At: On Thu, Dec 02, 2021 at 10:31:27AM +0100, Lars Ingebrigtsen wrote: > Stefan Monnier writes: > > > Or to define a system-move-file-to-trash, which defers to the > > (presumably existing) system function that does that for us. > > Alan, do you know whether this would make sense on Macos? > > If not, then I think Glenn's suggestion here makes sense, i.e., add: > > (if (eq system-type 'darwin) "~/.Trash/") It looks like there's a method available to trash items on macOS 10.8 and above, so I suppose that's the logical thing to use. https://developer.apple.com/documentation/foundation/nsfilemanager/1414306-trashitematurl?language=objc macOS < 10.8 uses some Carbon API, which I'd rather not bother with, and GNUstep doesn't support it at all, so I imagine it's as well using the XDG location or whatever the default is. -- Alan Third