unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Third <alan@idiocy.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Glenn Morris <rgm@gnu.org>, Harvey Chapman <hchapman@3gfp.com>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	21340@debbugs.gnu.org
Subject: bug#21340: 24.5; trash-directory uses FreeDesktop location on OSX
Date: Thu, 2 Dec 2021 21:58:35 +0000	[thread overview]
Message-ID: <YalBi7rhmQPI6a20@idiocy.org> (raw)
In-Reply-To: <878rx373ps.fsf@gnus.org>

On Thu, Dec 02, 2021 at 10:31:27AM +0100, Lars Ingebrigtsen wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> 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





  reply	other threads:[~2021-12-02 21:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-24 16:55 bug#21340: 24.5; trash-directory uses FreeDesktop location on OSX Harvey Chapman
2015-08-24 17:32 ` Eli Zaretskii
2015-08-24 17:49   ` Harvey Chapman
2015-08-24 18:03     ` Eli Zaretskii
2015-08-25  1:55       ` Glenn Morris
2015-08-25 22:18         ` Stefan Monnier
2021-12-02  9:31           ` Lars Ingebrigtsen
2021-12-02 21:58             ` Alan Third [this message]
2021-12-03 16:16               ` Lars Ingebrigtsen
2021-12-03 23:02                 ` Alan Third
2021-12-03 23:11                   ` Lars Ingebrigtsen
2021-12-04 10:45                     ` Alan Third

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YalBi7rhmQPI6a20@idiocy.org \
    --to=alan@idiocy.org \
    --cc=21340@debbugs.gnu.org \
    --cc=hchapman@3gfp.com \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rgm@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).