all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David De La Harpe Golden <david@harpegolden.net>
To: emacs-devel@gnu.org
Subject: Re: Why @#! is not Emacs using the Recycle bin on w32?
Date: Sun, 31 Aug 2008 07:55:51 +0100	[thread overview]
Message-ID: <48BA4077.5040309@harpegolden.net> (raw)
In-Reply-To: <87abetkg7j.fsf@anzu.internal.golden-gryphon.com>

I don't even _like_ trashcans, sigh...

Manoj Srivastava wrote:
[quoted out of order]
> Sure, I can graft on a trash can, not just to my fvwm based UI,
> but also to the console (smallish hack to the unlink system call), but
> assuming that such addenda exist would be ... dangerous.

I don't think we're really talking about _that_ sort of trashcan
implementation (see: libtrash). (They also tend to hoard too many files
- using heavy-handed heuristics like "it was in /tmp" to decide whether
a file is a temporary/system file that shouldn't be backed up to trash
when an app unlinks something - only the individual app or user really
knows that for sure...)

But... why would we or should we assume that sort of trash exists or
otherwise?  And wouldn't it be pretty much emacs-transparent anyway?
What could emacs do about it?

The discussion is about emacs' (existing) support for emacs' "deleting"
to trashcans that need (or are basically instantiated by!) _explicit_
application support, where there is an operation or sequence of
operations distinct from a simple unlink() that an application uses to
explictly try to move something to trash rather than truly deleting it.
Like <<google searches>> Windows [1], MacOSX [2] and
Freedesktop.org-specced [3] ones.

[1] http://msdn.microsoft.com/en-us/magazine/cc301415.aspx
(midway down page, SHFileOperation)
[2] NSWorkspaceRecycleOperation
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWorkspace_Class/Reference/Reference.html#//apple_ref/doc/c_ref/NSWorkspaceRecycleOperation
[3] http://www.freedesktop.org/wiki/Specifications/trash-spec
(though presumably apps coded against e.g. the GNOME or KDE framework
APIs should be reusing the relevant framework implementation of that
spec rather than reimplementing it. Emacs isn't one of those apps though)


>         Nevertheless, if you assume that Emacs is running in an
>  environment where there is a trashcan, you will be incorrect.
>

How much does that matter?

If a user turns on emacs' support for his platforms' trashcan*, the
trashcan is either:

Already there,

Or maybe, as per fd.o trashcan spec, emacs creates "it" (that is to say,
its specced on-disk representation) upon use if it's not,

Or emacs fails to create and/or use it and being an interactive
application with a UI and all, can say so and ask the user what to do.
"Trashcan unusable because XYZ. Irreversibly delete?"

Having it on by default would violate longtime-emacs-user expectations
IMO (and be yet another thing for me to turn off in my .emacs), but
suggesting much in the way of dire consequences in the event a trashcan
doesn't or can't exist but emacs tries to use one is quite unwarranted.

If it's on-by-default there are small problems, undoubtedly - most
likely, emacs creating and using a trashcan without the user realising**
or wanting it to, or, less likely, hitting the user with a "Trashcan
unusable..." query as above.  On a practical level, that doesn't seem
very much different to emacs causing ~/.emacs.d to spring into existence
though, or its habit of leaving backup~ files strewn about.

Also, the user might not have any means to comfortably browse and
restore from the trashcan emacs creates and/or uses if they don't use
other programs with a trashcan browser, though hacking dired to provide
an emacs-internal trash view looks pretty doable on
freedesktop.org-trashcan-using systems (looks harder on macosx and
windows, but hey, both of those virtually always have a system trashcan
browser).  Another way of looking at that case is that in the absence
of any other platform trashcan, emacs could be said to be using an
fd.o-compliant interoperable trashcan as the "emacs platform" trashcan.

* and remember, some basic support is already in-tree, though presently
seems to me to be quite broken on my desktop - that has to be fixed
before considering turning it on by default. Actually, it has to be
fixed regardless...

** Though "File Deleted" messages could be changed to "Moved to Trash"
when it is used...





  reply	other threads:[~2008-08-31  6:55 UTC|newest]

Thread overview: 119+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-28 22:37 Why @#! is not Emacs using the Recycle bin on w32? Lennart Borgman (gmail)
2008-08-28 23:41 ` Michael Ekstrand
2008-08-29  0:16   ` Lennart Borgman (gmail)
2008-08-28 23:42 ` David De La Harpe Golden
2008-08-28 23:48   ` Lennart Borgman (gmail)
2008-08-28 23:54 ` Jason Rumney
2008-08-29  0:06   ` Lennart Borgman (gmail)
2008-08-29  5:39     ` Jason Rumney
2008-08-29  6:51       ` Lennart Borgman (gmail)
2008-08-29  7:52     ` Eli Zaretskii
2008-08-29  7:58       ` Lennart Borgman (gmail)
2008-08-29  8:06         ` Eli Zaretskii
2008-08-29  8:17           ` Lennart Borgman (gmail)
2008-08-29  9:24             ` Eli Zaretskii
2008-08-29  9:43               ` David House
2008-08-29 10:16                 ` Eli Zaretskii
2008-08-29 13:26                   ` Lennart Borgman (gmail)
2008-08-29 14:36                     ` Eli Zaretskii
2008-08-29 15:06                     ` Drew Adams
2008-08-29 15:11                       ` Juanma Barranquero
2008-08-29 16:28                         ` Drew Adams
2008-08-29 15:39                       ` Alan Mackenzie
2008-08-29 16:32                         ` Drew Adams
2008-08-29 16:43                           ` David House
2008-08-29 22:12                             ` René Kyllingstad
2008-08-30  0:29                               ` David House
2008-08-30  0:33                                 ` Lennart Borgman (gmail)
2008-08-30  1:58                                   ` David House
2008-08-31  2:32                         ` Sean Sieger
2008-08-31  2:34                           ` Lennart Borgman (gmail)
2008-08-31  3:28                             ` Sean Sieger
2008-08-29 19:58                       ` Taylor Venable
2008-08-29 20:08                         ` Lennart Borgman (gmail)
2008-08-29 20:46                           ` Taylor Venable
2008-08-29 21:00                             ` Lennart Borgman (gmail)
2008-08-29 21:59                               ` Phil Jackson
2008-08-29 22:12                                 ` Lennart Borgman (gmail)
2008-08-29 23:43                                   ` Miles Bader
2008-08-30  9:49                                   ` Phil Jackson
2008-08-30 10:18                                     ` Alan Mackenzie
2008-08-30 10:43                                       ` Phil Jackson
2008-08-30 20:41                                     ` Lennart Borgman (gmail)
2008-08-30 14:03                                   ` Taylor Venable
2008-08-30 14:11                                     ` Lennart Borgman (gmail)
2008-08-30 22:32                                       ` Manoj Srivastava
2008-08-30 22:40                                         ` Lennart Borgman (gmail)
2008-08-31  3:35                                           ` Manoj Srivastava
2008-08-31  3:49                                             ` Lennart Borgman (gmail)
2008-08-30 23:04                                         ` David De La Harpe Golden
2008-08-31  3:37                                           ` Manoj Srivastava
2008-08-31  6:55                                             ` David De La Harpe Golden [this message]
2008-08-31  6:59                                               ` Alfred M. Szmidt
2008-08-31  9:31                                                 ` David De La Harpe Golden
2008-08-31 13:51                                                   ` Alfred M. Szmidt
2008-08-31 15:04                                                     ` Lennart Borgman (gmail)
2008-08-31 16:38                                                       ` Alfred M. Szmidt
2008-08-31 17:43                                                         ` David De La Harpe Golden
2008-08-31 20:25                                                         ` Lennart Borgman (gmail)
2008-08-31 10:46                                               ` David De La Harpe Golden
2008-08-29 20:12                         ` Drew Adams
2008-08-29 23:43                         ` David De La Harpe Golden
2008-08-30  0:21                           ` Lennart Borgman (gmail)
2008-08-30  2:16                             ` David De La Harpe Golden
2008-08-30  5:10                               ` tomas
2008-08-30 21:26                                 ` David De La Harpe Golden
2008-08-31  4:53                                   ` tomas
2008-08-31 12:25                                     ` Lennart Borgman (gmail)
2008-08-31 16:51                                       ` tomas
2008-08-31 20:22                                         ` Lennart Borgman (gmail)
2008-09-01  4:33                                           ` tomas
2008-08-29 10:41                 ` Jason Rumney
2008-08-29 11:35                   ` martin rudalics
2008-08-29 12:16                   ` David House
2008-08-29 13:22                   ` Lennart Borgman (gmail)
2008-08-29 13:45               ` Lennart Borgman (gmail)
2008-08-29 14:00                 ` Jason Rumney
2008-08-29 16:16             ` Francis Litterio
2008-08-29  9:19   ` David De La Harpe Golden
2008-08-29  8:16 ` David House
2008-08-29  8:18   ` Lennart Borgman (gmail)
2008-08-29  8:31     ` David House
2008-08-29  8:39       ` Lennart Borgman (gmail)
2008-08-29 10:01 ` Werner LEMBERG
2008-08-29 13:28   ` Lennart Borgman (gmail)
2008-08-30 18:37     ` Werner LEMBERG
2008-08-31 12:31       ` Lennart Borgman (gmail)
2008-08-31 19:26         ` Richard M. Stallman
2008-08-31 21:49         ` Werner LEMBERG
2008-08-29 10:57 ` Phil Jackson
2008-08-29 14:35   ` Eli Zaretskii
2008-08-29 18:37 ` Johannes Weiner
2008-08-29 19:59   ` Lennart Borgman (gmail)
2008-08-30  9:11     ` Johannes Weiner
2008-08-30 12:42       ` Lennart Borgman (gmail)
2008-08-30 13:26         ` Johannes Weiner
2008-08-30 13:58           ` Lennart Borgman (gmail)
2008-08-30 15:06             ` Johannes Weiner
2008-08-30 17:23               ` René Kyllingstad
2008-08-30 20:40               ` Lennart Borgman (gmail)
2008-08-29 22:37   ` Thomas Lord
2008-08-30  3:11     ` Stephen J. Turnbull
2008-08-30  9:40       ` Alan Mackenzie
2008-08-30 10:11         ` Eli Zaretskii
2008-08-30 15:03         ` Jason Rumney
2008-08-30 20:22           ` Lennart Borgman (gmail)
2008-08-30  9:36     ` Johannes Weiner
2008-08-31  1:30       ` Richard M. Stallman
2008-08-31  6:22         ` Johannes Weiner
2008-08-29 20:24 ` Gilaras Drakeson
2008-08-29 20:56   ` Drew Adams
2008-08-29 21:05     ` Lennart Borgman (gmail)
2008-08-29 21:11       ` Drew Adams
2008-08-29 21:13         ` Lennart Borgman (gmail)
2008-08-29 21:20           ` Drew Adams
2008-08-29 21:54             ` Lennart Borgman (gmail)
2008-08-29 22:20               ` Drew Adams
2008-08-29 22:25                 ` Lennart Borgman (gmail)
2008-08-29 22:17   ` René Kyllingstad
2008-08-30  3:14     ` Stephen J. Turnbull

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

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

  git send-email \
    --in-reply-to=48BA4077.5040309@harpegolden.net \
    --to=david@harpegolden.net \
    --cc=emacs-devel@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.