* # in my waste basket
@ 2009-10-13 21:24 Lennart Borgman
2009-10-14 7:09 ` Tassilo Horn
0 siblings, 1 reply; 5+ messages in thread
From: Lennart Borgman @ 2009-10-13 21:24 UTC (permalink / raw
To: Emacs-Devel devel
I was one of those that really think using the waste basket by default
is TRT. But do really all those #some.thing# files have to go there by
default?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: # in my waste basket
2009-10-13 21:24 # in my waste basket Lennart Borgman
@ 2009-10-14 7:09 ` Tassilo Horn
2009-10-14 10:23 ` Stephen J. Turnbull
0 siblings, 1 reply; 5+ messages in thread
From: Tassilo Horn @ 2009-10-14 7:09 UTC (permalink / raw
To: Lennart Borgman; +Cc: Emacs-Devel devel
Lennart Borgman <lennart.borgman@gmail.com> writes:
Hi Lennart,
> I was one of those that really think using the waste basket by default
> is TRT.
Ditto.
> But do really all those #some.thing# files have to go there by
> default?
Yeah, backup files that get deleted by the backup cleaning process
shouldn't be moved to the freedesktop trash can. And the same applies
to the thousands of cached news articles that get expired when I clean
the gnus agent cache.
I'm pretty sure, there are many more exceptions, like all the png files
that get deleted when I clean my doc-view cache...
IMO, moving files to the trash can should be done only if a user does it
interactively in dired or by invoking things like delete-file directly.
On the other hand, when I do M-x gnus-agent-expire it is also an
interactive call, but there I don't want to move the cached files to the
trash...
Bye,
Tassilo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: # in my waste basket
2009-10-14 7:09 ` Tassilo Horn
@ 2009-10-14 10:23 ` Stephen J. Turnbull
2009-10-14 13:18 ` Stefan Monnier
0 siblings, 1 reply; 5+ messages in thread
From: Stephen J. Turnbull @ 2009-10-14 10:23 UTC (permalink / raw
To: Tassilo Horn; +Cc: Lennart Borgman, Emacs-Devel devel
Tassilo Horn writes:
> IMO, moving files to the trash can should be done only if a user
> does it interactively in dired or by invoking things like
> delete-file directly.
`delete-file' should make the decision based on whether it is
called-interactively-p. `dired-remove-file' can use
`call-interactively' to pass that information to it. Dired is a
special case, since it acts as a "UI agent" for the user.
> On the other hand, when I do M-x gnus-agent-expire it is also an
> interactive call,
But the calls to `delete-file' it makes are *not*
called-interactively-p.
I won't say this works for sure, but I think there's a pretty good
chance that it does. (Ie, Dired is unusual in needing to use
`call-interactively' to DTRT.)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: # in my waste basket
2009-10-14 10:23 ` Stephen J. Turnbull
@ 2009-10-14 13:18 ` Stefan Monnier
2009-10-14 16:50 ` Wild idea for call-interactively [was: # in my waste basket] Stephen J. Turnbull
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2009-10-14 13:18 UTC (permalink / raw
To: Stephen J. Turnbull; +Cc: Tassilo Horn, Lennart Borgman, Emacs-Devel devel
> `delete-file' should make the decision based on whether it is
> called-interactively-p. `dired-remove-file' can use
> `call-interactively' to pass that information to it.
But with call-interactively, it can't specify the file to delete.
Maybe a better way is to have 2 functions. A low-level one (what used
to be `delete-file') that is not meant for interactive use and that is
a file operation, and a higher-level one for interactive use which is
not a file operation and which uses the Trash if applicable.
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Wild idea for call-interactively [was: # in my waste basket]
2009-10-14 13:18 ` Stefan Monnier
@ 2009-10-14 16:50 ` Stephen J. Turnbull
0 siblings, 0 replies; 5+ messages in thread
From: Stephen J. Turnbull @ 2009-10-14 16:50 UTC (permalink / raw
To: Stefan Monnier; +Cc: Emacs-Devel devel
Stefan Monnier writes:
> But with call-interactively, it can't specify the file to delete.
D'oh. WIBNI you could? Ie, a list of arguments is passed to
call-interactively along with the function to call. If an argument is
non-nil, it is used as is. If it is nil, then call-interactively
consults the interactive spec to find out how to get that argument.
Or MIWNBN (maybe it would not be nice).
BTW, I guess if the interactive spec is a function, then
call-interactively calls the police instead, and you go to jail. :-)
Or maybe it calls the function as usual and ignores the passed
arguments. Or ... well, this is way too speculative. Make it an
error to pass args to a function with an function for interactive spec.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-10-14 16:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-13 21:24 # in my waste basket Lennart Borgman
2009-10-14 7:09 ` Tassilo Horn
2009-10-14 10:23 ` Stephen J. Turnbull
2009-10-14 13:18 ` Stefan Monnier
2009-10-14 16:50 ` Wild idea for call-interactively [was: # in my waste basket] Stephen J. Turnbull
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.