From unknown Tue Jun 24 05:08:59 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#21340 <21340@debbugs.gnu.org> To: bug#21340 <21340@debbugs.gnu.org> Subject: Status: 24.5; trash-directory uses FreeDesktop location on OSX Reply-To: bug#21340 <21340@debbugs.gnu.org> Date: Tue, 24 Jun 2025 12:08:59 +0000 retitle 21340 24.5; trash-directory uses FreeDesktop location on OSX reassign 21340 emacs submitter 21340 Harvey Chapman severity 21340 minor tag 21340 moreinfo thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 24 13:22:01 2015 Received: (at submit) by debbugs.gnu.org; 24 Aug 2015 17:22:01 +0000 Received: from localhost ([127.0.0.1]:37165 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZTvRY-00056P-2o for submit@debbugs.gnu.org; Mon, 24 Aug 2015 13:22:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45791) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZTv1y-0004Un-Hb for submit@debbugs.gnu.org; Mon, 24 Aug 2015 12:55:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZTv1w-00042C-D4 for submit@debbugs.gnu.org; Mon, 24 Aug 2015 12:55:34 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:59804) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTv1w-00041n-9x for submit@debbugs.gnu.org; Mon, 24 Aug 2015 12:55:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTv1u-0004PJ-Fv for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2015 12:55:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZTv1p-0003sN-CU for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2015 12:55:30 -0400 Received: from cdptpa-outbound-snat.email.rr.com ([107.14.166.231]:14493 helo=cdptpa-oedge-vip.email.rr.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTv1p-0003pA-3Z for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2015 12:55:25 -0400 Received: from [72.187.19.10] ([72.187.19.10:46107] helo=blue) by cdptpa-oedge02 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id EB/08-01473-B7C4BD55; Mon, 24 Aug 2015 16:55:23 +0000 Received: from localhost (localhost [127.0.0.1]) by blue (Postfix) with ESMTP id 7BD071080361 for ; Mon, 24 Aug 2015 12:55:22 -0400 (EDT) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at localdomain Received: from blue ([127.0.0.1]) by localhost (blue.localdomain [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F+1NqjnS5--m for ; Mon, 24 Aug 2015 12:55:21 -0400 (EDT) Received: from [192.168.25.142] (rrcs-67-79-147-138.se.biz.rr.com [67.79.147.138]) by blue (Postfix) with ESMTPSA id 7050D1080264 for ; Mon, 24 Aug 2015 12:55:21 -0400 (EDT) From: Harvey Chapman Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: 24.5; trash-directory uses FreeDesktop location on OSX Message-Id: Date: Mon, 24 Aug 2015 12:55:19 -0400 To: bug-gnu-emacs@gnu.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) X-Mailer: Apple Mail (2.2104) X-RR-Connecting-IP: 107.14.168.130:25 X-Cloudmark-Score: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 24 Aug 2015 13:21:58 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.3 (----) I set "(setq delete-by-moving-to-trash t)", and emacs moved deleted files to ~/.local/share/Trash, the FreeDesktop location. The files should have been moved to ~/.Trash, the standard OSX location. I was deleting files in my home directory using dired. Work around: (setq trash-directory "~/.Trash") I get emacs from http://emacsformacosx.com/ In GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21) of 2015-04-10 on builder10-9.porkrind.org Windowing system distributor `Apple', version 10.3.1348 Configured using: `configure --with-ns '--enable-locallisppath=3D/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp'' Important settings: locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: subword-mode: t show-paren-mode: t savehist-mode: t which-function-mode: t desktop-save-mode: t override-global-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent messages: Loading sh-script...done Setting up indent for shell type sh Indentation variables are now local. Indentation setup for shell type sh Loading ruby-mode...done Wrote /Users/hchapman/.emacs.d/desktop/.emacs.desktop.lock Desktop: 18 buffers restored. For information about GNU Emacs and the GNU system, type C-h C-a. Trashing...done Making completion list... Load-path shadows: ~/.emacs.d/lisp/go-mode.el/go-mode hides ~/.emacs.d/lisp/go-mode ~/.emacs.d/lisp/expand-region hides = /Users/hchapman/.emacs.d/elpa/expand-region-20150525.205/expand-region ~/.emacs.d/lisp/helm/helm hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm ~/.emacs.d/lisp/helm/helm-utils hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-utils ~/.emacs.d/lisp/helm/helm-tags hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-tags ~/.emacs.d/lisp/helm/helm-sys hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-sys ~/.emacs.d/lisp/helm/helm-source hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-source ~/.emacs.d/lisp/helm/helm-semantic hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-semantic ~/.emacs.d/lisp/helm/helm-ring hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-ring ~/.emacs.d/lisp/helm/helm-regexp hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-regexp ~/.emacs.d/lisp/helm/helm-plugin hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-plugin ~/.emacs.d/lisp/helm/helm-pkg hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-pkg ~/.emacs.d/lisp/helm/helm-org hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-org ~/.emacs.d/lisp/helm/helm-net hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-net ~/.emacs.d/lisp/helm/helm-mode hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-mode ~/.emacs.d/lisp/helm/helm-misc hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-misc ~/.emacs.d/lisp/helm/helm-match-plugin hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-match-plugin ~/.emacs.d/lisp/helm/helm-man hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-man ~/.emacs.d/lisp/helm/helm-locate hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-locate ~/.emacs.d/lisp/helm/helm-info hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-info ~/.emacs.d/lisp/helm/helm-imenu hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-imenu ~/.emacs.d/lisp/helm/helm-help hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-help ~/.emacs.d/lisp/helm/helm-grep hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-grep ~/.emacs.d/lisp/helm/helm-font hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-font ~/.emacs.d/lisp/helm/helm-files hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-files ~/.emacs.d/lisp/helm/helm-external hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-external ~/.emacs.d/lisp/helm/helm-eval hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-eval ~/.emacs.d/lisp/helm/helm-eshell hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-eshell ~/.emacs.d/lisp/helm/helm-elscreen hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-elscreen ~/.emacs.d/lisp/helm/helm-elisp hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-elisp ~/.emacs.d/lisp/helm/helm-elisp-package hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-elisp-package ~/.emacs.d/lisp/helm/helm-dabbrev hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-dabbrev ~/.emacs.d/lisp/helm/helm-config hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-config ~/.emacs.d/lisp/helm/helm-command hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-command ~/.emacs.d/lisp/helm/helm-color hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-color ~/.emacs.d/lisp/helm/helm-buffers hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-buffers ~/.emacs.d/lisp/helm/helm-bookmark hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-bookmark ~/.emacs.d/lisp/helm/helm-autoloads hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-autoloads ~/.emacs.d/lisp/helm/helm-apt hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-apt ~/.emacs.d/lisp/helm/helm-aliases hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-aliases ~/.emacs.d/lisp/helm/helm-adaptive hides = /Users/hchapman/.emacs.d/elpa/helm-20150622.857/helm-adaptive ~/.emacs.d/lisp/desktop hides = /Users/hchapman/Applications/Emacs.app/Contents/Resources/lisp/desktop Features: (shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils help-mode ruby-mode sh-script smie executable conf-mode vc-git cc-langs cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs dired vc-hg superword subword advice markdown-mode noutline outline go-mode derived find-file ffap thingatpt etags metar url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse auth-source eieio byte-opt eieio-core gnus-util mm-util mail-prsvr password-cache url-vars mailcap solar cal-dst cal-menu calendar cal-loaddefs rx format-spec calc-units calc-ext calc calc-loaddefs calc-macs paren savehist cus-start cus-load which-func imenu xcscope ring easymenu desktop comint-scroll-to-bottom undo-tree help-fns diff edmacro kmacro server use-package cl-macs cl gv diminish bytecomp byte-compile cl-extra cconv bind-key easy-mmode cl-loaddefs cl-lib package epg-config time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process cocoa ns multi-tty emacs) Memory information: ((conses 16 271724 10178) (symbols 48 33317 0) (miscs 40 440 257) (strings 32 58404 7719) (string-bytes 1 1639691) (vectors 16 22480) (vector-slots 8 536265 7901) (floats 8 439 229) (intervals 56 1291 0) (buffers 960 30)) From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 24 13:32:26 2015 Received: (at 21340) by debbugs.gnu.org; 24 Aug 2015 17:32:26 +0000 Received: from localhost ([127.0.0.1]:37180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZTvbe-0005Nt-2h for submit@debbugs.gnu.org; Mon, 24 Aug 2015 13:32:26 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:48459) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZTvbb-0005Nk-7L for 21340@debbugs.gnu.org; Mon, 24 Aug 2015 13:32:24 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NTL00M00KLQP900@a-mtaout20.012.net.il> for 21340@debbugs.gnu.org; Mon, 24 Aug 2015 20:32:17 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NTL00MDTKPTDJ70@a-mtaout20.012.net.il>; Mon, 24 Aug 2015 20:32:17 +0300 (IDT) Date: Mon, 24 Aug 2015 20:32:05 +0300 From: Eli Zaretskii Subject: Re: bug#21340: 24.5; trash-directory uses FreeDesktop location on OSX In-reply-to: X-012-Sender: halo1@inter.net.il To: Harvey Chapman Message-id: <831tesh9t6.fsf@gnu.org> References: X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 21340 Cc: 21340@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Harvey Chapman > Date: Mon, 24 Aug 2015 12:55:19 -0400 > > I set "(setq delete-by-moving-to-trash t)", and emacs moved > deleted files to ~/.local/share/Trash, the FreeDesktop location. As expected. > The files should have been moved to ~/.Trash, the standard OSX > location. I was deleting files in my home directory using dired. > > Work around: (setq trash-directory "~/.Trash") You need to customize that variable to point to the directory where you want your trash. The doc string says: Directory for `move-file-to-trash' to move files and directories to. This directory is only used when the function `system-move-file-to-trash' is not defined. Relative paths are interpreted relative to `default-directory'. If the value is nil, Emacs uses a freedesktop.org-style trashcan. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The default is nil, so what you see is Emacs functioning as designed. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 24 13:49:39 2015 Received: (at 21340) by debbugs.gnu.org; 24 Aug 2015 17:49:39 +0000 Received: from localhost ([127.0.0.1]:37186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZTvsI-0005li-RL for submit@debbugs.gnu.org; Mon, 24 Aug 2015 13:49:39 -0400 Received: from cdptpa-outbound-snat.email.rr.com ([107.14.166.231]:15937 helo=cdptpa-oedge-vip.email.rr.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZTvsG-0005la-PT for 21340@debbugs.gnu.org; Mon, 24 Aug 2015 13:49:37 -0400 Received: from [72.187.19.10] ([72.187.19.10:46378] helo=blue) by cdptpa-oedge01 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id 30/1A-30648-E295BD55; Mon, 24 Aug 2015 17:49:35 +0000 Received: from localhost (localhost [127.0.0.1]) by blue (Postfix) with ESMTP id 6A3A81080361; Mon, 24 Aug 2015 13:49:34 -0400 (EDT) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at localdomain Received: from blue ([127.0.0.1]) by localhost (blue.localdomain [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 53hpcbCKojJm; Mon, 24 Aug 2015 13:49:33 -0400 (EDT) Received: from [192.168.25.142] (rrcs-67-79-147-138.se.biz.rr.com [67.79.147.138]) by blue (Postfix) with ESMTPSA id A79D410802A7; Mon, 24 Aug 2015 13:49:33 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: bug#21340: 24.5; trash-directory uses FreeDesktop location on OSX From: Harvey Chapman In-Reply-To: <831tesh9t6.fsf@gnu.org> Date: Mon, 24 Aug 2015 13:49:33 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <70E8D053-E9ED-4E5A-8BB4-36BDA8B4BDA8@3gfp.com> References: <831tesh9t6.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.2104) X-RR-Connecting-IP: 107.14.168.118:25 X-Cloudmark-Score: 0 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 21340 Cc: 21340@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) > On Aug 24, 2015, at 1:32 PM, Eli Zaretskii wrote: >=20 >> From: Harvey Chapman >> Date: Mon, 24 Aug 2015 12:55:19 -0400 >>=20 >> I set "(setq delete-by-moving-to-trash t)", and emacs moved >> deleted files to ~/.local/share/Trash, the FreeDesktop location. >=20 > As expected. >=20 >> The files should have been moved to ~/.Trash, the standard OSX >> location. I was deleting files in my home directory using dired. >>=20 >> Work around: (setq trash-directory "~/.Trash") >=20 > You need to customize that variable to point to the directory where > you want your trash. The doc string says: >=20 > Directory for `move-file-to-trash' to move files and directories = to. > This directory is only used when the function = `system-move-file-to-trash' > is not defined. > Relative paths are interpreted relative to `default-directory'. > If the value is nil, Emacs uses a freedesktop.org-style trashcan. > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >=20 > The default is nil, so what you see is Emacs functioning as designed. I guess I considered it a bug, because `system-move-file-to-trash` is used by Emacs for Windows to put files in the correct location. If Emacs can cater to Windows, surely it can cater to another very largely used OS? Emacs putting files in ~/.local on OSX just makes it appear that it doesn=E2=80=99t know what it is doing. Thank you all the same. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 24 14:04:15 2015 Received: (at 21340) by debbugs.gnu.org; 24 Aug 2015 18:04:15 +0000 Received: from localhost ([127.0.0.1]:37195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZTw6R-00066x-Bg for submit@debbugs.gnu.org; Mon, 24 Aug 2015 14:04:15 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]:41946) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZTw6P-00066n-0R for 21340@debbugs.gnu.org; Mon, 24 Aug 2015 14:04:14 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NTL00A00M3TPN00@a-mtaout21.012.net.il> for 21340@debbugs.gnu.org; Mon, 24 Aug 2015 21:04:11 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NTL00ACEM6ZNV40@a-mtaout21.012.net.il>; Mon, 24 Aug 2015 21:04:11 +0300 (IDT) Date: Mon, 24 Aug 2015 21:03:59 +0300 From: Eli Zaretskii Subject: Re: bug#21340: 24.5; trash-directory uses FreeDesktop location on OSX In-reply-to: <70E8D053-E9ED-4E5A-8BB4-36BDA8B4BDA8@3gfp.com> X-012-Sender: halo1@inter.net.il To: Harvey Chapman Message-id: <83y4h0ftrk.fsf@gnu.org> References: <831tesh9t6.fsf@gnu.org> <70E8D053-E9ED-4E5A-8BB4-36BDA8B4BDA8@3gfp.com> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 21340 Cc: 21340@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Harvey Chapman > Date: Mon, 24 Aug 2015 13:49:33 -0400 > Cc: 21340@debbugs.gnu.org > > > If the value is nil, Emacs uses a freedesktop.org-style trashcan. > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > > > The default is nil, so what you see is Emacs functioning as designed. > > I guess I considered it a bug, because `system-move-file-to-trash` is > used by Emacs for Windows to put files in the correct location. If Emacs > can cater to Windows, surely it can cater to another very largely used > OS? It doesn't cater to Windows, it caters to any platform that has a 'system-move-file-to-trash' primitive (which is supposed to know the location of trash internally), and Windows just happens to have it. When such a primitive is not available, Emacs moves the file using the "normal" file I/O, and then it has to know where to move it. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 24 21:55:34 2015 Received: (at 21340) by debbugs.gnu.org; 25 Aug 2015 01:55:34 +0000 Received: from localhost ([127.0.0.1]:37328 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZU3SY-0000Iq-6Z for submit@debbugs.gnu.org; Mon, 24 Aug 2015 21:55:34 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44829) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZU3SV-0000Ii-Vd for 21340@debbugs.gnu.org; Mon, 24 Aug 2015 21:55:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZU3SU-00083a-Un for 21340@debbugs.gnu.org; Mon, 24 Aug 2015 21:55:31 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60684) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZU3SR-000839-RD; Mon, 24 Aug 2015 21:55:27 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1ZU3SR-0007d7-05; Mon, 24 Aug 2015 21:55:27 -0400 From: Glenn Morris To: Eli Zaretskii Subject: Re: bug#21340: 24.5; trash-directory uses FreeDesktop location on OSX References: <831tesh9t6.fsf@gnu.org> <70E8D053-E9ED-4E5A-8BB4-36BDA8B4BDA8@3gfp.com> <83y4h0ftrk.fsf@gnu.org> X-Spook: Cartel Tuberculosis Warning Chemical Botnet Mutation X-Ran: F?"d/bi\>-Ew.Q~w?PkXF%("@Voa->z]|/@IK@MJe_:RU<=a+]gBXOmfq@Q!f^y]$tj?cI X-Hue: red X-Debbugs-No-Ack: yes X-Attribution: GM Date: Mon, 24 Aug 2015 21:55:26 -0400 In-Reply-To: <83y4h0ftrk.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 24 Aug 2015 21:03:59 +0300") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 21340 Cc: Harvey Chapman , 21340@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) I don't use OS X, but it sounds to like it would be better to change the default value of trash-directory to (if (eq system-type 'darwin) "~/.Trash/") From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 25 18:18:43 2015 Received: (at 21340) by debbugs.gnu.org; 25 Aug 2015 22:18:43 +0000 Received: from localhost ([127.0.0.1]:38345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZUMYF-000747-7g for submit@debbugs.gnu.org; Tue, 25 Aug 2015 18:18:43 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:48112) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZUMYD-00073z-8v for 21340@debbugs.gnu.org; Tue, 25 Aug 2015 18:18:41 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AsEwA731xV/5P+d0tcgxCEAoVVuzcJh0sEAgKBPDkUAQEBAQEBAYEKQQWDXQEBAwFWIwULCw4mEhQYDSSINwjPIwEBAQEGAQEBAR6LOoUFB4QtBbM/gUUjYYMzIoJ4AQEB X-IPAS-Result: A0AsEwA731xV/5P+d0tcgxCEAoVVuzcJh0sEAgKBPDkUAQEBAQEBAYEKQQWDXQEBAwFWIwULCw4mEhQYDSSINwjPIwEBAQEGAQEBAR6LOoUFB4QtBbM/gUUjYYMzIoJ4AQEB X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="161374090" Received: from 75-119-254-147.dsl.teksavvy.com (HELO ceviche.home) ([75.119.254.147]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 25 Aug 2015 18:18:40 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 3AEF06620D; Tue, 25 Aug 2015 18:18:40 -0400 (EDT) From: Stefan Monnier To: Glenn Morris Subject: Re: bug#21340: 24.5; trash-directory uses FreeDesktop location on OSX Message-ID: References: <831tesh9t6.fsf@gnu.org> <70E8D053-E9ED-4E5A-8BB4-36BDA8B4BDA8@3gfp.com> <83y4h0ftrk.fsf@gnu.org> Date: Tue, 25 Aug 2015 18:18:40 -0400 In-Reply-To: (Glenn Morris's message of "Mon, 24 Aug 2015 21:55:26 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 21340 Cc: Eli Zaretskii , Harvey Chapman , 21340@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > I don't use OS X, but it sounds to like it would be better to change the > default value of trash-directory to > (if (eq system-type 'darwin) "~/.Trash/") Or to define a system-move-file-to-trash, which defers to the (presumably existing) system function that does that for us. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 02 04:31:40 2021 Received: (at 21340) by debbugs.gnu.org; 2 Dec 2021 09:31:40 +0000 Received: from localhost ([127.0.0.1]:46617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msiRI-0002Rb-8p for submit@debbugs.gnu.org; Thu, 02 Dec 2021 04:31:40 -0500 Received: from quimby.gnus.org ([95.216.78.240]:36514) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msiRG-0002M6-P1 for 21340@debbugs.gnu.org; Thu, 02 Dec 2021 04:31:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=To1hiLmqwEoincF3fhtj3qrIhcRGDtxAlOwQ8j9ANrY=; b=o0pY6k/JmQbHd0/JCoeoSL789Y SPUxcjaH6Pai/ACWA7T28pEoN0ju18qxPtDigI6bMEwSh9KHmShAVEOa5Tle1KC7aGE8gNpfinryx 54hheoJEhz7iERdxDKVZNMUZ3GZorJ09QahylG41V8YBY2RRAX1Q+E/JFHU1zNM/dBKw=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1msiR5-0007q4-Pz; Thu, 02 Dec 2021 10:31:30 +0100 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#21340: 24.5; trash-directory uses FreeDesktop location on OSX References: <831tesh9t6.fsf@gnu.org> <70E8D053-E9ED-4E5A-8BB4-36BDA8B4BDA8@3gfp.com> <83y4h0ftrk.fsf@gnu.org> X-Now-Playing: Lives Of Angels's _Cold Waves of Color Volume 6_: "Artificial Ignorance" Date: Thu, 02 Dec 2021 10:31:27 +0100 In-Reply-To: (Stefan Monnier's message of "Tue, 25 Aug 2015 18:18:40 -0400") Message-ID: <878rx373ps.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: 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? Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 21340 Cc: Glenn Morris , Eli Zaretskii , Harvey Chapman , Alan Third , 21340@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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/") -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 02 04:31:43 2021 Received: (at control) by debbugs.gnu.org; 2 Dec 2021 09:31:43 +0000 Received: from localhost ([127.0.0.1]:46620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msiRL-0002UC-FX for submit@debbugs.gnu.org; Thu, 02 Dec 2021 04:31:43 -0500 Received: from quimby.gnus.org ([95.216.78.240]:36526) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msiRJ-0002Og-UC for control@debbugs.gnu.org; Thu, 02 Dec 2021 04:31:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=HTbvc2avcBSZNfpLxWGTBTKhdUdfNEkxHP92QMJgIos=; b=YYsKOMe6A+HX2SlWe1UplfXBF4 ocyz0AUh+qatM7xORpaYeUU94moqDCbjOyucr6E4mP8RlSyChMsHLjhBREi/rCKggQRT0PZx355A4 QxrMq7NJVTKw53EzbSg2yu6MpVS6gs9Pqev0G5Yat571uLQSptYmlb9PjV1CAjD/b7gY=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1msiRB-0007qB-UF for control@debbugs.gnu.org; Thu, 02 Dec 2021 10:31:36 +0100 Date: Thu, 02 Dec 2021 10:31:33 +0100 Message-Id: <877dcn73pm.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #21340 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 21340 + moreinfo quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 21340 + moreinfo quit From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 02 16:58:51 2021 Received: (at 21340) by debbugs.gnu.org; 2 Dec 2021 21:58:51 +0000 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 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 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) 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== 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 Date: Thu, 2 Dec 2021 21:58:35 +0000 From: Alan Third To: Lars Ingebrigtsen Subject: Re: bug#21340: 24.5; trash-directory uses FreeDesktop location on OSX Message-ID: Mail-Followup-To: Alan Third , Lars Ingebrigtsen , Stefan Monnier , Glenn Morris , 21340@debbugs.gnu.org, Harvey Chapman 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 Content-Disposition: inline In-Reply-To: <878rx373ps.fsf@gnus.org> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21340 Cc: Glenn Morris , Harvey Chapman , Stefan Monnier , 21340@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) 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 From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 03 11:16:34 2021 Received: (at 21340) by debbugs.gnu.org; 3 Dec 2021 16:16:34 +0000 Received: from localhost ([127.0.0.1]:52058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtBEf-00039L-VB for submit@debbugs.gnu.org; Fri, 03 Dec 2021 11:16:34 -0500 Received: from quimby.gnus.org ([95.216.78.240]:53948) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtBEd-000336-Qq for 21340@debbugs.gnu.org; Fri, 03 Dec 2021 11:16:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=M7f6s6uI3Yo34ws/PGVKAGIZzVaHamwW5lmBM2NV9Dg=; b=fCyEbxWNufCCX/AUQytO155u2N zcsExbgKx7EuPF25iJqKkvRM+dl+IvlYNadxVx8tYLtFe/aWDUlLgt+LPgz0VJsH5ckDTIDQvMTiD Hc2aYgV/6SkiOyJ1apFHM9wcUTdfknf5HQ9zFPfYLOvozHSfFR5rxLzY2Y24T0nxwpSc=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mtBES-0004NU-SC; Fri, 03 Dec 2021 17:16:23 +0100 From: Lars Ingebrigtsen To: Alan Third Subject: Re: bug#21340: 24.5; trash-directory uses FreeDesktop location on OSX References: <831tesh9t6.fsf@gnu.org> <70E8D053-E9ED-4E5A-8BB4-36BDA8B4BDA8@3gfp.com> <83y4h0ftrk.fsf@gnu.org> <878rx373ps.fsf@gnus.org> X-Now-Playing: Joni Mitchell's _Blue_: "A Case Of You" Date: Fri, 03 Dec 2021 17:16:20 +0100 In-Reply-To: (Alan Third's message of "Thu, 2 Dec 2021 21:58:35 +0000") Message-ID: <871r2ty88b.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Alan Third writes: > 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/nsfilemanage [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 21340 Cc: Glenn Morris , Harvey Chapman , Stefan Monnier , 21340@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Alan Third writes: > 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. Sounds good to me. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 03 18:02:47 2021 Received: (at 21340) by debbugs.gnu.org; 3 Dec 2021 23:02:48 +0000 Received: from localhost ([127.0.0.1]:52382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtHZn-0008PL-KI for submit@debbugs.gnu.org; Fri, 03 Dec 2021 18:02:47 -0500 Received: from outbound.soverin.net ([116.202.126.228]:46533) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtHZj-0008P4-6p for 21340@debbugs.gnu.org; Fri, 03 Dec 2021 18:02:46 -0500 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 2433D185; Fri, 3 Dec 2021 23:02:37 +0000 (UTC) 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=1638572555; bh=6G5h7sEMAtqz/4x+E7oc88lsoNyYPeWLEGmAKl9nhUY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=irgfIzxncgRMWbHc5dXCrZVByjN3GcQePdc0YuxSmbpMGPENok6+LU/+gPtBi0P2z SvMqZAbjs3uJuYYsVZTE5HSctVdcw/63yfkDXcWLQEifiLm7tq5+i8+ssvxpZnqxGE pk/nj/wYWo7vMG77R/4UzZxSpLgVoFtJEHlO6MYYWvFmVE/V4Sm3ns5fsASKOsvVT3 BOHqmA0ZCBcelxw+VQocsHPljgr5h2rD5zlW8ZHWmcsvZ/v4ZwI4jX3Jqbr6Cmfd6M rWXoCfQ4bQEJhgSKqVCLjqiZoH5ks5W/RWzM/Eebm2TB3cPE3iAtAm+7KY0EI/mAmp 9PYVAQIEDunmQ== Received: from alan by faroe.holly.idiocy.org with local (Exim 4.95-RC2) (envelope-from ) id 1mtHZX-0012JN-9t; Fri, 03 Dec 2021 23:02:31 +0000 Date: Fri, 3 Dec 2021 23:02:31 +0000 From: Alan Third To: Lars Ingebrigtsen Subject: Re: bug#21340: 24.5; trash-directory uses FreeDesktop location on OSX Message-ID: Mail-Followup-To: Alan Third , Lars Ingebrigtsen , Stefan Monnier , Glenn Morris , 21340@debbugs.gnu.org, Harvey Chapman References: <831tesh9t6.fsf@gnu.org> <70E8D053-E9ED-4E5A-8BB4-36BDA8B4BDA8@3gfp.com> <83y4h0ftrk.fsf@gnu.org> <878rx373ps.fsf@gnus.org> <871r2ty88b.fsf@gnus.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="6VuuRn9pgF44ENJz" Content-Disposition: inline In-Reply-To: <871r2ty88b.fsf@gnus.org> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21340 Cc: Glenn Morris , Harvey Chapman , Stefan Monnier , 21340@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --6VuuRn9pgF44ENJz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Dec 03, 2021 at 05:16:20PM +0100, Lars Ingebrigtsen wrote: > Alan Third writes: > > > 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. > > Sounds good to me. Well, I've written a patch but the function doesn't appear in lisp and I don't know what I've done wrong. Patch attached. -- Alan Third --6VuuRn9pgF44ENJz Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-Make-use-of-Trash-on-macOS-bug-21340.patch" >From 4f21ff07ad9b9d06960a9ea6d000e0636f49c3d1 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Fri, 3 Dec 2021 22:17:45 +0000 Subject: [PATCH] Make use of Trash on macOS (bug#21340) * src/nsfns.m (Fsystem_move_file_to_trash): New function. --- src/nsfns.m | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/src/nsfns.m b/src/nsfns.m index c2791aa15a..5e319e1915 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -2362,6 +2362,47 @@ Frames are listed from topmost (first) to bottommost (last). */) ========================================================================== */ +#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 +/* Moving files to the system recycle bin. + Used by `move-file-to-trash' instead of the default moving to ~/.Trash */ +DEFUN ("system-move-file-to-trash", Fsystem_move_file_to_trash, + Ssystem_move_file_to_trash, 1, 1, 0, + doc: /* Move file or directory named FILENAME to the recycle bin. */) + (Lisp_Object filename) +{ + Lisp_Object handler; + Lisp_Object operation; + + operation = Qdelete_file; + if (!NILP (Ffile_directory_p (filename)) + && NILP (Ffile_symlink_p (filename))) + { + operation = intern ("delete-directory"); + filename = Fdirectory_file_name (filename); + } + + /* Must have fully qualified file names for moving files to Trash. */ + filename = Fexpand_file_name (filename, Qnil); + + handler = Ffind_file_name_handler (filename, operation); + if (!NILP (handler)) + return call2 (handler, operation, filename); + else + { + NSFileManager *fm = [NSFileManager defaultManager]; + BOOL result = NO; + NSURL *fileURL = [NSURL fileURLWithPath:[NSString stringWithLispString:filename] + isDirectory:!NILP (Ffile_directory_p (filename))]; + if ([fm respondsToSelector:@selector(trashItemAtURL:resultingItemURL:error:)]) + result = [fm trashItemAtURL:fileURL resultingItemURL:nil error:nil]; + + if (!result) + report_file_error ("Removing old name", list1 (filename)); + } + return Qnil; +} +#endif + DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0, doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object color, Lisp_Object frame) -- 2.33.0 --6VuuRn9pgF44ENJz-- From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 03 18:11:33 2021 Received: (at 21340) by debbugs.gnu.org; 3 Dec 2021 23:11:33 +0000 Received: from localhost ([127.0.0.1]:52400 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtHiG-0000Ax-OS for submit@debbugs.gnu.org; Fri, 03 Dec 2021 18:11:33 -0500 Received: from quimby.gnus.org ([95.216.78.240]:57556) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtHi2-0000AV-GZ for 21340@debbugs.gnu.org; Fri, 03 Dec 2021 18:11:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=4zLCGZ+/yJU1OKBV9x3CKixKHHwpKdzkEBwWaI2acVU=; b=u44gWDFAylNw8d6iJoXSfifrYo 0+N0d58/IodvAeKYeo4kgJKGlE+ytyKmmj4Ak2R3oQCMCssyJMzSoQzvlgIMDKAtzS5I7d2uQ5SvM aCl1Lt+CJ623q337I72WQQ1kcFdRcsxMvCR2lywW2YX+94I+qzm4gjoCiYhwiL6YtbYA=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mtHhp-0007Bd-S7; Sat, 04 Dec 2021 00:11:08 +0100 From: Lars Ingebrigtsen To: Alan Third Subject: Re: bug#21340: 24.5; trash-directory uses FreeDesktop location on OSX References: <831tesh9t6.fsf@gnu.org> <70E8D053-E9ED-4E5A-8BB4-36BDA8B4BDA8@3gfp.com> <83y4h0ftrk.fsf@gnu.org> <878rx373ps.fsf@gnus.org> <871r2ty88b.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAKlBMVEUQDBAnERdaHyWm ZSzlkCxfbYoyKS8lGyZ2krmOpcdRUV83N0lIQEz///+TTnCNAAAAAWJLR0QN9rRh9QAAAAd0SU1F B+UMAxcFAU4BE1gAAAGgSURBVDjLdZKxboJQFIbPXSBRB64mNbELpUkfQHwDfYAuJMYJh2LSMsAC SdMHsG+gm2mC0SsDEzWdSAeaoA/VewHbcqBnuCH34z//fw4A/FvdW70s7bdUDnqjSVkjfTwejSf8 mKh/FUNNMy4K5aeh5PNDfjUD7HRl8ZfkdbSPmoC2q4NrDoimq40KRV5F+wRPMxTm66QO7kqwqd5T z8tTbXYIeCzNFZsjAv2AFXMckQcJ2MIVHg84bsZ8L5WXDSDse6m3ip5NBFgo+Vm23HoOBgfJGWRT 44QAYQfLBTKdnZGHbLDUBXCoS2sg5gB8l1SBZMxi3l3B308A0SrEYaFdgGWAVgWdz1k6BwhOWwRa n7niq+bReWNCAbQGwlAoQMG5OizM56hJ2ueTVYuaz3GOrXx9ChpSsixfaQKy33fFDXEQIArltlQh LsFWAhBqmyTB4EYIByZgBREAXiIEWllCRSR7jjx663tKuLmFW/V0tQBz4lRAVxMA4HGB1tjViu19 vFcFJeDmW7R3Sovfxo4RIGVr26otvgBPC2guz788fQNjUYa4+UzhwgAAACV0RVh0ZGF0ZTpjcmVh dGUAMjAyMS0xMi0wM1QyMzowNTowMCswMDowMJki6FAAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEt MTItMDNUMjM6MDU6MDArMDA6MDDof1DsAAAAAElFTkSuQmCC X-Now-Playing: Depeche Mode's _Black Celebration_: "World Full of Nothing" Date: Sat, 04 Dec 2021 00:11:04 +0100 In-Reply-To: (Alan Third's message of "Fri, 3 Dec 2021 23:02:31 +0000") Message-ID: <871r2tthbr.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Alan Third writes: > Well, I've written a patch but the function doesn't appear in lisp and > I don't know what I've done wrong. I think you're just missing the defsubr for the symbol: Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21340 Cc: Glenn Morris , Harvey Chapman , Stefan Monnier , 21340@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Alan Third writes: > Well, I've written a patch but the function doesn't appear in lisp and > I don't know what I've done wrong. I think you're just missing the defsubr for the symbol: defsubr (&Ssystem_move_file_to_trash); -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 04 05:46:07 2021 Received: (at 21340-done) by debbugs.gnu.org; 4 Dec 2021 10:46:07 +0000 Received: from localhost ([127.0.0.1]:52959 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtSYQ-0007yF-Qe for submit@debbugs.gnu.org; Sat, 04 Dec 2021 05:46:06 -0500 Received: from outbound.soverin.net ([116.202.126.228]:44167) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtSYP-0007xZ-38 for 21340-done@debbugs.gnu.org; Sat, 04 Dec 2021 05:46:05 -0500 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 1C51681F; Sat, 4 Dec 2021 10:45:59 +0000 (UTC) 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=1638614757; bh=Ammt3b6lgK5pkFlpbu5Gz2LS1PjTxeUkI7MvlEQIPkI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JYIj/cegg7IMIiDXh5eucXDPvMLhtydWBKPftIp2bjOnlsFe8ttG1Pf+uTMqx1mo9 oRW8bVJQsRnBuhRLTKXP/HNn99TZQdx7EJwVppCFlIRIvBDy2nkuO/JT/JLOnQtFwP eUVjWX9ruglkPJp+u+dTCdmVG2kn0oIMYRaqKqd83yhnU3SwQCrGA5vvrHtjCDc9wl iKGulcZszmUNckYefG6kW5SBx7wflNsx380Fue2y+m37f9VQvTFe/PgY7v2eRmd2om cpfLF8KI9JgjBcdbOzBvxrO+ceAIdxC7qnWhkqUZrui/90RF+ZgF2Tj/4J33Z3cteN rU9h28UIazF0w== Received: from alan by faroe.holly.idiocy.org with local (Exim 4.95-RC2) (envelope-from ) id 1mtSYD-0014ag-Cp; Sat, 04 Dec 2021 10:45:53 +0000 Date: Sat, 4 Dec 2021 10:45:53 +0000 From: Alan Third To: Lars Ingebrigtsen Subject: Re: bug#21340: 24.5; trash-directory uses FreeDesktop location on OSX Message-ID: Mail-Followup-To: Alan Third , Lars Ingebrigtsen , Stefan Monnier , Glenn Morris , 21340-done@debbugs.gnu.org, Harvey Chapman References: <831tesh9t6.fsf@gnu.org> <70E8D053-E9ED-4E5A-8BB4-36BDA8B4BDA8@3gfp.com> <83y4h0ftrk.fsf@gnu.org> <878rx373ps.fsf@gnus.org> <871r2ty88b.fsf@gnus.org> <871r2tthbr.fsf@gnus.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <871r2tthbr.fsf@gnus.org> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21340-done Cc: Glenn Morris , Harvey Chapman , Stefan Monnier , 21340-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Sat, Dec 04, 2021 at 12:11:04AM +0100, Lars Ingebrigtsen wrote: > Alan Third writes: > > > Well, I've written a patch but the function doesn't appear in lisp and > > I don't know what I've done wrong. > > I think you're just missing the defsubr for the symbol: > > defsubr (&Ssystem_move_file_to_trash); That was it, thank you! I've pushed this change to master. -- Alan Third From unknown Tue Jun 24 05:08:59 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 01 Jan 2022 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator