all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Leo <sdl.web@gmail.com>, emacs-devel@gnu.org
Subject: Re: delete-file to trash
Date: Sat, 22 May 2010 20:09:44 -0400	[thread overview]
Message-ID: <877hmvxyuv.fsf@stupidchicken.com> (raw)
In-Reply-To: <jwviq6grcux.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Fri, 21 May 2010 20:38:28 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> I still maintain a more suitable approach is to have delete-file not
>> move to trash bin unless explicitly called for. For example, it can be
>> implemented similarly to handle-shift-selection.
>
> I agree.  Instead of a `force' arg to opt-out, we should either use
> a new function for "move-to-trash" or use an opt-in arg like
> `move-to-trash'.

Yes, the situation is unsatisfactory.

It's now clear that the majority of calls to `delete-file' in Emacs need
the FORCE argument.  Even if we successfully audit all calls to
`delete-file' in our tree, third-party code will still be doing spurious
trashing.  This is probably more annoying to Emacs users than spurious
deleting.

So, it seems better to flip the new FORCE argument to delete-file.  We
could change it to an argument ALLOW-TRASH, and change the doc of
delete-by-moving-to-trash to say that it will only take effect on calls
to `delete-file' that use the ALLOW-TRASH argument.  This is backward
incompatible but I don't see any better solution.

If we do this, I'd also like to turn the trash on by default, on systems
where there is a trash (i.e. on Windows, and on machines where a
Freedesktop trash is detected).

(It was probably a mistake to include the trashing feature, the first
time, without turning it on by default.  If we'd done that, the problems
would have been clarified much more quickly, and we could have figured
out something more appropriate.)



  reply	other threads:[~2010-05-23  0:09 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-21 19:48 delete-file to trash Leo
2010-05-21 20:15 ` Tassilo Horn
2010-05-21 20:57   ` Leo
2010-05-21 21:12   ` Lennart Borgman
2010-05-21 21:32     ` Tassilo Horn
2010-05-21 21:44       ` Lennart Borgman
2010-05-21 21:58         ` Tassilo Horn
2010-05-21 22:13           ` Lennart Borgman
2010-05-21 23:14             ` Andreas Schwab
2010-05-22  5:36         ` Eli Zaretskii
2010-05-22 10:25           ` Lennart Borgman
2010-05-22  5:37       ` Eli Zaretskii
2010-05-22  9:17         ` Tassilo Horn
2010-05-21 21:39 ` Eli Zaretskii
2010-05-21 21:46   ` Lennart Borgman
2010-05-22  0:52   ` Stefan Monnier
2010-05-22  6:42     ` Adrian Robert
2010-05-22 13:03       ` Stefan Monnier
2010-05-22 19:37         ` Adrian Robert
2010-05-23  1:03           ` Stefan Monnier
2010-05-23 14:54           ` Harald Hanche-Olsen
2010-05-24 13:17             ` Stefan Monnier
2010-05-22  7:32     ` Stephen J. Turnbull
2010-05-22  1:00   ` Drew Adams
2010-05-22  1:50   ` Leo
2010-05-22  0:38 ` Stefan Monnier
2010-05-23  0:09   ` Chong Yidong [this message]
2010-05-23  0:27     ` David De La Harpe Golden
2010-05-23  1:06     ` Stefan Monnier
2010-05-23  2:16       ` Chong Yidong
2010-05-23  5:00         ` David Kastrup
2010-05-23  8:57         ` Leo
2010-05-23 13:37         ` Stefan Monnier
2010-05-23 23:20           ` Chong Yidong
2010-05-24 13:16             ` Stefan Monnier
2010-05-24 14:02               ` Leo
2010-05-27 23:36       ` Chong Yidong
2010-05-28 13:44         ` Michael Albinus
2010-05-28 17:29           ` Chong Yidong
2010-05-30 18:37         ` Juri Linkov
2010-05-23  8:20     ` Leo
2010-05-23 10:00       ` Lennart Borgman
2010-05-23 10:15         ` Leo
2010-05-23 11:12           ` Lennart Borgman
2010-05-23 12:14             ` Leo
2010-05-23 12:23               ` Lennart Borgman
2010-05-23 13:39         ` Stefan Monnier
2010-05-23 13:53           ` Lennart Borgman

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=877hmvxyuv.fsf@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=sdl.web@gmail.com \
    /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.