unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Why @#! is not Emacs using the Recycle bin on w32?
@ 2008-08-28 22:37 Lennart Borgman (gmail)
  2008-08-28 23:41 ` Michael Ekstrand
                   ` (7 more replies)
  0 siblings, 8 replies; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-28 22:37 UTC (permalink / raw)
  To: Emacs Devel

I just deleted a file because I misunderstood dired. I needed that file
(of course).

And then I found that dired did not make any backup and did not use
windows Recycle bin.

This behaviour does not make me trust for example GNU/Linux. I would
beleive this is a behaviour implemented after how things work there. Is
this correct? Does Emacs behave this way on GNU/Linus too?




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 119+ messages in thread
From: Michael Ekstrand @ 2008-08-28 23:41 UTC (permalink / raw)
  To: emacs-devel

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
> I just deleted a file because I misunderstood dired. I needed that file
> (of course).
>
> And then I found that dired did not make any backup and did not use
> windows Recycle bin.

Recycle bins are a shell-level niceism that are not central to the
operating system.  If you type 'del file' at the Windows command prompt,
it will not use the recycle bin.

> This behaviour does not make me trust for example GNU/Linux. I would
> beleive this is a behaviour implemented after how things work there. Is
> this correct? Does Emacs behave this way on GNU/Linus too?

Yes.  Emacs, when it deletes a file, tells the operating system to
delete it.

The major desktop environments all provide a recycle bin-like feature
(usually called Trash) when you're using their file management
facilities, but this is not a function of the operating system itself.

I would say, however, that allowing this to cause you to not trust
GNU/Linux is a non sequitor.  Operating systems provide a "remove file"
function to applications, and on most of them (both Windows and the
Linux kernel included) actually remove the file when it is called.  To
move to a recycle bin, you need to use move or something like it to put
the file in the recycle bin.  Some applications do this.  Some do not.

- Michael

-- 
mouse, n: A device for pointing at the xterm in which you want to type.
Confused by the strange files?  I cryptographically sign my messages.
For more information see <http://www.elehack.net/resources/gpg>.





^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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-28 23:42 ` David De La Harpe Golden
  2008-08-28 23:48   ` Lennart Borgman (gmail)
  2008-08-28 23:54 ` Jason Rumney
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 119+ messages in thread
From: David De La Harpe Golden @ 2008-08-28 23:42 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: Emacs Devel

Lennart Borgman (gmail) wrote:
> I just deleted a file because I misunderstood dired. I needed that file
> (of course).
> 
> And then I found that dired did not make any backup and did not use
> windows Recycle bin.
>
> This behaviour does not make me trust for example GNU/Linux. I would
> beleive this is a behaviour implemented after how things work there. Is
> this correct? Does Emacs behave this way on GNU/Linus too?

Traditionally on unix and gnu+linux, when you say you want a file gone,
the system and programs believe you.  This is quite widely regarded as a
feature. And personally, I think trashcans just suck, they're a terrible
UI metaphor, apart from the security risks.  Things like
versioned/snapshotted filesystems with timeline views are so much neater.

That said, on typical gnu+linux desktops, there IS a trash can provided,
but emacs dired delete AFAIK doesn't use it.  It probably could (or
another "move to trash" command be provided) with relatively little
effort (nonetheless I'm not volunteering...), the spec is very simple
and widely adopted.
http://www.freedesktop.org/wiki/Specifications/trash-spec










^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-28 23:42 ` David De La Harpe Golden
@ 2008-08-28 23:48   ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-28 23:48 UTC (permalink / raw)
  To: David De La Harpe Golden; +Cc: Emacs Devel

David De La Harpe Golden wrote:
> Lennart Borgman (gmail) wrote:
>> I just deleted a file because I misunderstood dired. I needed that file
>> (of course).
>>
>> And then I found that dired did not make any backup and did not use
>> windows Recycle bin.
>>
>> This behaviour does not make me trust for example GNU/Linux. I would
>> beleive this is a behaviour implemented after how things work there. Is
>> this correct? Does Emacs behave this way on GNU/Linus too?
> 
> Traditionally on unix and gnu+linux, when you say you want a file gone,
> the system and programs believe you.  This is quite widely regarded as a
> feature. And personally, I think trashcans just suck, they're a terrible
> UI metaphor, 

Thanks, I would be glad for no lessons. Why do you think they suck? I
think it is a very good metaphor, easy to understand.

> apart from the security risks.

This is a much lesser risk than loosing your files. If you are handling
sensitive materials on a computer and do not know what you are doing
then ... ;-)

> Things like
> versioned/snapshotted filesystems with timeline views are so much neater.

Ok, I see. But if that not is used then trash cans are very good.

> That said, on typical gnu+linux desktops, there IS a trash can provided,
> but emacs dired delete AFAIK doesn't use it.  It probably could (or
> another "move to trash" command be provided) with relatively little
> effort (nonetheless I'm not volunteering...), the spec is very simple
> and widely adopted.
> http://www.freedesktop.org/wiki/Specifications/trash-spec

Thanks. I am sure it is easily equal on w32. Actually I think someone
proposed it a while ago. I really thought it was implemented.




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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-28 23:42 ` David De La Harpe Golden
@ 2008-08-28 23:54 ` Jason Rumney
  2008-08-29  0:06   ` Lennart Borgman (gmail)
  2008-08-29  9:19   ` David De La Harpe Golden
  2008-08-29  8:16 ` David House
                   ` (4 subsequent siblings)
  7 siblings, 2 replies; 119+ messages in thread
From: Jason Rumney @ 2008-08-28 23:54 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: Emacs Devel

Lennart Borgman (gmail) wrote:
> I just deleted a file because I misunderstood dired. I needed that file
> (of course).
>
> And then I found that dired did not make any backup and did not use
> windows Recycle bin.
>   

Of course not. The Recycle Bin is part of the Explorer shell, not a 
fundamental part of deleting files on the OS. If you go to a command 
prompt and type "del filename.txt" it will not use the Recycle Bin 
either, and nor will most other programs that delete files from outside 
of the Explorer shell.

However, someone submitted a patch some time ago to move files to the 
desktop's trash which works on Windows and with the common convention 
used by Gnome, KDE and Mac OSX. To use it you need to set 
`delete-by-moving-to-trash'.


> This behaviour does not make me trust for example GNU/Linux.

That is a strange statement, since you are not even using GNU/Linux.





^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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  7:52     ` Eli Zaretskii
  2008-08-29  9:19   ` David De La Harpe Golden
  1 sibling, 2 replies; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-29  0:06 UTC (permalink / raw)
  To: Jason Rumney; +Cc: Emacs Devel

Jason Rumney wrote:
> Lennart Borgman (gmail) wrote:
>> I just deleted a file because I misunderstood dired. I needed that file
>> (of course).
>>
>> And then I found that dired did not make any backup and did not use
>> windows Recycle bin.
>>   
> 
> Of course not. The Recycle Bin is part of the Explorer shell, not a
> fundamental part of deleting files on the OS. If you go to a command
> prompt and type "del filename.txt" it will not use the Recycle Bin
> either, and nor will most other programs that delete files from outside
> of the Explorer shell.

I am not sure but I would expect most programs to use the Recycle Bin.

> However, someone submitted a patch some time ago to move files to the
> desktop's trash which works on Windows and with the common convention
> used by Gnome, KDE and Mac OSX. To use it you need to set
> `delete-by-moving-to-trash'.

Thanks. Wouldn't it be good to have this as a default.

>> This behaviour does not make me trust for example GNU/Linux.
> 
> That is a strange statement, since you are not even using GNU/Linux.

Not so very strange. I just reflect that I get upset by this ;-)

Also from the point of view that we have had quite a few discussions
about the usefulness of having a program behave as a user expects on
that OS. As an example let me tell me what happened. I am rather unused
to dired though I use it sometimes.

However now I was a bit stressed and in that situation I fallback to
expect the behaviour I am used too. That is what you psychologically do
in those situations, there is nothing strange with that, but it is easy
to overlook the importance of it.

So I expected

- The Recycle Bin to be used.
- When I marked some files in dired I expected those files to be deleted
by D, not the file I happened to be positioned on. That is what
selection normally mean.

None of these expectation where of course true. I am quite sure I am not
the only user that has fallen into traps like these in stressed situations.

So I would say: Do what you user expect in the used environment. This is
more important the more experienced the user is because of the habits
that you actually use without thinking in stressed situations.




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-28 23:41 ` Michael Ekstrand
@ 2008-08-29  0:16   ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-29  0:16 UTC (permalink / raw)
  To: Michael Ekstrand; +Cc: emacs-devel

Michael Ekstrand wrote:
> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
>> I just deleted a file because I misunderstood dired. I needed that file
>> (of course).
>>
>> And then I found that dired did not make any backup and did not use
>> windows Recycle bin.
> 
> Recycle bins are a shell-level niceism that are not central to the
> operating system.  If you type 'del file' at the Windows command prompt,
> it will not use the recycle bin.

Thanks, yes, I know, but I don't understand why it is important here.

> Yes.  Emacs, when it deletes a file, tells the operating system to
> delete it.

Thanks.

> The major desktop environments all provide a recycle bin-like feature
> (usually called Trash) when you're using their file management
> facilities, but this is not a function of the operating system itself.
> 
> I would say, however, that allowing this to cause you to not trust
> GNU/Linux is a non sequitor.  Operating systems provide a "remove file"
> function to applications, and on most of them (both Windows and the
> Linux kernel included) actually remove the file when it is called.  To
> move to a recycle bin, you need to use move or something like it to put
> the file in the recycle bin.  Some applications do this.  Some do not.


On w32 you call a shell api with some flags. I would expect it to be
similar on other OS because this is a very central operation.

BTW David De La Harpe Golden mentioned versioning instead of recycle
bins. Some quick checks on the net showed that MS was moving in that
direction (maybe it is already in vista?). Of course I expect GNU/Linux
to do that to. And I actually expect the shells to use it too.




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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
  1 sibling, 1 reply; 119+ messages in thread
From: Jason Rumney @ 2008-08-29  5:39 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: Emacs Devel

Lennart Borgman (gmail) wrote:
> Thanks. Wouldn't it be good to have this as a default.
>   

While that might fit your expectations, it would break other peoples', 
with serious security implications if they really expect some file 
containing sensitive data to be deleted when they delete it from dired.





^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29  5:39     ` Jason Rumney
@ 2008-08-29  6:51       ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-29  6:51 UTC (permalink / raw)
  To: Jason Rumney; +Cc: Emacs Devel

Jason Rumney wrote:
> Lennart Borgman (gmail) wrote:
>> Thanks. Wouldn't it be good to have this as a default.
>>   
> 
> While that might fit your expectations, it would break other peoples',
> with serious security implications if they really expect some file
> containing sensitive data to be deleted when they delete it from dired.

Should not someone that has serious security concerns be aware of
recycle bins, caches etc?




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29  0:06   ` Lennart Borgman (gmail)
  2008-08-29  5:39     ` Jason Rumney
@ 2008-08-29  7:52     ` Eli Zaretskii
  2008-08-29  7:58       ` Lennart Borgman (gmail)
  1 sibling, 1 reply; 119+ messages in thread
From: Eli Zaretskii @ 2008-08-29  7:52 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: emacs-devel, jasonr

> Date: Fri, 29 Aug 2008 02:06:39 +0200
> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
> Cc: Emacs Devel <emacs-devel@gnu.org>
> 
> > However, someone submitted a patch some time ago to move files to the
> > desktop's trash which works on Windows and with the common convention
> > used by Gnome, KDE and Mac OSX. To use it you need to set
> > `delete-by-moving-to-trash'.
> 
> Thanks. Wouldn't it be good to have this as a default.

No, please don't!  Only Windows Explorer moves files to the Recycle
Bin by default, all the other programs I use, including the shell, do
not.  I don't want to relearn my habits just because Lennart doesn't
want to customize his .emacs.




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29  7:52     ` Eli Zaretskii
@ 2008-08-29  7:58       ` Lennart Borgman (gmail)
  2008-08-29  8:06         ` Eli Zaretskii
  0 siblings, 1 reply; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-29  7:58 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel, jasonr

Eli Zaretskii wrote:
>> Date: Fri, 29 Aug 2008 02:06:39 +0200
>> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
>> Cc: Emacs Devel <emacs-devel@gnu.org>
>>
>>> However, someone submitted a patch some time ago to move files to the
>>> desktop's trash which works on Windows and with the common convention
>>> used by Gnome, KDE and Mac OSX. To use it you need to set
>>> `delete-by-moving-to-trash'.
>> Thanks. Wouldn't it be good to have this as a default.
> 
> No, please don't!  Only Windows Explorer moves files to the Recycle
> Bin by default, all the other programs I use, including the shell, do
> not.  I don't want to relearn my habits just because Lennart doesn't
> want to customize his .emacs.

Who said I do not want to customize my .emacs?

A little bit more seriously, what is your argument? What harm does it
make to turn on this by default?

My impression is the opposite, that most well written w32 programs use
the Recycle Bin.




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29  7:58       ` Lennart Borgman (gmail)
@ 2008-08-29  8:06         ` Eli Zaretskii
  2008-08-29  8:17           ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 119+ messages in thread
From: Eli Zaretskii @ 2008-08-29  8:06 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: emacs-devel, jasonr

> Date: Fri, 29 Aug 2008 09:58:08 +0200
> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
> CC: jasonr@gnu.org, emacs-devel@gnu.org
> 
> Who said I do not want to customize my .emacs?

If you do, then making this the default should not be so important for
you.

This is a new feature, introduced just recently; prudence would have
it that we let the feature be used for some time before even thinking
to make it the default.  Especially since at least some of us here do
not share your enthusiasm for it.

> A little bit more seriously, what is your argument? What harm does it
> make to turn on this by default?

Jason explained one harm.  Another one is that I like my disks have
lots of free space, and don't expect deleted files to stay on them.

> My impression is the opposite, that most well written w32 programs use
> the Recycle Bin.

If you define a ``well written program'' as a program that use the
Bin, then I agree.  Otherwise, please give some examples of programs
that do and those which don't, and tell why you think the former are
more ``well written'' than the latter.




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-28 22:37 Why @#! is not Emacs using the Recycle bin on w32? Lennart Borgman (gmail)
                   ` (2 preceding siblings ...)
  2008-08-28 23:54 ` Jason Rumney
@ 2008-08-29  8:16 ` David House
  2008-08-29  8:18   ` Lennart Borgman (gmail)
  2008-08-29 10:01 ` Werner LEMBERG
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 119+ messages in thread
From: David House @ 2008-08-29  8:16 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: Emacs Devel

2008/8/28 Lennart Borgman (gmail) <lennart.borgman@gmail.com>:
> I just deleted a file because I misunderstood dired. I needed that file
> (of course).

But being a sensible user, you have backups, right?

-- 
-David




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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 16:16             ` Francis Litterio
  0 siblings, 2 replies; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-29  8:17 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel, jasonr

Eli Zaretskii wrote:
>> Date: Fri, 29 Aug 2008 09:58:08 +0200
>> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
>> CC: jasonr@gnu.org, emacs-devel@gnu.org
>>
>> Who said I do not want to customize my .emacs?
> 
> If you do, then making this the default should not be so important for
> you.
> 
> This is a new feature, introduced just recently; prudence would have
> it that we let the feature be used for some time before even thinking
> to make it the default.  Especially since at least some of us here do
> not share your enthusiasm for it.

In this case the new feature does not get in your way - unless of course
you are not used at all to using the Recycle Bin.

> Jason explained one harm.

The risk seems small to me on pc:s.

> Another one is that I like my disks have
> lots of free space, and don't expect deleted files to stay on them.

Yes, but do you really delete that many files from Emacs?

>> My impression is the opposite, that most well written w32 programs use
>> the Recycle Bin.
> 
> If you define a ``well written program'' as a program that use the
> Bin, then I agree.  Otherwise, please give some examples of programs
> that do and those which don't, and tell why you think the former are
> more ``well written'' than the latter.

One of my personal favorites is that the programs should follow the UI
guidelines for what the user normally see. That includes both GUI and
behaviour.

If you from any program on w32 that did not write its own file handling
dialogs open the file dialog and delete a file there it will go to the
Recycle Bin.

An example of a program that does not behave this way is GIMP. It has
written its own file dialogs. In my opinion that is the bad part of GIMP.

And sadly that is the part that probably most reminds of the GUI you can
see on GNU/Linux. But please correct me if I am wrong.




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29  8:16 ` David House
@ 2008-08-29  8:18   ` Lennart Borgman (gmail)
  2008-08-29  8:31     ` David House
  0 siblings, 1 reply; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-29  8:18 UTC (permalink / raw)
  To: David House; +Cc: Emacs Devel

David House wrote:
> 2008/8/28 Lennart Borgman (gmail) <lennart.borgman@gmail.com>:
>> I just deleted a file because I misunderstood dired. I needed that file
>> (of course).
> 
> But being a sensible user, you have backups, right?

Please do not try to be smart.




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29  8:18   ` Lennart Borgman (gmail)
@ 2008-08-29  8:31     ` David House
  2008-08-29  8:39       ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 119+ messages in thread
From: David House @ 2008-08-29  8:31 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: Emacs Devel

2008/8/29 Lennart Borgman (gmail) <lennart.borgman@gmail.com>:
>> But being a sensible user, you have backups, right?
>
> Please do not try to be smart.

Well, let's see. You accidentally deleted a file important to you, and
then sent an angry post to the mailing list. I'm suggesting what
happened was at least partially your fault, as you could have just
calmed down, restored from your backups, and gone on with your day.

Note that nothing in the above expresses an opinion as to whether
Emacs should delete using `rem' or by sending files to the Recycle
Bin. To be honest, I somewhat agree with you, I think Emacs' actions
should probably be reversible by default. The "Emacs didn't delete my
secure file" complaint isn't valid, I don't think, because if you're
deleting secure files, `dired-do-delete' as it stands still doesn't
properly delete them.

-- 
-David




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29  8:31     ` David House
@ 2008-08-29  8:39       ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-29  8:39 UTC (permalink / raw)
  To: David House; +Cc: Emacs Devel

David House wrote:
> 2008/8/29 Lennart Borgman (gmail) <lennart.borgman@gmail.com>:
>>> But being a sensible user, you have backups, right?
>> Please do not try to be smart.
> 
> Well, let's see. You accidentally deleted a file important to you, and
> then sent an angry post to the mailing list. I'm suggesting what
> happened was at least partially your fault, as you could have just
> calmed down, restored from your backups, and gone on with your day.

David, please. You are again suggesting that you know better than me in
this case. You do not.

Of course you are right, but there is nothing new in what you write. And
it does not help which I think you do realize.

> Note that nothing in the above expresses an opinion as to whether
> Emacs should delete using `rem' or by sending files to the Recycle
> Bin. To be honest, I somewhat agree with you, I think Emacs' actions
> should probably be reversible by default. The "Emacs didn't delete my
> secure file" complaint isn't valid, I don't think, because if you're
> deleting secure files, `dired-do-delete' as it stands still doesn't
> properly delete them.

Yes, that is my view too.




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-28 23:54 ` Jason Rumney
  2008-08-29  0:06   ` Lennart Borgman (gmail)
@ 2008-08-29  9:19   ` David De La Harpe Golden
  1 sibling, 0 replies; 119+ messages in thread
From: David De La Harpe Golden @ 2008-08-29  9:19 UTC (permalink / raw)
  To: Jason Rumney; +Cc: Lennart Borgman (gmail), Emacs Devel

Jason Rumney wrote:

> However, someone submitted a patch some time ago to move files to the
> desktop's trash which works on Windows and with the common convention
> used by Gnome, KDE and Mac OSX. To use it you need to set
> `delete-by-moving-to-trash'.


Ah. :-)

Mind you, it doesn't seem to work right at all on my system.   Seems to
be making a MacOSX-style .Trash dir* and then sometimes decides to add
hundreds of duplicate entries until a "Variable binding depth exceeds
max-specpdl-size" hits.   So, probably a bug or two, then.

* which, btw, I don't think is a common convention with MacOSX in this
case? GNOME Nautilus / KDE Konqueror / XFCE Thunar all seem to use the
fd.o specced trash scheme (.trashinfo undelete data etc.)































^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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 13:45               ` Lennart Borgman (gmail)
  2008-08-29 16:16             ` Francis Litterio
  1 sibling, 2 replies; 119+ messages in thread
From: Eli Zaretskii @ 2008-08-29  9:24 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: emacs-devel, jasonr

> Date: Fri, 29 Aug 2008 10:17:15 +0200
> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
> CC: jasonr@gnu.org, emacs-devel@gnu.org
> > This is a new feature, introduced just recently; prudence would have
> > it that we let the feature be used for some time before even thinking
> > to make it the default.  Especially since at least some of us here do
> > not share your enthusiasm for it.
> 
> In this case the new feature does not get in your way - unless of course
> you are not used at all to using the Recycle Bin.

I'm used to be aware of the Recycle Bin and use it when I intend to.

> > Jason explained one harm.
> 
> The risk seems small to me on pc:s.

That's why we have customization in Emacs: because some people's needs
are different from others'.

> > Another one is that I like my disks have
> > lots of free space, and don't expect deleted files to stay on them.
> 
> Yes, but do you really delete that many files from Emacs?

I do everything from Emacs, even launch (God forbid!) Word.

> One of my personal favorites is that the programs should follow the UI
> guidelines for what the user normally see.

This is again a circular definition: we have no clear spec of ``what
the user normally see''.

> If you from any program on w32 that did not write its own file handling
> dialogs open the file dialog and delete a file there it will go to the
> Recycle Bin.

File deletion is not done only from dialogs.

> And sadly that is the part that probably most reminds of the GUI you can
> see on GNU/Linux. But please correct me if I am wrong.

As someone already said, most modern GNU/Linux desktops have a similar
feature.




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29  9:24             ` Eli Zaretskii
@ 2008-08-29  9:43               ` David House
  2008-08-29 10:16                 ` Eli Zaretskii
  2008-08-29 10:41                 ` Jason Rumney
  2008-08-29 13:45               ` Lennart Borgman (gmail)
  1 sibling, 2 replies; 119+ messages in thread
From: David House @ 2008-08-29  9:43 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: jasonr, Lennart Borgman (gmail), emacs-devel

2008/8/29 Eli Zaretskii <eliz@gnu.org>:
> That's why we have customization in Emacs: because some people's needs
> are different from others'.

That doesn't negate the need for good defaults, thought. Put it this
way -- why shouldn't you have to customise your Emacs to work the way
you want, rather than Lennart having to customise his?

So far, the only valid argument I've heard in favour of bypassing the
Recycle Bin is to conserve disk space. The argument for not bypassing
the Recycle Bin is that occasionally users may be surprised that their
files have been fully deleted, and may lose important information. It
seems to me that the second argument outweighs the first.

-- 
-David




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-28 22:37 Why @#! is not Emacs using the Recycle bin on w32? Lennart Borgman (gmail)
                   ` (3 preceding siblings ...)
  2008-08-29  8:16 ` David House
@ 2008-08-29 10:01 ` Werner LEMBERG
  2008-08-29 13:28   ` Lennart Borgman (gmail)
  2008-08-29 10:57 ` Phil Jackson
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 119+ messages in thread
From: Werner LEMBERG @ 2008-08-29 10:01 UTC (permalink / raw)
  To: lennart.borgman; +Cc: emacs-devel


> And then I found that dired did not make any backup and did not use
> windows Recycle bin.

Hmm.

> This behaviour does not make me trust for example GNU/Linux.  I
> would beleive this is a behaviour implemented after how things work
> there. Is this correct?  Does Emacs behave this way on GNU/Linus
> too?

I use the `libtrash' library very successfully to prevent accidental
data loss (since I mainly work on the console which never uses the
trash folder of the GUI).


    Werner




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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 10:41                 ` Jason Rumney
  1 sibling, 1 reply; 119+ messages in thread
From: Eli Zaretskii @ 2008-08-29 10:16 UTC (permalink / raw)
  To: David House; +Cc: jasonr, lennart.borgman, emacs-devel

> Date: Fri, 29 Aug 2008 10:43:22 +0100
> From: "David House" <dmhouse@gmail.com>
> Cc: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>, emacs-devel@gnu.org, 
> 	jasonr@gnu.org
> 
> 2008/8/29 Eli Zaretskii <eliz@gnu.org>:
> > That's why we have customization in Emacs: because some people's needs
> > are different from others'.
> 
> That doesn't negate the need for good defaults, thought.

I didn't say otherwise.  All I said was that a feature introduced just
a couple of months ago and which is not unanimously thought to be a
good one, should be left as optional until we have enough user
experience to make it the default.

> So far, the only valid argument I've heard in favour of bypassing the
> Recycle Bin is to conserve disk space. The argument for not bypassing
> the Recycle Bin is that occasionally users may be surprised that their
> files have been fully deleted, and may lose important information. It
> seems to me that the second argument outweighs the first.

We are talking about Emacs here.  Emacs behavior was always that it
deletes a file, not moves it somewhere.  So any change in that
behavior _by_default_ will surprise Emacs users.




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29  9:43               ` David House
  2008-08-29 10:16                 ` Eli Zaretskii
@ 2008-08-29 10:41                 ` Jason Rumney
  2008-08-29 11:35                   ` martin rudalics
                                     ` (2 more replies)
  1 sibling, 3 replies; 119+ messages in thread
From: Jason Rumney @ 2008-08-29 10:41 UTC (permalink / raw)
  To: David House; +Cc: Eli Zaretskii, Lennart Borgman (gmail), emacs-devel

David House wrote:
> So far, the only valid argument I've heard in favour of bypassing the
> Recycle Bin is to conserve disk space.

Read my earlier mail on the subject. The Recycle Bin can be a security 
hole when users expect files to be deleted immediately, and when not 
using the Explorer (or standard File Dialog which is based on, and looks 
like Explorer) it is quite reasonable to expect Explorer's recycle bin 
to not be involved.

Talking of "bypassing the Recycle Bin" makes it sound like we have to do 
extra work to do not use the recycle bin. In fact the opposite is true, 
and I'm not aware of ANY non-system program other than Emacs that takes 
the trouble to use the Recycle Bin on Windows.

Basically Lennart is blaming his tools and misrepresenting the situation 
to cover his foolish mistake. 'D' in dired does delete the marked files 
as expected, not the file under the cursor as he claimed, and what's 
more it prompts you with a list of the files to be deleted and requires 
you to type Y-E-S <RET> before deleting anything.





^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-28 22:37 Why @#! is not Emacs using the Recycle bin on w32? Lennart Borgman (gmail)
                   ` (4 preceding siblings ...)
  2008-08-29 10:01 ` 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 20:24 ` Gilaras Drakeson
  7 siblings, 1 reply; 119+ messages in thread
From: Phil Jackson @ 2008-08-29 10:57 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: Emacs Devel

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:

> I just deleted a file because I misunderstood dired. I needed that file
> (of course).
>
> And then I found that dired did not make any backup and did not use
> windows Recycle bin.

[...]

As a side note, version control is so cheap and easy these days that
having your entire home directory under vc is often feasible. I /think/
git even works on Windows now.

 $ cd && git init && git add .

Cheers,
Phil
-- 
 Philip Jackson
 http://www.shellarchive.co.uk




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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)
  2 siblings, 0 replies; 119+ messages in thread
From: martin rudalics @ 2008-08-29 11:35 UTC (permalink / raw)
  To: Jason Rumney
  Cc: David House, Eli Zaretskii, Lennart Borgman (gmail), emacs-devel

 > I'm not aware of ANY non-system program other than Emacs that takes
 > the trouble to use the Recycle Bin on Windows.

All file-managers and packers on Windows I'm aware of (and I tested many
of them) use the Recycle Bin by default.  In general hitting DEL sends
the file to the Recycle Bin while Shift DEL deletes it irrevocably.

martin





^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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)
  2 siblings, 0 replies; 119+ messages in thread
From: David House @ 2008-08-29 12:16 UTC (permalink / raw)
  To: Jason Rumney; +Cc: Eli Zaretskii, Lennart Borgman (gmail), emacs-devel

2008/8/29 Jason Rumney <jasonr@gnu.org>:
> Read my earlier mail on the subject. The Recycle Bin can be a security hole
> when users expect files to be deleted immediately, and when not using the
> Explorer (or standard File Dialog which is based on, and looks like
> Explorer) it is quite reasonable to expect Explorer's recycle bin to not be
> involved.

That is not a security hole. If you delete a file using Emacs' current
deletion mechanism, the file is still recoverable. If you truly want
sensitive data gone, you need to use a different application anyway.

> Talking of "bypassing the Recycle Bin" makes it sound like we have to do
> extra work to do not use the recycle bin.

I did not intend that, sorry.

> In fact the opposite is true, and
> I'm not aware of ANY non-system program other than Emacs that takes the
> trouble to use the Recycle Bin on Windows.

This is only true of non-GUI applications, of course: most GUI
programs will use a standard Explorer shell for opening/exploring
files, and thus deleting files in them will use the Recycle Bin.
Whether dired is more of a GUI application or a command-line
application is obviously the source of confusion: Lennart expected it
to act like a GUI, whereas yourself and Eli expected it to act like a
command-line.

Choosing which system is preferable is tricky, but I'd say defaulting
to one that does the least harm is probably a safe bet.

-- 
-David




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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)
  2 siblings, 0 replies; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-29 13:22 UTC (permalink / raw)
  To: Jason Rumney; +Cc: David House, Eli Zaretskii, emacs-devel

Jason Rumney wrote:
> Basically Lennart is blaming his tools and misrepresenting the situation
> to cover his foolish mistake. 'D' in dired does delete the marked files
> as expected, not the file under the cursor as he claimed, and what's
> more it prompts you with a list of the files to be deleted and requires
> you to type Y-E-S <RET> before deleting anything.

Yeah, shoot the messenger! Who want to be disturbed in his dreams.

I told the cost of a user interface that is unexpected and I went to
some length explaining that.

You seem to have thrown that explanation in Emacs big Recycle Bin of
refuted ideas. I am glad it can't be deleted directly in free software
development ;-)

I am sure there is substans in what I wrote about.

I do not want any immediate reaction of course. It is food for thought.
Normally I do not write these essays. Part of the reason is simply that
I have found that communication often fails here when it comes to this
kind of issues. Now I was frustrated and did not care about that.
However I could have written nearly the same thing (minus the
frustration of course) at another occasion if I had time and could find
energy for it.




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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
  0 siblings, 2 replies; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-29 13:26 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: David House, jasonr, emacs-devel

Eli Zaretskii wrote:
> We are talking about Emacs here.  Emacs behavior was always that it
> deletes a file, not moves it somewhere.  So any change in that
> behavior _by_default_ will surprise Emacs users.

Then maybe a compromize could be to tell it in a prominent way so that
users have a good chance to notice it?




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 10:01 ` Werner LEMBERG
@ 2008-08-29 13:28   ` Lennart Borgman (gmail)
  2008-08-30 18:37     ` Werner LEMBERG
  0 siblings, 1 reply; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-29 13:28 UTC (permalink / raw)
  To: Werner LEMBERG; +Cc: emacs-devel

Werner LEMBERG wrote:
> I use the `libtrash' library very successfully to prevent accidental
> data loss (since I mainly work on the console which never uses the
> trash folder of the GUI).


Sounds interesting. At what level does it interface?




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29  9:24             ` Eli Zaretskii
  2008-08-29  9:43               ` David House
@ 2008-08-29 13:45               ` Lennart Borgman (gmail)
  2008-08-29 14:00                 ` Jason Rumney
  1 sibling, 1 reply; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-29 13:45 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel, jasonr

Eli Zaretskii wrote:
>>> Jason explained one harm.
>> The risk seems small to me on pc:s.
> 
> That's why we have customization in Emacs: because some people's needs
> are different from others'.

Yes, that is good. However I expect anyone seriously interested in
security to check those things in sleep.

> I do everything from Emacs, even launch (God forbid!) Word.

Sorry for that.

>> One of my personal favorites is that the programs should follow the UI
>> guidelines for what the user normally see.
> 
> This is again a circular definition: we have no clear spec of ``what
> the user normally see''.

Tail recursion? That we do not have a unanimous clear spec does not mean
we can't talk about it and can't move forward while we do. I meant my
little frustrated story as a step to better understand what UI
guidelines actually mean when they meat reality.

>> If you from any program on w32 that did not write its own file handling
>> dialogs open the file dialog and delete a file there it will go to the
>> Recycle Bin.
> 
> File deletion is not done only from dialogs.

No. But on w32 you can rather easily use the shell API (and I believe
actually shall if you follow the UI guidelines, but I am not sure). I
just tested with 7-zip and it asks me if I want to "send (the file) to
the Recycle Bin". (I kinda like "send" there.)

>> And sadly that is the part that probably most reminds of the GUI you can
>> see on GNU/Linux. But please correct me if I am wrong.
> 
> As someone already said, most modern GNU/Linux desktops have a similar
> feature.

I am glad to hear that. (In this case I am of course also complaining
about that GIMP does not do what a non-expert user on w32 expects, but I
am sure you are aware of that.)




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 13:45               ` Lennart Borgman (gmail)
@ 2008-08-29 14:00                 ` Jason Rumney
  0 siblings, 0 replies; 119+ messages in thread
From: Jason Rumney @ 2008-08-29 14:00 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: Eli Zaretskii, emacs-devel

Lennart Borgman (gmail) wrote:
> I am glad to hear that. (In this case I am of course also complaining
> about that GIMP does not do what a non-expert user on w32 expects, but I
> am sure you are aware of that.)
>   

I've never met a non-expert who would even think to delete a file from a 
file-open dialog.





^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 10:57 ` Phil Jackson
@ 2008-08-29 14:35   ` Eli Zaretskii
  0 siblings, 0 replies; 119+ messages in thread
From: Eli Zaretskii @ 2008-08-29 14:35 UTC (permalink / raw)
  To: Phil Jackson; +Cc: lennart.borgman, emacs-devel

> From: Phil Jackson <phil@shellarchive.co.uk>
> Date: Fri, 29 Aug 2008 11:57:43 +0100
> Cc: Emacs Devel <emacs-devel@gnu.org>
> 
> As a side note, version control is so cheap and easy these days that
> having your entire home directory under vc is often feasible. I /think/
> git even works on Windows now.

git is an overkill if what needed is local file version control.  RCS
is much simpler and smaller, and on Windows doesn't need to install a
port of Bash, which means MSYS, which means trouble.




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 13:26                   ` Lennart Borgman (gmail)
@ 2008-08-29 14:36                     ` Eli Zaretskii
  2008-08-29 15:06                     ` Drew Adams
  1 sibling, 0 replies; 119+ messages in thread
From: Eli Zaretskii @ 2008-08-29 14:36 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: dmhouse, jasonr, emacs-devel

> Date: Fri, 29 Aug 2008 15:26:29 +0200
> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
> CC: David House <dmhouse@gmail.com>, emacs-devel@gnu.org, jasonr@gnu.org
> 
> Eli Zaretskii wrote:
> > We are talking about Emacs here.  Emacs behavior was always that it
> > deletes a file, not moves it somewhere.  So any change in that
> > behavior _by_default_ will surprise Emacs users.
> 
> Then maybe a compromize could be to tell it in a prominent way so that
> users have a good chance to notice it?

I'm not sure I understand what you are proposing here.  Please
elaborate.




^ permalink raw reply	[flat|nested] 119+ messages in thread

* RE: Why @#! is not Emacs using the Recycle bin on w32?
  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
                                         ` (2 more replies)
  1 sibling, 3 replies; 119+ messages in thread
From: Drew Adams @ 2008-08-29 15:06 UTC (permalink / raw)
  To: 'Lennart Borgman (gmail)', 'Eli Zaretskii'
  Cc: 'David House', emacs-devel, jasonr

> > We are talking about Emacs here.  Emacs behavior was always that it
> > deletes a file, not moves it somewhere.  So any change in that
> > behavior _by_default_ will surprise Emacs users.
> 
> Then maybe a compromize could be to tell it in a prominent way so that
> users have a good chance to notice it?

I agree that it should be mentioned prominently.

IIUC, `delete-by-moving-to-trash' works similarly on all platforms that have
some sort of trash can (recycle bin) - is that correct? It's important that
something like this be similar for all platforms.

My preference is that this not be turned on by default - that is, keep the
traditional Emacs behavior. But I recognize the counter arguments. The
traditional behavior here is better for overall Emacs use, IMO, but I won't
argue about it. 

I would argue though that the default behavior for file deletion should be the
same on all platforms. Users should not need to worry about differences in this
regard when they use Emacs on different platforms. For me, differences between
the default behaviors of Emacs and a given platform (outside of Emacs) are less
important than differences for Emacs across platforms. In this case, I care more
that Emacs file deletion default behavior be the same on GNU/Linux, Mac, and
Windows than I care whether Emacs file deletion default behavior on Windows
respects the user's Recycle Bin setting (preference) on Windows.  

Lennart is right however that newbies (on all platforms) need to be made aware
of the default Emacs behavior regarding file deletion and how to change it. I'd
suggest adding some use of Dired to the tutorial (if it's not already there),
explicitly pointing out _by example_ that your file is gone after you confirm
its deletion, and explicitly showing you by example how you can get the
alternative backup/trash can/recycle bin behavior.

[BTW - I am astounded that Lennart, who is no newbie, just discovered the
default behavior and doesn't use Dired much. I can't imagine using Emacs without
Dired. Perhaps it's related to using Viper?]

In sum: (1) Regardless of whether we change the default behavior, this option
and the default needs to be documented prominently. (2) My preference is to keep
the traditional default behavior. (3) The default behavior should be the same
across platforms.

--

In general, I do not agree that Emacs should aim to be as close as possible to
what newbies are used to on their particular platform. Instead, each default
behavior we choose needs to be decided on its own merits, and especially with an
eye to how it fits with Emacs use overall.

Emacs should give you useful, coherent overall behavior out of the box - not
necessarily a UI that is optimal and not necessarily a UI as close as possible
to newbie habits or expectations. (Yes, I know that some will disagree.) And we
should make it clear how to customize the default behavior in each case. Wrt
newbies, we should try to make adjustment to Emacs not too difficult, but we
should not sacrifice Emacs strengths just to minimize newbie surprise.

Overall, learning Emacs should be about learning a new and better way of
working, and we should facilitate that learning by documenting the advantages
and differences. We don't want newbies to get frustrated (e.g. lose important
files) because of a lack of easily accessible information. But some of the
responsibility is on their shoulders - they need to at least follow the tutorial
and perhaps read a little. Perhaps this needs to be said to them up front. Emacs
is not Windows or Mac or even GNU/Linux. (Yes, I know that some will disagree.)






^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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 19:58                       ` Taylor Venable
  2 siblings, 1 reply; 119+ messages in thread
From: Juanma Barranquero @ 2008-08-29 15:11 UTC (permalink / raw)
  To: Drew Adams
  Cc: David House, Eli Zaretskii, jasonr, Lennart Borgman (gmail),
	emacs-devel

On Fri, Aug 29, 2008 at 17:06, Drew Adams <drew.adams@oracle.com> wrote:

> [BTW - I am astounded that Lennart, who is no newbie, just discovered the
> default behavior and doesn't use Dired much. I can't imagine using Emacs without
> Dired. Perhaps it's related to using Viper?]

FWIW, I've been using Emacs for about eleven years (not much, by this
standards, but still, no newbie) and I rarely use Dired. (I never use
Viper.) Most file management operations I do from a shell (using the
proprietary 4NT, now TCC).

 Juanma




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 15:06                     ` Drew Adams
  2008-08-29 15:11                       ` Juanma Barranquero
@ 2008-08-29 15:39                       ` Alan Mackenzie
  2008-08-29 16:32                         ` Drew Adams
  2008-08-31  2:32                         ` Sean Sieger
  2008-08-29 19:58                       ` Taylor Venable
  2 siblings, 2 replies; 119+ messages in thread
From: Alan Mackenzie @ 2008-08-29 15:39 UTC (permalink / raw)
  To: Drew Adams
  Cc: 'David House', 'Eli Zaretskii', jasonr,
	'Lennart Borgman (gmail)', emacs-devel

Hi, Drew and everybody else!

On Fri, Aug 29, 2008 at 08:06:37AM -0700, Drew Adams wrote:
> > > We are talking about Emacs here.  Emacs behavior was always that it
> > > deletes a file, not moves it somewhere.  So any change in that
> > > behavior _by_default_ will surprise Emacs users.

> > Then maybe a compromize could be to tell it in a prominent way so that
> > users have a good chance to notice it?

> I agree that it should be mentioned prominently.

> IIUC, `delete-by-moving-to-trash' works similarly on all platforms that
> have some sort of trash can (recycle bin) - is that correct? It's
> important that something like this be similar for all platforms.

> My preference is that this not be turned on by default - that is, keep
> the traditional Emacs behavior. But I recognize the counter arguments.
> The traditional behavior here is better for overall Emacs use, IMO, but
> I won't argue about it. 

I submit this is a non-problem, and the non-solution is this: The first
time in an Emacs session somebody tries to delete a file, a request for
confirmation something like this should appear:

"You are about to delete one or more files permanently.  You will not be
warned again this session.  Type 'y' to delete the file(s), '!' to delete
the file(s) and suppress the warning for future sessions, or 'n' to abort
the operation.".

[ .... ]

> [BTW - I am astounded that Lennart, who is no newbie, just discovered
> the default behavior and doesn't use Dired much. I can't imagine using
> Emacs without Dired. Perhaps it's related to using Viper?]

Hah!  I don't use dired at all (except by accident, when I curse for
having to type C-x k to get rid of it).  I do file manipulation in a bash
session on a different virtual terminal.

-- 
Alan Mackenzie (Nuremberg, Germany).




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29  8:17           ` Lennart Borgman (gmail)
  2008-08-29  9:24             ` Eli Zaretskii
@ 2008-08-29 16:16             ` Francis Litterio
  1 sibling, 0 replies; 119+ messages in thread
From: Francis Litterio @ 2008-08-29 16:16 UTC (permalink / raw)
  To: emacs-devel

Lennart Borgman (gmail) wrote:

> Yes, but do you really delete that many files from Emacs?

I second Eli's response else-thread: I delete more files using Emacs
Dired mode and Cygwin "rm" command than I do using Explorer.  As a
user who came to Windows after many years on UNIX systems, I have
trained myself not delete a file unless I really want it gone for good.
--
Fran





^ permalink raw reply	[flat|nested] 119+ messages in thread

* RE: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 15:11                       ` Juanma Barranquero
@ 2008-08-29 16:28                         ` Drew Adams
  0 siblings, 0 replies; 119+ messages in thread
From: Drew Adams @ 2008-08-29 16:28 UTC (permalink / raw)
  To: 'Juanma Barranquero'
  Cc: 'David House', 'Eli Zaretskii', jasonr,
	'Lennart Borgman (gmail)', emacs-devel

> > [BTW - I am astounded that Lennart, who is no newbie, just 
> > discovered the default behavior and doesn't use Dired much.
> > I can't imagine using Emacs without Dired. Perhaps it's
> > related to using Viper?]

Juanma> FWIW, I've been using Emacs for about eleven years
Juanma> (not much, by this standards, but still, no newbie)
Juanma> and I rarely use Dired. (I never use Viper.) Most
Juanma> file management operations I do from a shell (using the
Juanma> proprietary 4NT, now TCC).

Alan> Hah!  I don't use dired at all (except by accident,
Alan> when I curse for having to type C-x k to get rid of it).
Alan> I do file manipulation in a bash session on a different
Alan> virtual terminal.

Ah, yes. If you work in a shell buffer much of the time, that's understandable.

And I didn't mean to imply that someone who doesn't use Dired much is somehow
not using Emacs correctly. I would be surprised though if most Emacs users don't
use Dired much.

I mainly meant that I was surprised that Lennart was unaware of the default
deletion behavior. Nothing important intended by my "BTW".






^ permalink raw reply	[flat|nested] 119+ messages in thread

* RE: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 15:39                       ` Alan Mackenzie
@ 2008-08-29 16:32                         ` Drew Adams
  2008-08-29 16:43                           ` David House
  2008-08-31  2:32                         ` Sean Sieger
  1 sibling, 1 reply; 119+ messages in thread
From: Drew Adams @ 2008-08-29 16:32 UTC (permalink / raw)
  To: 'Alan Mackenzie'
  Cc: 'David House', 'Eli Zaretskii', jasonr,
	'Lennart Borgman (gmail)', emacs-devel

> > My preference is that this not be turned on by default - 
> > that is, keep the traditional Emacs behavior. But I
> > recognize the counter arguments. The traditional behavior
> > here is better for overall Emacs use, IMO, but I won't
> > argue about it. 
> 
> I submit this is a non-problem, and the non-solution is this: 
> The first time in an Emacs session somebody tries to delete
> a file, a request for confirmation something like this should
> appear:
> 
> "You are about to delete one or more files permanently.  You 
> will not be warned again this session.  Type 'y' to delete the
> file(s), '!' to delete the file(s) and suppress the warning
> for future sessions, or 'n' to abort the operation.".

Something like that could be useful. Bring the Dired deletion behavior to your
attention the first time (and only the first time) you invoke it.

But also include mention of the fact that you can choose whether deletion should
use a recycle bin/trash can using option `delete-by-moving-to-trash' (with a
link to Customize).

BTW - Question: if `delete-by-moving-to-trash' is non-nil, should Dired still
ask you for confirmation for deletion? Dunno. Perhaps that could be a choice
(separate values for `delete-by-moving-to-trash').






^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 16:32                         ` Drew Adams
@ 2008-08-29 16:43                           ` David House
  2008-08-29 22:12                             ` René Kyllingstad
  0 siblings, 1 reply; 119+ messages in thread
From: David House @ 2008-08-29 16:43 UTC (permalink / raw)
  To: Drew Adams
  Cc: Alan Mackenzie, Eli Zaretskii, jasonr, Lennart Borgman (gmail),
	emacs-devel

2008/8/29 Drew Adams <drew.adams@oracle.com>:
> BTW - Question: if `delete-by-moving-to-trash' is non-nil, should Dired still
> ask you for confirmation for deletion? Dunno. Perhaps that could be a choice
> (separate values for `delete-by-moving-to-trash').

I think no -- I can't think of a system where you are asked whether to
perform some reversible operation (and I can't think of a reason why
you should be).

I still feel the best default is to send the file to trash without
asking any questions, then inform the user that this has happened.
(E.g. (message "File sent to trash folder %s" path-to-trash).) This
has the advantage that the default is reversible, so you don't have a
situation like Lennart's where a user doesn't find out about
`delete-by-moving-to-trash' until it's too late. The disadvantage of
taking up more hard drive space is also countered if we tell the user
we've sent it to trash -- if they're running low on disk space,
they'll know, and be able to change `delete-by-moving-to-trash'.

I would also accept a solution where the message informs the user how
to change the behaviour (e.g. (message "File sent to trash folder %s,
use M-x customize-variable RET delete-by-moving-to-trash RET to change
this behaviour" path-to-trash). But I think just including a reference
to that variable in the docstring of `dired-do-delete' is enough.

-- 
-David




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-28 22:37 Why @#! is not Emacs using the Recycle bin on w32? Lennart Borgman (gmail)
                   ` (5 preceding siblings ...)
  2008-08-29 10:57 ` Phil Jackson
@ 2008-08-29 18:37 ` Johannes Weiner
  2008-08-29 19:59   ` Lennart Borgman (gmail)
  2008-08-29 22:37   ` Thomas Lord
  2008-08-29 20:24 ` Gilaras Drakeson
  7 siblings, 2 replies; 119+ messages in thread
From: Johannes Weiner @ 2008-08-29 18:37 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: Emacs Devel

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:

> I just deleted a file because I misunderstood dired. I needed that file
> (of course).

Do you see the paradoxon?

> And then I found that dired did not make any backup and did not use
> windows Recycle bin.

It's called `delete' not `move to somewhere else'.

> This behaviour does not make me trust for example GNU/Linux.

I don't quite follow.

> I would beleive this is a behaviour implemented after how things work
> there. Is this correct? Does Emacs behave this way on GNU/Linus too?

Yes.

Would it be feasible to extend the documentation on this?  I suspect
that you don't use dired without ever looking at the documentation at
all, so a note in the docstring (and info file) that explains that
`delete' means `delete' would be enough to prevent this
misunderstanding?

	Hannes

diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 834cdeb..8b885fb 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,7 @@
+2008-08-29  Johannes Weiner  <hannes@saeurebad.de>
+
+	* dired.texi: Add note about the permanent nature of file deletion.
+
 2008-08-27  Romain Francoise  <romain@orebokech.com>
 
 	* custom.texi (Directory Variables): Minor fix.
diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi
index 104c59f..9355df0 100644
--- a/doc/emacs/dired.texi
+++ b/doc/emacs/dired.texi
@@ -576,6 +576,10 @@ Like the other commands in this section, this command operates on the
 @emph{marked} files, or the next @var{n} files.  By contrast, @kbd{x}
 (@code{dired-do-flagged-delete}) deletes all @dfn{flagged} files.
 
+Note that deletion really means deletion here.  The files will not be
+moved to a trash directory and no backup will be made.  Be sure of
+what you do!
+
 @findex dired-do-rename
 @kindex R @r{(Dired)}
 @cindex renaming files (in Dired)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7376b83..e4a27b5 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-29  Johannes Weiner  <hannes@saeurebad.de>
+
+	* dired.el (dired-do-delete): Add note about the permanent nature
+	of file deletion.
+
 2008-08-29  Eli Zaretskii  <eliz@gnu.org>
 
 	* bindings.el (mode-line-frame-identification): Fix last change.
diff --git a/lisp/dired.el b/lisp/dired.el
index 3102a6d..1d36618 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -2538,7 +2538,7 @@ non-empty directories is allowed."
 	  (message "(No deletions requested)")))))
 
 (defun dired-do-delete (&optional arg)
-  "Delete all marked (or next ARG) files.
+  "Permanently(!) delete all marked (or next ARG) files.
 `dired-recursive-deletes' controls whether deletion of
 non-empty directories is allowed."
   ;; This is more consistent with the file marking feature than




^ permalink raw reply related	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 15:06                     ` Drew Adams
  2008-08-29 15:11                       ` Juanma Barranquero
  2008-08-29 15:39                       ` Alan Mackenzie
@ 2008-08-29 19:58                       ` Taylor Venable
  2008-08-29 20:08                         ` Lennart Borgman (gmail)
                                           ` (2 more replies)
  2 siblings, 3 replies; 119+ messages in thread
From: Taylor Venable @ 2008-08-29 19:58 UTC (permalink / raw)
  To: Drew Adams
  Cc: 'David House', 'Eli Zaretskii', jasonr,
	'Lennart Borgman (gmail)', emacs-devel

On Fri, 29 Aug 2008 08:06:37 -0700
"Drew Adams" <drew.adams@oracle.com> wrote:

> > > We are talking about Emacs here.  Emacs behavior was always that
> > > it deletes a file, not moves it somewhere.  So any change in that
> > > behavior _by_default_ will surprise Emacs users.
> > 
> > Then maybe a compromize could be to tell it in a prominent way so
> > that users have a good chance to notice it?
> 
> I agree that it should be mentioned prominently.
> 
> IIUC, `delete-by-moving-to-trash' works similarly on all platforms
> that have some sort of trash can (recycle bin) - is that correct?
> It's important that something like this be similar for all platforms.

Maybe, assuming you have a Trash.  But where is it?  It could be the
one that Nautilus uses, or the one that Konqueror uses.  If you don't
use GNOME or KDE you probably don't have a Trash.  Then what is the
point of moving things there?

> My preference is that this not be turned on by default - that is,
> keep the traditional Emacs behavior. But I recognize the counter
> arguments. The traditional behavior here is better for overall Emacs
> use, IMO, but I won't argue about it. 

I agree that any feature like this should be disabled by default.  At
least on Linux platforms, it would have to make some assumptions about
the operating environment, or jump through some hoops to try to
determine that environment precisely.

My two cents, anyway.

-- 
Taylor Venable            http://real.metasyntax.net:2357/

foldr = lambda f, i, l: (len(l) == 1 and [f(l[0], i)] or
                         [f(l[0], foldr(f, i, l[1:]))])[0]




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 18:37 ` Johannes Weiner
@ 2008-08-29 19:59   ` Lennart Borgman (gmail)
  2008-08-30  9:11     ` Johannes Weiner
  2008-08-29 22:37   ` Thomas Lord
  1 sibling, 1 reply; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-29 19:59 UTC (permalink / raw)
  To: Johannes Weiner; +Cc: Emacs Devel

Johannes Weiner wrote:
> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
> 
>> I just deleted a file because I misunderstood dired. I needed that file
>> (of course).
> 
> Do you see the paradoxon?

I don't know. What is it? Sounds like some fairytale animal.

> Would it be feasible to extend the documentation on this?  I suspect
> that you don't use dired without ever looking at the documentation at
> all, so a note in the docstring (and info file) that explains that
> `delete' means `delete' would be enough to prevent this
> misunderstanding?

Thanks, I am sorry, but I really do not think so. This is not a logical
misunderstanding. It is an expectation on the behaviour of the UI.

However mentioning there how to turn on the Recycle Bin support (or
whatever it will be called) would be a good thing.

> 	Hannes
>  (defun dired-do-delete (&optional arg)
> -  "Delete all marked (or next ARG) files.
> +  "Permanently(!) delete all marked (or next ARG) files.
>  `dired-recursive-deletes' controls whether deletion of
>  non-empty directories is allowed."
>    ;; This is more consistent with the file marking feature than
> 




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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 20:12                         ` Drew Adams
  2008-08-29 23:43                         ` David De La Harpe Golden
  2 siblings, 1 reply; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-29 20:08 UTC (permalink / raw)
  To: Taylor Venable
  Cc: 'David House', 'Eli Zaretskii', jasonr,
	Drew Adams, emacs-devel

Taylor Venable wrote:
> Maybe, assuming you have a Trash.  But where is it?  It could be the
> one that Nautilus uses, or the one that Konqueror uses.  If you don't
> use GNOME or KDE you probably don't have a Trash.  Then what is the
> point of moving things there?

Is this really true?

Someone said that trash cans are something that belongs to the shell. On
w32 that is fortunately true only in a very limited sense. You can do
file deletions without using the trash can and you must use what I
believe MS call "shell api".

However it comes with the system! That is the important point. And of
course such a component should follow with the system so that different
shell developers s does not invent the wheel again. (Doing that may
create a lot of work for other people.)

Why not try to take that up with the GNU/Linux developers?






^ permalink raw reply	[flat|nested] 119+ messages in thread

* RE: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 19:58                       ` Taylor Venable
  2008-08-29 20:08                         ` Lennart Borgman (gmail)
@ 2008-08-29 20:12                         ` Drew Adams
  2008-08-29 23:43                         ` David De La Harpe Golden
  2 siblings, 0 replies; 119+ messages in thread
From: Drew Adams @ 2008-08-29 20:12 UTC (permalink / raw)
  To: 'Taylor Venable'
  Cc: 'David House', 'Eli Zaretskii', jasonr,
	'Lennart Borgman (gmail)', emacs-devel

> > I agree that it should be mentioned prominently.
> > 
> > IIUC, `delete-by-moving-to-trash' works similarly on all platforms
> > that have some sort of trash can (recycle bin) - is that correct?
> > It's important that something like this be similar for all 
> > platforms.
> 
> Maybe, assuming you have a Trash.

Yes, I meant on all platforms that have such a can/bin feature.

> > My preference is that this not be turned on by default - that is,
> > keep the traditional Emacs behavior. But I recognize the counter
> > arguments. The traditional behavior here is better for overall Emacs
> > use, IMO, but I won't argue about it. 
> 
> I agree that any feature like this should be disabled by default.  At
> least on Linux platforms, it would have to make some assumptions about
> the operating environment, or jump through some hoops to try to
> determine that environment precisely.





^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-28 22:37 Why @#! is not Emacs using the Recycle bin on w32? Lennart Borgman (gmail)
                   ` (6 preceding siblings ...)
  2008-08-29 18:37 ` Johannes Weiner
@ 2008-08-29 20:24 ` Gilaras Drakeson
  2008-08-29 20:56   ` Drew Adams
  2008-08-29 22:17   ` René Kyllingstad
  7 siblings, 2 replies; 119+ messages in thread
From: Gilaras Drakeson @ 2008-08-29 20:24 UTC (permalink / raw)
  To: emacs-devel


   Lennart Borgman writes:

> I just deleted a file because I misunderstood dired. I needed that file
> (of course).
>
> And then I found that dired did not make any backup and did not use
> windows Recycle bin.

Can we have another dired keybinding for move-file-to-trash? 
(e.g., `b', with companion `% b'. This can be called dired-do-bury).

IMO, both delete and move-file-to-trash are useful.

Personally, I use move-file-to-$HOME/tmp (instead of trash), which is a
swamp of probably unused-for-a-while files. Most downloaded stuff
initially get there, too, as well as quick random hacks and tests. When
I get a chance to do `file management', I browse the swamp and pick
useful items and put them somewhere meaningful.

Gilaras





^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 20:08                         ` Lennart Borgman (gmail)
@ 2008-08-29 20:46                           ` Taylor Venable
  2008-08-29 21:00                             ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 119+ messages in thread
From: Taylor Venable @ 2008-08-29 20:46 UTC (permalink / raw)
  To: Lennart Borgman (gmail)
  Cc: 'David House', 'Eli Zaretskii', jasonr,
	Drew Adams, emacs-devel

On Fri, 29 Aug 2008 22:08:32 +0200
"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> wrote:

> Taylor Venable wrote:
> > Maybe, assuming you have a Trash.  But where is it?  It could be the
> > one that Nautilus uses, or the one that Konqueror uses.  If you
> > don't use GNOME or KDE you probably don't have a Trash.  Then what
> > is the point of moving things there?
> 
> Is this really true?
> 
> Someone said that trash cans are something that belongs to the shell.
> On w32 that is fortunately true only in a very limited sense. You can
> do file deletions without using the trash can and you must use what I
> believe MS call "shell api".
> 
> However it comes with the system! That is the important point. And of
> course such a component should follow with the system so that
> different shell developers s does not invent the wheel again. (Doing
> that may create a lot of work for other people.)
> 
> Why not try to take that up with the GNU/Linux developers?

The simple answer is because the GNU/Linux (or rather, Unix in general)
architecture does not operate like Windows does with respect to this
tight level of integration.  Even getting the GNOME and KDE guys to use
the same place would not solve the problem because a user always has
the freedom to use another environment (or write their own) which might
not conform.  You cannot second-guess that such high-level features
will be available in a Unix environment because we are much more free
to do as we will in such a system.

Besides, because of the way Unix systems are compartmentalized,
implementing such a thing in a universal way would take an impossible
amount of work.  Who should decide where your files go when they die?
At the most fundamental point this is a filesystem decision; but then
your editor would work differently according to what filesystem you
were using.  You might make the argument that you already get this
effect if you try to open a file on a read-only medium like a CD, but
that precedent is already well established, and using different hard-
disk filesystems is far more subtle.

-- 
Taylor Venable            http://real.metasyntax.net:2357/

foldr = lambda f, i, l: (len(l) == 1 and [f(l[0], i)] or
                         [f(l[0], foldr(f, i, l[1:]))])[0]




^ permalink raw reply	[flat|nested] 119+ messages in thread

* RE: Why @#! is not Emacs using the Recycle bin on w32?
  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 22:17   ` René Kyllingstad
  1 sibling, 1 reply; 119+ messages in thread
From: Drew Adams @ 2008-08-29 20:56 UTC (permalink / raw)
  To: 'Gilaras Drakeson', emacs-devel

> Can we have another dired keybinding for move-file-to-trash? 
> (e.g., `b', with companion `% b'. This can be called dired-do-bury).
> 
> IMO, both delete and move-file-to-trash are useful.

Yes, they are.

On Windows (not in Emacs), by default (you can change this by configuring the
Recycle Bin) the `delete' key sends a file to the Recycle Bin and `S-delete'
deletes it permanently (after confirmation).

Personally, I use `S-delete' on Windows 99% of the time. I would like to be able
to configure the Recycle Bin to have `delete' and `S-delete' just swap places
(so I'd use `S-delete' only 1% of the time, when I wanted to use the recycle
bin), but the only configuration alternative, AFAIK, is to have deleted files
never go to the Recycle Bin.

For Emacs, we could do this: By default, `delete' deletes the file and
`S-delete' sends it to the Recycle Bin, but with non-nil
`delete-by-moving-to-trash' these would be reversed: `delete' would send to the
Recycle Bin and `S-delete' would delete the file (a la Windows).





^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 20:46                           ` Taylor Venable
@ 2008-08-29 21:00                             ` Lennart Borgman (gmail)
  2008-08-29 21:59                               ` Phil Jackson
  0 siblings, 1 reply; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-29 21:00 UTC (permalink / raw)
  To: Taylor Venable
  Cc: 'David House', 'Eli Zaretskii', emacs-devel,
	Drew Adams, jasonr

Taylor Venable wrote:
> On Fri, 29 Aug 2008 22:08:32 +0200
> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> wrote:
> 
>> Taylor Venable wrote:
>>> Maybe, assuming you have a Trash.  But where is it?  It could be the
>>> one that Nautilus uses, or the one that Konqueror uses.  If you
>>> don't use GNOME or KDE you probably don't have a Trash.  Then what
>>> is the point of moving things there?
>> Is this really true?
>>
>> Someone said that trash cans are something that belongs to the shell.
>> On w32 that is fortunately true only in a very limited sense. You can
>> do file deletions without using the trash can and you must use what I
>> believe MS call "shell api".
>>
>> However it comes with the system! That is the important point. And of
>> course such a component should follow with the system so that
>> different shell developers s does not invent the wheel again. (Doing
>> that may create a lot of work for other people.)
>>
>> Why not try to take that up with the GNU/Linux developers?
> 
> The simple answer is because the GNU/Linux (or rather, Unix in general)
> architecture does not operate like Windows does with respect to this
> tight level of integration.  Even getting the GNOME and KDE guys to use
> the same place would not solve the problem

They should come together and donate their common solution for trash can
handling as something that comes with the system.

> because a user always has
> the freedom to use another environment (or write their own) which might
> not conform.  You cannot second-guess that such high-level features
> will be available

Is not that a job for the interface? You ask the interface if it is
available. It it is not you do not use it ...

> Who should decide where your files go when they die?

The writer of the trash can handling (that is called by the trash can
interface do handle the trash can).




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 20:56   ` Drew Adams
@ 2008-08-29 21:05     ` Lennart Borgman (gmail)
  2008-08-29 21:11       ` Drew Adams
  0 siblings, 1 reply; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-29 21:05 UTC (permalink / raw)
  To: Drew Adams; +Cc: emacs-devel, 'Gilaras Drakeson'

Drew Adams wrote:
> For Emacs, we could do this: By default, `delete' deletes the file and
> `S-delete' sends it to the Recycle Bin,

That would be good.

> but with non-nil
> `delete-by-moving-to-trash' these would be reversed: `delete' would send to the
> Recycle Bin and `S-delete' would delete the file (a la Windows).

I wonder if reversing like that is a good idea. Negation is sometimes a
very confusing operation for our brains. If you have seen people
struggling with logic expressions which they try to match what they want
you have probably seen how confused they can be. (And I believe negation
is even more confusing when we are stressed.)




^ permalink raw reply	[flat|nested] 119+ messages in thread

* RE: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 21:05     ` Lennart Borgman (gmail)
@ 2008-08-29 21:11       ` Drew Adams
  2008-08-29 21:13         ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 119+ messages in thread
From: Drew Adams @ 2008-08-29 21:11 UTC (permalink / raw)
  To: 'Lennart Borgman (gmail)'; +Cc: emacs-devel, 'Gilaras Drakeson'

> > For Emacs, we could do this: By default, `delete' deletes 
> > the file and `S-delete' sends it to the Recycle Bin,
> 
> That would be good.
> 
> > but with non-nil
> > `delete-by-moving-to-trash' these would be reversed: 
> > `delete' would send to the Recycle Bin and `S-delete' would
> > delete the file (a la Windows).
> 
> I wonder if reversing like that is a good idea. Negation is 
> sometimes a very confusing operation for our brains. If you
> have seen people struggling with logic expressions which they
> try to match what they want you have probably seen how confused
> they can be. (And I believe negation
> is even more confusing when we are stressed.)

We're talking about setting a preference, here. This is pretty much a one-time
operation: You either want `delete' to send to the recycle bin or you want it to
delete. Whichever you choose, `S-delete' does the other. Nothing complicated
about this. No one will need to struggle with any logic expressions. ;-)





^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 21:11       ` Drew Adams
@ 2008-08-29 21:13         ` Lennart Borgman (gmail)
  2008-08-29 21:20           ` Drew Adams
  0 siblings, 1 reply; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-29 21:13 UTC (permalink / raw)
  To: Drew Adams; +Cc: emacs-devel, 'Gilaras Drakeson'

Drew Adams wrote:
>> I wonder if reversing like that is a good idea. Negation is 
>> sometimes a very confusing operation for our brains. If you
>> have seen people struggling with logic expressions which they
>> try to match what they want you have probably seen how confused
>> they can be. (And I believe negation
>> is even more confusing when we are stressed.)
> 
> We're talking about setting a preference, here. This is pretty much a one-time
> operation: You either want `delete' to send to the recycle bin or you want it to
> delete. Whichever you choose, `S-delete' does the other. Nothing complicated
> about this. No one will need to struggle with any logic expressions. ;-)

Didn't you say that you were using different systems? ;-)

And since `dired-internal-do-deletions' just says "Delete ..." I think
it can be hard ...

(Could someone please update that prompt?)




^ permalink raw reply	[flat|nested] 119+ messages in thread

* RE: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 21:13         ` Lennart Borgman (gmail)
@ 2008-08-29 21:20           ` Drew Adams
  2008-08-29 21:54             ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 119+ messages in thread
From: Drew Adams @ 2008-08-29 21:20 UTC (permalink / raw)
  To: 'Lennart Borgman (gmail)'; +Cc: emacs-devel, 'Gilaras Drakeson'

> >> I wonder if reversing like that is a good idea. Negation is 
> >> sometimes a very confusing operation for our brains. If you
> >> have seen people struggling with logic expressions which they
> >> try to match what they want you have probably seen how confused
> >> they can be. (And I believe negation
> >> is even more confusing when we are stressed.)
> > 
> > We're talking about setting a preference, here. This is 
> > pretty much a one-time operation: You either want `delete'
> > to send to the recycle bin or you want it to delete. Whichever
> > you choose, `S-delete' does the other. Nothing complicated
> > about this. No one will need to struggle with any logic 
> > expressions. ;-)
> 
> Didn't you say that you were using different systems? ;-)

Sorry, I have no idea what you mean.

> And since `dired-internal-do-deletions' just says "Delete ..." I think
> it can be hard ...

I don't know whether any doc or prompts would need to be modified. I doubt it
(except for some doc describing `delete-by-moving-to-trash'). It is not uncommon
on Windows to have prompts refer to "delete" and "deletion" even though the
actual behavior is to send a file to the Recycle Bin.

All this is about is letting users define what "delete" means. There are two
kinds of deletion in this model: (1) send to Recycle Bin, (2) delete
permanently. The option `delete-by-moving-to-trash' binds one key to #1 and the
other key to #2. Both kinds of deletion are always available by key.





^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 21:20           ` Drew Adams
@ 2008-08-29 21:54             ` Lennart Borgman (gmail)
  2008-08-29 22:20               ` Drew Adams
  0 siblings, 1 reply; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-29 21:54 UTC (permalink / raw)
  To: Drew Adams; +Cc: emacs-devel, 'Gilaras Drakeson'

Drew Adams wrote:
>> Didn't you say that you were using different systems? ;-)
> 
> Sorry, I have no idea what you mean.

My bad.

>> And since `dired-internal-do-deletions' just says "Delete ..." I think
>> it can be hard ...
> 
> I don't know whether any doc or prompts would need to be modified. I doubt it
> (except for some doc describing `delete-by-moving-to-trash'). It is not uncommon
> on Windows to have prompts refer to "delete" and "deletion" even though the
> actual behavior is to send a file to the Recycle Bin.


I meant the confirmation prompt. I think it could be something like

  Delete this file permanently? (yes or no)
  Move this file to system trash can? (yes or not)





^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 21:00                             ` Lennart Borgman (gmail)
@ 2008-08-29 21:59                               ` Phil Jackson
  2008-08-29 22:12                                 ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 119+ messages in thread
From: Phil Jackson @ 2008-08-29 21:59 UTC (permalink / raw)
  To: Lennart Borgman (gmail)
  Cc: jasonr, Taylor Venable, 'David House',
	'Eli Zaretskii', emacs-devel, Drew Adams

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:

>>> Why not try to take that up with the GNU/Linux developers?
>> 
>> The simple answer is because the GNU/Linux (or rather, Unix in general)
>> architecture does not operate like Windows does with respect to this
>> tight level of integration.  Even getting the GNOME and KDE guys to use
>> the same place would not solve the problem
>
> They should come together and donate their common solution for trash can
> handling as something that comes with the system.

But who gets to decide what the 'system' is? I use a very basic tiled
window manager and no desktop environment. All of my file manipulation
happens in the shell or dired (whichever I'm nearest at the time). So,
do rm and emacs need to know about it? Does unlink() need to know about
it? The filesystem? The kernel itself?

One can make assumptions about a Windows system (like every user using
explorer.exe), but not really about a GNU/Linux system.

Cheers,
Phil
-- 
 Philip Jackson
 http://www.shellarchive.co.uk




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 21:59                               ` Phil Jackson
@ 2008-08-29 22:12                                 ` Lennart Borgman (gmail)
  2008-08-29 23:43                                   ` Miles Bader
                                                     ` (2 more replies)
  0 siblings, 3 replies; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-29 22:12 UTC (permalink / raw)
  To: Phil Jackson
  Cc: jasonr, Taylor Venable, 'David House',
	'Eli Zaretskii', emacs-devel, Drew Adams

Phil Jackson wrote:
> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
> 
>>>> Why not try to take that up with the GNU/Linux developers?
>>> The simple answer is because the GNU/Linux (or rather, Unix in general)
>>> architecture does not operate like Windows does with respect to this
>>> tight level of integration.  Even getting the GNOME and KDE guys to use
>>> the same place would not solve the problem
>> They should come together and donate their common solution for trash can
>> handling as something that comes with the system.
> 
> But who gets to decide what the 'system' is? I use a very basic tiled
> window manager and no desktop environment. All of my file manipulation
> happens in the shell or dired (whichever I'm nearest at the time). So,
> do rm and emacs need to know about it? Does unlink() need to know about
> it? The filesystem? The kernel itself?

As I explained in a previous message, what I propose is an interface for
trash can handling that always comes with the system. There need not be
any implementation behind that interface. The deleting routine should
ask the interface.

Ideally of cause an implementation behind the interface should be there
too in case you do not have a very, very special need to avoid it.

> One can make assumptions about a Windows system (like every user using
> explorer.exe), but not really about a GNU/Linux system.

Is not that then a shortcoming of GNU/Linux compared with Windows?

> Cheers,
> Phil




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 16:43                           ` David House
@ 2008-08-29 22:12                             ` René Kyllingstad
  2008-08-30  0:29                               ` David House
  0 siblings, 1 reply; 119+ messages in thread
From: René Kyllingstad @ 2008-08-29 22:12 UTC (permalink / raw)
  To: David House
  Cc: Lennart Borgman (gmail), emacs-devel, Alan Mackenzie,
	Eli Zaretskii, jasonr, Drew Adams

* David House:
>  2008/8/29 Drew Adams <drew.adams@oracle.com>:
> > BTW - Question: if `delete-by-moving-to-trash' is non-nil, should Dired
> > still ask you for confirmation for deletion? Dunno. Perhaps that could
> > be a choice (separate values for `delete-by-moving-to-trash').
>  
>  I think no -- I can't think of a system where you are asked whether to
>  perform some reversible operation (and I can't think of a reason why
>  you should be).
>  
>  I still feel the best default is to send the file to trash without
>  asking any questions, then inform the user that this has happened.
>  (E.g. (message "File sent to trash folder %s" path-to-trash).) This

And mentions: "<current-keybinding> to undo".  It doesn't get in your way,
but in case it was a quick mistake you immediately see how to fix it (this
is how gmail handles similar actions, and it's just brilliant).

Also, being able to use standard undo to undelete files is sadly not yet
standard so it's not expected.

Btw, I use dired quite a bit, but for copying and moving files I often end
up using something else to be able to perform it in the background, with
some indication of the progress. Would that Emacs could do that.


-- René




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 20:24 ` Gilaras Drakeson
  2008-08-29 20:56   ` Drew Adams
@ 2008-08-29 22:17   ` René Kyllingstad
  2008-08-30  3:14     ` Stephen J. Turnbull
  1 sibling, 1 reply; 119+ messages in thread
From: René Kyllingstad @ 2008-08-29 22:17 UTC (permalink / raw)
  To: Gilaras Drakeson; +Cc: emacs-devel

* Gilaras Drakeson:
>     Lennart Borgman writes:
>  
> > I just deleted a file because I misunderstood dired. I needed that file
> > (of course).
> >
> > And then I found that dired did not make any backup and did not use
> > windows Recycle bin.
>  
>  Can we have another dired keybinding for move-file-to-trash? 
>  (e.g., `b', with companion `% b'. This can be called dired-do-bury).

And while we're requesting features, what about browse-trash and
empty-trash?


-- René




^ permalink raw reply	[flat|nested] 119+ messages in thread

* RE: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 21:54             ` Lennart Borgman (gmail)
@ 2008-08-29 22:20               ` Drew Adams
  2008-08-29 22:25                 ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 119+ messages in thread
From: Drew Adams @ 2008-08-29 22:20 UTC (permalink / raw)
  To: 'Lennart Borgman (gmail)'; +Cc: emacs-devel, 'Gilaras Drakeson'

> I meant the confirmation prompt. I think it could be something like
> 
>   Delete this file permanently? (yes or no)
>   Move this file to system trash can? (yes or not)

Please be clear in what context such confirmation is requested. I really don't
know what you're referring to.

Without your help (;-)), I cannot imagine a context in which such a complex
dialog should ensue.

If `delete-by-moving-to-trash' is non-nil, then no confirmation should be needed
when you, say, hit `x' in Dired - the marked files should just be moved to the
Recycle Bin.

If `delete-by-moving-to-trash' is nil, then Emacs should ask for the same
confirmation that it asks for now - do you really want to delete the marked
files?

Likewise for hitting the `delete' key in contexts where that affects a file: If
`delete-by-moving-to-trash' is non-nil, then there should be no request for
confirmation - the file should silently be move to the bin. If it is nil, then
you should be asked if you really want to delete the file.

And `S-delete' (if that were implemented) would do whatever `delete' does, but
for the opposite value of `delete-by-moving-to-trash'. Thus, if
`delete-by-moving-to-trash' were non-nil, then `S-delete' would delete the file
after you confirm the deletion. If it were nil, then `S-delete' would silently
move the file to the Recycle Bin.







^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 22:20               ` Drew Adams
@ 2008-08-29 22:25                 ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-29 22:25 UTC (permalink / raw)
  To: Drew Adams; +Cc: emacs-devel, 'Gilaras Drakeson'

Drew Adams wrote:
>> I meant the confirmation prompt. I think it could be something like
>>
>>   Delete this file permanently? (yes or no)
>>   Move this file to system trash can? (yes or not)
> 
> Please be clear in what context such confirmation is requested. I really don't
> know what you're referring to.
> 
> Without your help (;-)), I cannot imagine a context in which such a complex
> dialog should ensue.
> 
> If `delete-by-moving-to-trash' is non-nil, then no confirmation should be needed
> when you, say, hit `x' in Dired - the marked files should just be moved to the
> Recycle Bin.
> 
> If `delete-by-moving-to-trash' is nil, then Emacs should ask for the same
> confirmation that it asks for now - do you really want to delete the marked
> files?

Ok, that is another way to do it.

I thought it might be good to ask in both cases. However the suggestion
that a message could tell the user how to undo the "move-to-trash"
immediately seems like a better alternative (and it fits together with
your suggestion).




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 18:37 ` Johannes Weiner
  2008-08-29 19:59   ` Lennart Borgman (gmail)
@ 2008-08-29 22:37   ` Thomas Lord
  2008-08-30  3:11     ` Stephen J. Turnbull
  2008-08-30  9:36     ` Johannes Weiner
  1 sibling, 2 replies; 119+ messages in thread
From: Thomas Lord @ 2008-08-29 22:37 UTC (permalink / raw)
  To: Johannes Weiner; +Cc: Lennart Borgman (gmail), Emacs Devel

Johannes Weiner wrote:
> It's called `delete' not `move to somewhere else'.
>   

There's your problem, right there.  To many people,
"delete" *means* "move to the trash area" and
"empty trash" means "utterly discard the contents of the
trash".

Early on, when people first started making UIs,
there was a lot of discussion about confirmation
dialogs.   For example, some naive systems would
ask, for every file deleted, "Do you really want to
delete this?"  And as people studied UIs they realized
that such a question, repeated too often, looses all
meaning.   So they invented trash areas ("trash cans,"
"recycling bins," etc.).  The user can then batch a whole
bunch of deletes at once, no confirmation needed -- but
actually recovering the disk space and/or otherwise making
the deleted file truly gone is a separate operation entirely.

It's a linguistic confusion between communities, in part.
The other part is that the linguistic community that
takes "delete" to mean "move to trash" -- really has little
or no use for a "delete" command in the Emacs sense and
so is easily unpleasantly surprised when they accidentally
invoke such a command.  "Why would the computer ever
do *that*?!?"

-t





^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 19:58                       ` Taylor Venable
  2008-08-29 20:08                         ` Lennart Borgman (gmail)
  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)
  2 siblings, 1 reply; 119+ messages in thread
From: David De La Harpe Golden @ 2008-08-29 23:43 UTC (permalink / raw)
  To: Taylor Venable
  Cc: 'Lennart Borgman (gmail)', emacs-devel,
	'David House', 'Eli Zaretskii', jasonr,
	Drew Adams

Taylor Venable wrote:

> Maybe, assuming you have a Trash.  But where is it?  It could be the
> one that Nautilus uses, or the one that Konqueror uses.

Just to note again, at least nowadays, those two (and others like
Thunar) already use the same trashcan system, following the relevant
freedesktop.org spec.








^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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 14:03                                   ` Taylor Venable
  2 siblings, 0 replies; 119+ messages in thread
From: Miles Bader @ 2008-08-29 23:43 UTC (permalink / raw)
  To: Lennart Borgman (gmail)
  Cc: emacs-devel, Taylor Venable, 'David House',
	'Eli Zaretskii', jasonr, Phil Jackson, Drew Adams

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
>> One can make assumptions about a Windows system (like every user using
>> explorer.exe), but not really about a GNU/Linux system.
>
> Is not that then a shortcoming of GNU/Linux compared with Windows?

One can make assumptions because of limitations.

Limitations can be both an advantage and a disadvantage, obviously.

-Miles

-- 
Friendship, n. A ship big enough to carry two in fair weather, but only one
in foul.




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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
  0 siblings, 1 reply; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-30  0:21 UTC (permalink / raw)
  To: David De La Harpe Golden
  Cc: emacs-devel, Taylor Venable, 'David House',
	'Eli Zaretskii', jasonr, Drew Adams

David De La Harpe Golden wrote:
> Taylor Venable wrote:
> 
>> Maybe, assuming you have a Trash.  But where is it?  It could be the
>> one that Nautilus uses, or the one that Konqueror uses.
> 
> Just to note again, at least nowadays, those two (and others like
> Thunar) already use the same trashcan system, following the relevant
> freedesktop.org spec.

That is nice start. I took a look at the page

  http://www.ramendik.ru/docs/trashspec.html

It is yet only a draft though first published four years ago. (Wonder
where we will be in this discussion four y from now?)

They want both GUI and command line tools to follow the spec.

Essentially this is what I asked for (but not only as a draft of course).




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 22:12                             ` René Kyllingstad
@ 2008-08-30  0:29                               ` David House
  2008-08-30  0:33                                 ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 119+ messages in thread
From: David House @ 2008-08-30  0:29 UTC (permalink / raw)
  To: René Kyllingstad
  Cc: Lennart Borgman (gmail), emacs-devel, Alan Mackenzie,
	Eli Zaretskii, jasonr, Drew Adams

2008/8/29 René Kyllingstad <listmailemacs@kyllingstad.com>:
>>  I still feel the best default is to send the file to trash without
>>  asking any questions, then inform the user that this has happened.
>>  (E.g. (message "File sent to trash folder %s" path-to-trash).) This
>
> And mentions: "<current-keybinding> to undo".  It doesn't get in your way,
> but in case it was a quick mistake you immediately see how to fix it (this
> is how gmail handles similar actions, and it's just brilliant).

Does anyone else have any feelings on this? This seems like a really
nice way to implement things, but this subthread seems to have been
lost in the flow.

-- 
-David




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-30  0:29                               ` David House
@ 2008-08-30  0:33                                 ` Lennart Borgman (gmail)
  2008-08-30  1:58                                   ` David House
  0 siblings, 1 reply; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-30  0:33 UTC (permalink / raw)
  To: David House
  Cc: emacs-devel, Alan Mackenzie, Eli Zaretskii, jasonr,
	René Kyllingstad, Drew Adams

David House wrote:
> 2008/8/29 René Kyllingstad <listmailemacs@kyllingstad.com>:
>>>  I still feel the best default is to send the file to trash without
>>>  asking any questions, then inform the user that this has happened.
>>>  (E.g. (message "File sent to trash folder %s" path-to-trash).) This
>> And mentions: "<current-keybinding> to undo".  It doesn't get in your way,
>> but in case it was a quick mistake you immediately see how to fix it (this
>> is how gmail handles similar actions, and it's just brilliant).
> 
> Does anyone else have any feelings on this? This seems like a really
> nice way to implement things, but this subthread seems to have been
> lost in the flow.

Didn't I mention that I think it is a quite nice suggestion?

(But I can't see that there is any need to mention where the trash can
is as suggested above.)




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-30  0:33                                 ` Lennart Borgman (gmail)
@ 2008-08-30  1:58                                   ` David House
  0 siblings, 0 replies; 119+ messages in thread
From: David House @ 2008-08-30  1:58 UTC (permalink / raw)
  To: Lennart Borgman (gmail)
  Cc: emacs-devel, Alan Mackenzie, Eli Zaretskii, jasonr,
	René Kyllingstad, Drew Adams

2008/8/30 Lennart Borgman (gmail) <lennart.borgman@gmail.com>:
> Didn't I mention that I think it is a quite nice suggestion?

Yes, but it got buried under 50 further emails discussing a different
option. I thought I'd make an attempt to revive it.

> (But I can't see that there is any need to mention where the trash can
> is as suggested above.)

I have no real preference as to whether we show the location or not.

-- 
-David




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-30  0:21                           ` Lennart Borgman (gmail)
@ 2008-08-30  2:16                             ` David De La Harpe Golden
  2008-08-30  5:10                               ` tomas
  0 siblings, 1 reply; 119+ messages in thread
From: David De La Harpe Golden @ 2008-08-30  2:16 UTC (permalink / raw)
  To: Lennart Borgman (gmail)
  Cc: emacs-devel, Taylor Venable, 'David House',
	'Eli Zaretskii', jasonr, Drew Adams

Lennart Borgman (gmail) wrote:

> 
> It is yet only a draft though first published four years ago. (Wonder
> where we will be in this discussion four y from now?)
> 

Bear in mind the fact it says 0.7 doesn't mean it is not widely used. in
this case the major desktop environments implement it.  I think
fd.o specs remain described as "draft" to avoid claiming to be some sort
of standards body...

http://www.freedesktop.org/wiki/Specifications
- I dunno what rule they have for moving a spec from
"draft specifications that are new" to "draft specifications
that have pretty good de facto adoption". Given the sheer number
of alternative free desktops, it probably takes a while... And in this
case, no doubt some desktops are developed by folk with an even lower
opinion of trashcans than me. :-)

IMO the optional-per-volume-trash-dir aspects are particularly iffy,
it's a bit of extra implementation complexity in a security sensitive
area for what is IMO quite a low-value feature these days. Could have
just left it at the "home trash" and put up with the occasional and
ever-less-relevant inefficiency. Plus there  may be ass-out-of-u-and-me
bits left out - it might "go without saying" not to make the per-user
per-volume subdirs world-writeable, but they don't seem to say it (or
maybe I missed it, I only skimmed the spec).


















^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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  9:36     ` Johannes Weiner
  1 sibling, 1 reply; 119+ messages in thread
From: Stephen J. Turnbull @ 2008-08-30  3:11 UTC (permalink / raw)
  To: Thomas Lord; +Cc: Lennart Borgman (gmail), Johannes Weiner, Emacs Devel

Thomas Lord writes:

 > It's a linguistic confusion between communities, in part.

God, you're smart, Tom.  At least in the "finding the head of the nail
so you can whack it with a hammer" sense. ;-)

Now, since these are communities we're talking about, not simply a
minor twirk, there are a bunch of other things that are associated
with something like this difference in definition of "delete".

I conclude that this thread is a waste of time; Lennart should go
customize his .emacs, and then everybody should get to work on (1)
implementing cascading custom themes and (2) providing a UI that (a)
allows Windows folks to have Windowsy behavior, Mac folks to have "for
the rest of us" behavior, and *nix folks to have "for the sentient"
behavior, (b) an (optional) subcommunity thematic for eg Vista
cripples vs XP wonks and (c) a "new-in-version-X.Y" theme advertised
on the splish-screed.

And all easily accessible and well-advertised.





^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 22:17   ` René Kyllingstad
@ 2008-08-30  3:14     ` Stephen J. Turnbull
  0 siblings, 0 replies; 119+ messages in thread
From: Stephen J. Turnbull @ 2008-08-30  3:14 UTC (permalink / raw)
  To: René Kyllingstad; +Cc: emacs-devel, mike, Gilaras Drakeson

René Kyllingstad writes:
 > * Gilaras Drakeson:
 > >     Lennart Borgman writes:
 > >  
 > > > I just deleted a file because I misunderstood dired. I needed that file
 > > > (of course).
 > > >
 > > > And then I found that dired did not make any backup and did not use
 > > > windows Recycle bin.
 > >  
 > >  Can we have another dired keybinding for move-file-to-trash? 
 > >  (e.g., `b', with companion `% b'. This can be called dired-do-bury).
 > 
 > And while we're requesting features, what about browse-trash and
 > empty-trash?

How about an artificial Dired file "Trash" which refers to the Trash
if non-empty?  Then deleting it empties the trash with confirmation,
and `find'ing it opens a Dired browser on it.





^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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
  0 siblings, 1 reply; 119+ messages in thread
From: tomas @ 2008-08-30  5:10 UTC (permalink / raw)
  To: David De La Harpe Golden
  Cc: Lennart Borgman (gmail), jasonr, Taylor Venable,
	'David House', 'Eli Zaretskii', emacs-devel,
	Drew Adams

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sat, Aug 30, 2008 at 03:16:14AM +0100, David De La Harpe Golden wrote:

[...]

> IMO the optional-per-volume-trash-dir aspects are particularly iffy,

Sure. The Windows method of dealing with network-hosted files is so
superior (just deleting *without* moving to trash!). Let's do that,
because that's what users expect (no!) </sarcasm>

Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIuNZYBcgs9XrR2kYRAo6iAJ9JXoWuguAuK88EukUsOHeP5zmFegCfdPPX
Q+1sRy2MXiCOhTk66U9LHto=
=DfVq
-----END PGP SIGNATURE-----




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 19:59   ` Lennart Borgman (gmail)
@ 2008-08-30  9:11     ` Johannes Weiner
  2008-08-30 12:42       ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 119+ messages in thread
From: Johannes Weiner @ 2008-08-30  9:11 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: Emacs Devel

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:

> Johannes Weiner wrote:
>> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
>> 
>>> I just deleted a file because I misunderstood dired. I needed that file
>>> (of course).
>> 
>> Do you see the paradoxon?
>
> I don't know. What is it? Sounds like some fairytale animal.

Sorry, translation error.  Remove the -on ending by either deleting it
or moving it into the trash-can.

>> Would it be feasible to extend the documentation on this?  I suspect
>> that you don't use dired without ever looking at the documentation at
>> all, so a note in the docstring (and info file) that explains that
>> `delete' means `delete' would be enough to prevent this
>> misunderstanding?
>
> Thanks, I am sorry, but I really do not think so. This is not a logical
> misunderstanding. It is an expectation on the behaviour of the UI.

Why do you expect it from the UI in the first place?  Even on Windows
there are probably more interfaces to delete a file that don't have a
notion of a trash can than interfaces that have.

But whatever the fix is, please don't have me extend my
~/emacs/garbage-collect.el to sanitize the dired behaviour again.

What I mean to say is: if your expectation of the the interface differs
from what has been there for a long time, do not punish long-standing
users with new annoying warnings, silent/noisy behaviour change,
creation of stuff like ~/Trash or another flag which they have to set
instead of the people requesting different behaviour.

> However mentioning there how to turn on the Recycle Bin support (or
> whatever it will be called) would be a good thing.

Agreed.

	Hannes




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 22:37   ` Thomas Lord
  2008-08-30  3:11     ` Stephen J. Turnbull
@ 2008-08-30  9:36     ` Johannes Weiner
  2008-08-31  1:30       ` Richard M. Stallman
  1 sibling, 1 reply; 119+ messages in thread
From: Johannes Weiner @ 2008-08-30  9:36 UTC (permalink / raw)
  To: Thomas Lord; +Cc: Lennart Borgman (gmail), Emacs Devel

Thomas Lord <lord@emf.net> writes:

> Johannes Weiner wrote:
>> It's called `delete' not `move to somewhere else'.
>>   
>
> There's your problem, right there.  To many people,
> "delete" *means* "move to the trash area" and
> "empty trash" means "utterly discard the contents of the
> trash".

Probably to very few Emacs users.

> Early on, when people first started making UIs,
> there was a lot of discussion about confirmation
> dialogs.   For example, some naive systems would
> ask, for every file deleted, "Do you really want to
> delete this?"  And as people studied UIs they realized
> that such a question, repeated too often, looses all
> meaning.   So they invented trash areas ("trash cans,"
> "recycling bins," etc.).  The user can then batch a whole
> bunch of deletes at once, no confirmation needed -- but
> actually recovering the disk space and/or otherwise making
> the deleted file truly gone is a separate operation entirely.
>
> It's a linguistic confusion between communities, in part.
> The other part is that the linguistic community that
> takes "delete" to mean "move to trash" -- really has little
> or no use for a "delete" command in the Emacs sense and
> so is easily unpleasantly surprised when they accidentally
> invoke such a command.  "Why would the computer ever
> do *that*?!?"

First of all, you don't do that by accident.  You mark the files first
and delete in batch afterwards.

Secondly, dired's interface resembles the output of an old unix command,
so I expect all operations on the listed files to be done in the same
flavor.  And the documentation right now even tells me that it behaves
like `rm'!

Changing that would be like teaching `rm' about a trash can.

So if you do see a representation of files that seems alien to you, read
in the documentation of a program `rm' that doesn't tell you anything
and *then go ahead and throw into it your precious files with the
expectation that the interface would behave like all other stuff you
know while everything else of the program seems different and while
knowing in advance that you will later need these files again*...

Come on!

	Hannes




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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
  0 siblings, 2 replies; 119+ messages in thread
From: Alan Mackenzie @ 2008-08-30  9:40 UTC (permalink / raw)
  To: Stephen J. Turnbull; +Cc: Lennart Borgman (gmail), Emacs Devel

Hi, Stephen!

On Sat, Aug 30, 2008 at 12:11:34PM +0900, Stephen J. Turnbull wrote:

> God, you're smart, Tom.  At least in the "finding the head of the nail
> so you can whack it with a hammer" sense. ;-)

Dangerous - aiming for (car nail), you might cdr it, and at the next
swipe hit toe nail instead of tail nail, carnage indeed. 

> I conclude that this thread is a waste of time ....

At least, it has become so.  

> Lennart should go customize his .emacs ....

Not meaning to be unkind to Lennart, but we've ALL lost critical files by
doing stupid things.  At least I have, and it cost me several days of
hard (but interesting) grind to recover the bulk of that file.

Aren't there effective file undelete programs for MS-Windows?  There
certainly were for MS-DOS's FAT file system.

-- 
Alan Mackenzie (Nuremberg, Germany)




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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 20:41                                     ` Lennart Borgman (gmail)
  2008-08-30 14:03                                   ` Taylor Venable
  2 siblings, 2 replies; 119+ messages in thread
From: Phil Jackson @ 2008-08-30  9:49 UTC (permalink / raw)
  To: Lennart Borgman (gmail)
  Cc: emacs-devel, Taylor Venable, 'David House',
	'Eli Zaretskii', jasonr, Drew Adams

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:

>> One can make assumptions about a Windows system (like every user using
>> explorer.exe), but not really about a GNU/Linux system.
>
> Is not that then a shortcoming of GNU/Linux compared with Windows?

No with GNU/Linux you have choice. My system works exactly the way I
want it and not the way any corp. wants it to.
-- 
 Philip Jackson
 http://www.shellarchive.co.uk




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-30  9:40       ` Alan Mackenzie
@ 2008-08-30 10:11         ` Eli Zaretskii
  2008-08-30 15:03         ` Jason Rumney
  1 sibling, 0 replies; 119+ messages in thread
From: Eli Zaretskii @ 2008-08-30 10:11 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: emacs-devel

> Date: Sat, 30 Aug 2008 09:40:03 +0000
> From: Alan Mackenzie <acm@muc.de>
> Cc: "Lennart Borgman \(gmail\)" <lennart.borgman@gmail.com>,
> 	Emacs Devel <emacs-devel@gnu.org>
> 
> Aren't there effective file undelete programs for MS-Windows?

There certainly are, quite a few of them, actually.




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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)
  1 sibling, 1 reply; 119+ messages in thread
From: Alan Mackenzie @ 2008-08-30 10:18 UTC (permalink / raw)
  To: Phil Jackson
  Cc: Lennart Borgman (gmail), jasonr, Taylor Venable,
	'David House', 'Eli Zaretskii', emacs-devel,
	Drew Adams

Hi, Phil,

On Sat, Aug 30, 2008 at 10:49:16AM +0100, Phil Jackson wrote:
> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:

> >> One can make assumptions about a Windows system (like every user
> >> using explorer.exe), but not really about a GNU/Linux system.

> > Is not that then a shortcoming of GNU/Linux compared with Windows?

> No with GNU/Linux you have choice. My system works exactly the way I
> want it and not the way any corp. wants it to.

That's kind of missing the point.  It also verges on rubbing salt into
the wound.

You need, somehow, to become aware of this "choice" before doing
irrevocable damage.  I don't think Lennart would now be unhappy if
something in Dired had made him aware of what he was about to do.

>  Philip Jackson

-- 
Alan Mackenzie (Nuremberg, Germany).




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-30 10:18                                     ` Alan Mackenzie
@ 2008-08-30 10:43                                       ` Phil Jackson
  0 siblings, 0 replies; 119+ messages in thread
From: Phil Jackson @ 2008-08-30 10:43 UTC (permalink / raw)
  To: Alan Mackenzie
  Cc: Lennart Borgman (gmail), jasonr, Taylor Venable,
	'David House', 'Eli Zaretskii', emacs-devel,
	Drew Adams

Alan Mackenzie <acm@muc.de> writes:

>> >> One can make assumptions about a Windows system (like every user
>> >> using explorer.exe), but not really about a GNU/Linux system.
>
>> > Is not that then a shortcoming of GNU/Linux compared with Windows?
>
>> No with GNU/Linux you have choice. My system works exactly the way I
>> want it and not the way any corp. wants it to.
>
> That's kind of missing the point.  It also verges on rubbing salt into
> the wound.
>
> You need, somehow, to become aware of this "choice" before doing
> irrevocable damage.  I don't think Lennart would now be unhappy if
> something in Dired had made him aware of what he was about to do.

I think you misunderstand, this (now way off topic) conversation came
about when Lennart talked about having some sort of global trash can
interface. I was trying to state that you can't make assumptions about
that sort of interface in GNU/Linux that you can with Windows and OSX.

Cheers,
Phil
-- 
 Philip Jackson
 http://www.shellarchive.co.uk




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-30  9:11     ` Johannes Weiner
@ 2008-08-30 12:42       ` Lennart Borgman (gmail)
  2008-08-30 13:26         ` Johannes Weiner
  0 siblings, 1 reply; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-30 12:42 UTC (permalink / raw)
  To: Johannes Weiner; +Cc: Emacs Devel

Johannes Weiner wrote:
>>> Do you see the paradoxon?
>> I don't know. What is it? Sounds like some fairytale animal.
> 
> Sorry, translation error.  Remove the -on ending by either deleting it
> or moving it into the trash-can.

Oh, I imagined a sweet animal but a bit sad and lonely animal standing
there watching us when we were trying to fit into a small logical
prison. It felt said because we were trying to defend ourselves from
life and all its possibilities and no one asked it for the wisdom it had ...

> Why do you expect it from the UI in the first place? 

Thomas Lord took some time to explain what user interface (scientific
and non-scientific) research had found in this area.

I simply think it is good trying to use the result from that research.
(Or invalidate it, but I think that takes much, much time to try. And I
do not expect it to succeed.)




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-30 12:42       ` Lennart Borgman (gmail)
@ 2008-08-30 13:26         ` Johannes Weiner
  2008-08-30 13:58           ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 119+ messages in thread
From: Johannes Weiner @ 2008-08-30 13:26 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: Emacs Devel

Hi Lennart,

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:

> Johannes Weiner wrote:
>>>> Do you see the paradoxon?
>>> I don't know. What is it? Sounds like some fairytale animal.
>> 
>> Sorry, translation error.  Remove the -on ending by either deleting it
>> or moving it into the trash-can.
>
> Oh, I imagined a sweet animal but a bit sad and lonely animal standing
> there watching us when we were trying to fit into a small logical
> prison. It felt said because we were trying to defend ourselves from
> life and all its possibilities and no one asked it for the wisdom it
> had ...

It felt said?

>> Why do you expect it from the UI in the first place? 
>
> Thomas Lord took some time to explain what user interface (scientific
> and non-scientific) research had found in this area.
>
> I simply think it is good trying to use the result from that research.
> (Or invalidate it, but I think that takes much, much time to try. And I
> do not expect it to succeed.)

I already invalidated them for myself and I am sure there are others who
like terminal deletion.

My only wish is that whatever fix will result from this thread is
nothing that changes the default behaviour for the main bulk of dired
users that are used to it and can cope.

My main question, though, was why you expected the trash can thing from
an interface that obviously has its roots in *nix cli programs.

	Hannes




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-30 13:26         ` Johannes Weiner
@ 2008-08-30 13:58           ` Lennart Borgman (gmail)
  2008-08-30 15:06             ` Johannes Weiner
  0 siblings, 1 reply; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-30 13:58 UTC (permalink / raw)
  To: Johannes Weiner; +Cc: Emacs Devel

Johannes Weiner wrote:
> Hi Lennart,
> 
> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
> 
>> Johannes Weiner wrote:
>>>>> Do you see the paradoxon?
>>>> I don't know. What is it? Sounds like some fairytale animal.
>>> Sorry, translation error.  Remove the -on ending by either deleting it
>>> or moving it into the trash-can.
>> Oh, I imagined a sweet animal but a bit sad and lonely animal standing
>> there watching us when we were trying to fit into a small logical
>> prison. It felt said because we were trying to defend ourselves from
>> life and all its possibilities and no one asked it for the wisdom it
>> had ...
> 
> It felt said?

It cared about our world and everything in it. And it know there are
only two roads to wisdom: making mistakes that harm yourself or others,
or listen carefully deep inside to others. But very few were really
listening. All they did was thinking "yes, that is how I see it too" and
they ignored the parts that did not fit them.

>>> Why do you expect it from the UI in the first place? 
>> Thomas Lord took some time to explain what user interface (scientific
>> and non-scientific) research had found in this area.
>>
>> I simply think it is good trying to use the result from that research.
>> (Or invalidate it, but I think that takes much, much time to try. And I
>> do not expect it to succeed.)
> 
> I already invalidated them for myself and I am sure there are others who
> like terminal deletion.

Maybe that does not really invalidate the statistical results of the
more scientific research ... - but of course if many think the same ... ;-)

> My only wish is that whatever fix will result from this thread is
> nothing that changes the default behaviour for the main bulk of dired
> users that are used to it and can cope.

That is fair though I personally want it the other way round. Those who
can cope should cope (if I may stretch your words a bit).

> My main question, though, was why you expected the trash can thing from
> an interface that obviously has its roots in *nix cli programs.

I am not sure. Maybe because I was upset. Or maybe because I expect and
hope things to evolve ;-)

> 	Hannes
> 




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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 14:03                                   ` Taylor Venable
  2008-08-30 14:11                                     ` Lennart Borgman (gmail)
  2 siblings, 1 reply; 119+ messages in thread
From: Taylor Venable @ 2008-08-30 14:03 UTC (permalink / raw)
  To: Lennart Borgman (gmail)
  Cc: jasonr, 'David House', 'Eli Zaretskii',
	emacs-devel, Phil Jackson, Drew Adams

On Sat, 30 Aug 2008 00:12:02 +0200
"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> wrote:

> Phil Jackson wrote:
> > "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
> > 
> >>>> Why not try to take that up with the GNU/Linux developers?
> >>> The simple answer is because the GNU/Linux (or rather, Unix in
> >>> general) architecture does not operate like Windows does with
> >>> respect to this tight level of integration.  Even getting the
> >>> GNOME and KDE guys to use the same place would not solve the
> >>> problem
> >> They should come together and donate their common solution for
> >> trash can handling as something that comes with the system.
> > 
> > But who gets to decide what the 'system' is? I use a very basic
> > tiled window manager and no desktop environment. All of my file
> > manipulation happens in the shell or dired (whichever I'm nearest
> > at the time). So, do rm and emacs need to know about it? Does unlink
> > () need to know about it? The filesystem? The kernel itself?
> 
> As I explained in a previous message, what I propose is an interface
> for trash can handling that always comes with the system. There need
> not be any implementation behind that interface. The deleting routine
> should ask the interface.

This "comes with the system" thing doesn't make very much sense to me.
You could use something like Gentoo where practically everything is
optional, so there is very little idea of what "comes with the system."
I think if you want to address the issue you need to focus on a
specification-compliant desktop environment, rather than saying
"GNU/Linux" because the latter is simply too vague.

-- 
Taylor Venable            http://real.metasyntax.net:2357/

foldr = lambda f, i, l: (len(l) == 1 and [f(l[0], i)] or
                         [f(l[0], foldr(f, i, l[1:]))])[0]




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-30 14:03                                   ` Taylor Venable
@ 2008-08-30 14:11                                     ` Lennart Borgman (gmail)
  2008-08-30 22:32                                       ` Manoj Srivastava
  0 siblings, 1 reply; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-30 14:11 UTC (permalink / raw)
  To: Taylor Venable; +Cc: Emacs Devel

Taylor Venable wrote:
>> As I explained in a previous message, what I propose is an interface
>> for trash can handling that always comes with the system. There need
>> not be any implementation behind that interface. The deleting routine
>> should ask the interface.
> 
> This "comes with the system" thing doesn't make very much sense to me.
> You could use something like Gentoo where practically everything is
> optional, so there is very little idea of what "comes with the system."
> I think if you want to address the issue you need to focus on a
> specification-compliant desktop environment, rather than saying
> "GNU/Linux" because the latter is simply too vague.

Yes, of course. Fortunately (as have been said in this thread) it looks
like freedesktop.org is addressing this issue.




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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)
  1 sibling, 1 reply; 119+ messages in thread
From: Jason Rumney @ 2008-08-30 15:03 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: Lennart Borgman (gmail), Emacs Devel

Alan Mackenzie wrote:
> Aren't there effective file undelete programs for MS-Windows?  There
> certainly were for MS-DOS's FAT file system.
>   

I don't know about effective, but there are NTFS undelete utilities. It 
was easier in the MS-DOS days, because there was only ever one process 
running that could touch the filesystem. But with a modern OS, even if 
you realise your mistake immediately there will be several background 
processes that might reuse the freed disk-space quicker than you can 
type undelete.






^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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)
  0 siblings, 2 replies; 119+ messages in thread
From: Johannes Weiner @ 2008-08-30 15:06 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: Emacs Devel

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:

>>>> Why do you expect it from the UI in the first place? 
>>> Thomas Lord took some time to explain what user interface (scientific
>>> and non-scientific) research had found in this area.
>>>
>>> I simply think it is good trying to use the result from that research.
>>> (Or invalidate it, but I think that takes much, much time to try. And I
>>> do not expect it to succeed.)
>> 
>> I already invalidated them for myself and I am sure there are others who
>> like terminal deletion.
>
> Maybe that does not really invalidate the statistical results of the
> more scientific research ... - but of course if many think the same
> ... ;-)

Statistics always include outliers.  While stats draw conclusions about
broader masses, they are bad when it comes to making statements about
individuals.

>> My only wish is that whatever fix will result from this thread is
>> nothing that changes the default behaviour for the main bulk of dired
>> users that are used to it and can cope.
>
> That is fair though I personally want it the other way round. Those who
> can cope should cope (if I may stretch your words a bit).
>
>> My main question, though, was why you expected the trash can thing from
>> an interface that obviously has its roots in *nix cli programs.
>
> I am not sure. Maybe because I was upset. Or maybe because I expect and
> hope things to evolve ;-)

I might sound a bit conservative on these issues but in fact I have
tried and failed working with interfaces that are `as proven by
research' the most ergonomic ones.

And while certain tools are niche products, they still have a vivid
community like tiling window managers, text shells (have a look at the
zsh developer mailing list, THAT is innovation) and programmatically
combinable text-based utils.

I see that the main bulk of people using computers is more and more
getting away from understanding the tools they use and the tools
accomodate to that to become more and more simple to use intuitively and
with more mechanisms that protect ignorant users from their own actions.

But in this process they lose power.  I noticed that when I watched a
friend of mine resizing images one by one, for hours.  Sure, he didn't
have to learn much because the program was intuitive.  But I read into
the manpage for a text-based util that does the same job for 10 minutes
and did his resizing work that would have taken _hours_ in literally
_minutes_.

Still, every average Windows user would tell me that resizing images
with Photoshop is a more modern way than using ImageMagick.  Even if
it's inefficient to ludicrous dimensions.

If people want `modern' interfaces that are accepted by broad masses
then there is enough supply of tools that does that for them.

Just because the average desktop environment has `evolved' into
something that even untrained people can use does not mean that it is
technically better and more usable.  It might be instantly usable but
not much else.

And if you call it evolving to accomodate for untrained users while
punishing those who know their tools, then, yes, I really hope Emacs
does not evolve much.

Seriously, Emacs is one of the rare tools that can still be used
efficiently and without annoyance and I use it for exact that reason.  I
don't need a mouse for it, it does not have stupid popups and when I ask
it to delete a file it deletes it instead of moving it.

I like Emacs because it is NOT like all the others, because it has NOT
broken heuristics that get in my way in really annoying ways.

Again, *nix-like interfaces might not have so many users as other
interfaces have but there *is* demand for it and if you don't like it,
adjust the tool or use a different one.

And in Emacs, you have all the power to hack something up that does the
trash-can disposal of files.  But please don't change the default
behaviour that integrates really well with the overall philosophy.

From my experience with the GNU coreutils I expect Emacs to delete a
file when I ask it to delete a file.

	Hannes




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-30 15:06             ` Johannes Weiner
@ 2008-08-30 17:23               ` René Kyllingstad
  2008-08-30 20:40               ` Lennart Borgman (gmail)
  1 sibling, 0 replies; 119+ messages in thread
From: René Kyllingstad @ 2008-08-30 17:23 UTC (permalink / raw)
  To: Johannes Weiner; +Cc: Lennart Borgman (gmail), Emacs Devel

* Johannes Weiner:
>  I see that the main bulk of people using computers is more and more
>  getting away from understanding the tools they use and the tools
>  accomodate to that to become more and more simple to use intuitively and
>  with more mechanisms that protect ignorant users from their own actions.
>  
>  But in this process they lose power.  I noticed that when I watched a
>  friend of mine resizing images one by one, for hours.

[snipped story]

>  I like Emacs because it is NOT like all the others, because it has NOT
>  broken heuristics that get in my way in really annoying ways.
>  
>  Again, *nix-like interfaces might not have so many users as other
>  interfaces have but there *is* demand for it and if you don't like it,
>  adjust the tool or use a different one.

I agree with the philosophy of this, but don't think it really applies for
deletion of files.  It might be that simple permanent deletion have the
virtues of being simple to implement and fast to execute, but it's not
really what most people want, if given a choice.  We want:

  1. delete, but with easy undelete until the space is really needed for
     something else
  2. fast
  3. safe delete, when the information _must_ be gone for privacy/security
     reasons rather than to reclaim disk space and remove clutter

The current behaviour is neither 1 nor 3, but depending on the FS it might
be 2.  I guess some of the disagreement here is because there might not be
any FS that supports 1, having a trash can but emptying automatically if
needed without noticable performace impact.


-- René




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 13:28   ` Lennart Borgman (gmail)
@ 2008-08-30 18:37     ` Werner LEMBERG
  2008-08-31 12:31       ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 119+ messages in thread
From: Werner LEMBERG @ 2008-08-30 18:37 UTC (permalink / raw)
  To: lennart.borgman; +Cc: emacs-devel

> > I use the `libtrash' library very successfully to prevent
> > accidental data loss (since I mainly work on the console which
> > never uses the trash folder of the GUI).
>
> Sounds interesting. At what level does it interface?

At the lowest one.  Here some snippets of the README:

  libtrash is a shared library which, when preloaded, will intercept
  calls to a series of GNU libc functions and make sure that, if an
  attempt to destroy certain files is made, these won't be permanently
  destroyed but rather moved to a "trash can".  It also allows the
  user to mark certain directories as "unremovable", which means that
  calls to functions which would result in the loss of files under
  these directories will always fail, leaving those files untouched in
  their original locations.

  (This last feature is meant as a higher-level substitute for ext2fs'
  "immutable" flag for use by those of us who rely on other file
  systems.  An important difference is that libtrash allows
  non-privileged users to use this with their personal files.)

  The GNU libc functions which can be overriden/"wrapped" are

  - unlink() / unlinkat();
  - rename() / renameat();
  - fopen() / fopen64();
  - freopen() / freopen64();
  - open() / openat() / open64() / openat64().

  You can individually enable / disable each of these "protections";
  by default, only calls to the first two functions are intercepted.

  [...]

  libtrash recreates the directory structure of your home directory
  under the trash can, which means that, should you need to recover
  the mistakenly deleted file /home/user/programming/test.c, it will
  be stored in /home/user/Trash/programming/test.c.  If you have
  instructed libtrash to also store copies of files which you delete
  in directories outside of your home dir (see libtrash.conf for
  details), they will be available under Trash/SYSTEM_ROOT.  E.g.:
  after deletion by the user joe, /common-dir/doc.txt will be
  available at /home/joe/Trash/SYSTEM_ROOT/common-dir/doc.txt.

I have a cron job which simply deletes files in the `Trash' directory
older than 24 hours (using a script which comes with the libtrash
library).


    Werner




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-30 15:03         ` Jason Rumney
@ 2008-08-30 20:22           ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-30 20:22 UTC (permalink / raw)
  To: Jason Rumney; +Cc: Alan Mackenzie, Emacs Devel

Jason Rumney wrote:
> Alan Mackenzie wrote:
>> Aren't there effective file undelete programs for MS-Windows?  There
>> certainly were for MS-DOS's FAT file system.
>>   
> 
> I don't know about effective, but there are NTFS undelete utilities. It
> was easier in the MS-DOS days, because there was only ever one process
> running that could touch the filesystem. But with a modern OS, even if
> you realise your mistake immediately there will be several background
> processes that might reuse the freed disk-space quicker than you can
> type undelete.

I downloaded nfsundelete.iso after my little accident. From this you can
burn a bootable cd that can be used for trying to get files back.




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-30 15:06             ` Johannes Weiner
  2008-08-30 17:23               ` René Kyllingstad
@ 2008-08-30 20:40               ` Lennart Borgman (gmail)
  1 sibling, 0 replies; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-30 20:40 UTC (permalink / raw)
  To: Johannes Weiner; +Cc: Emacs Devel

Johannes Weiner wrote:
>>> My only wish is that whatever fix will result from this thread is
>>> nothing that changes the default behaviour for the main bulk of dired
>>> users that are used to it and can cope.
>>
>> That is fair though I personally want it the other way round. Those who
>> can cope should cope (if I may stretch your words a bit).
>
> I see that the main bulk of people using computers is more and more
> getting away from understanding the tools they use and the tools
> accomodate to that to become more and more simple to use intuitively and
> with more mechanisms that protect ignorant users from their own actions.
> 
> But in this process they lose power.

Do you really lose power if the default is better for people that are
new comers to Emacs?





^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-30  9:49                                   ` Phil Jackson
  2008-08-30 10:18                                     ` Alan Mackenzie
@ 2008-08-30 20:41                                     ` Lennart Borgman (gmail)
  1 sibling, 0 replies; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-30 20:41 UTC (permalink / raw)
  To: Phil Jackson; +Cc: emacs-devel

Phil Jackson wrote:
> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
> 
>>> One can make assumptions about a Windows system (like every user using
>>> explorer.exe), but not really about a GNU/Linux system.
>> Is not that then a shortcoming of GNU/Linux compared with Windows?
> 
> No with GNU/Linux you have choice. My system works exactly the way I
> want it and not the way any corp. wants it to.

It is a wonder if it works exactly as you want. Not even Emacs do that
for me ...




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-30  5:10                               ` tomas
@ 2008-08-30 21:26                                 ` David De La Harpe Golden
  2008-08-31  4:53                                   ` tomas
  0 siblings, 1 reply; 119+ messages in thread
From: David De La Harpe Golden @ 2008-08-30 21:26 UTC (permalink / raw)
  To: tomas
  Cc: Lennart Borgman (gmail), jasonr, Taylor Venable,
	'David House', 'Eli Zaretskii', emacs-devel,
	Drew Adams

tomas@tuxteam.de wrote:
> On Sat, Aug 30, 2008 at 03:16:14AM +0100, David De La Harpe Golden wrote:
> 
>> IMO the optional-per-volume-trash-dir aspects are particularly iffy,
> 
> Sure. The Windows method of dealing with network-hosted files is so
> superior (just deleting *without* moving to trash!). Let's do that,
> because that's what users expect (no!) </sarcasm>
> 

Huh? While that is awfully stupid of windows (quelle surprise), it's
quite obviously usually possible to just backup the files trashed from
netmounted volumes, like other volumes, to the user's "home trash", as
the spec itself recommends as a failsafe fallback.   (I did say
"ever-less-relevant inefficiencies" - I'm fully aware such copying might
be "wasteful", but it is a simpler and easier to assure secure scheme.)





























^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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-30 23:04                                         ` David De La Harpe Golden
  0 siblings, 2 replies; 119+ messages in thread
From: Manoj Srivastava @ 2008-08-30 22:32 UTC (permalink / raw)
  To: emacs-devel

On Sat, 30 Aug 2008 16:11:17 +0200, Lennart Borgman (gmail) <lennart.borgman@gmail.com> said: 

> Taylor Venable wrote:
>>> As I explained in a previous message, what I propose is an interface
>>> for trash can handling that always comes with the system. There need
>>> not be any implementation behind that interface. The deleting
>>> routine should ask the interface.
>> 
>> This "comes with the system" thing doesn't make very much sense to
>> me.  You could use something like Gentoo where practically everything
>> is optional, so there is very little idea of what "comes with the
>> system."  I think if you want to address the issue you need to focus
>> on a specification-compliant desktop environment, rather than saying
>> "GNU/Linux" because the latter is simply too vague.

> Yes, of course. Fortunately (as have been said in this thread) it
> looks like freedesktop.org is addressing this issue.

        You can't assume that a GNU/Linux graphical environment has
 anything whatsoever to do with freedesktop.org.  At debconf earlier
 this month, I raely saw anyone using the default GNOME/KDE
 environments -- and I personally use fvwm as a window manager, so there
 is no trashcan -- thank goodness.

        manoj
-- 
"The geeks shall inherit the earth." Karl Lehenbauer
Manoj Srivastava <srivasta@acm.org> <http://www.golden-gryphon.com/>  
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C





^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-30 22:32                                       ` Manoj Srivastava
@ 2008-08-30 22:40                                         ` Lennart Borgman (gmail)
  2008-08-31  3:35                                           ` Manoj Srivastava
  2008-08-30 23:04                                         ` David De La Harpe Golden
  1 sibling, 1 reply; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-30 22:40 UTC (permalink / raw)
  To: emacs-devel

Manoj Srivastava wrote:
> On Sat, 30 Aug 2008 16:11:17 +0200, Lennart Borgman (gmail) <lennart.borgman@gmail.com> said: 
> 
>> Taylor Venable wrote:
>>>> As I explained in a previous message, what I propose is an interface
>>>> for trash can handling that always comes with the system. There need
>>>> not be any implementation behind that interface. The deleting
>>>> routine should ask the interface.
>>> This "comes with the system" thing doesn't make very much sense to
>>> me.  You could use something like Gentoo where practically everything
>>> is optional, so there is very little idea of what "comes with the
>>> system."  I think if you want to address the issue you need to focus
>>> on a specification-compliant desktop environment, rather than saying
>>> "GNU/Linux" because the latter is simply too vague.
> 
>> Yes, of course. Fortunately (as have been said in this thread) it
>> looks like freedesktop.org is addressing this issue.
> 
>         You can't assume that a GNU/Linux graphical environment has
>  anything whatsoever to do with freedesktop.org.  At debconf earlier
>  this month, I raely saw anyone using the default GNOME/KDE
>  environments -- and I personally use fvwm as a window manager, so there
>  is no trashcan -- thank goodness.


Maybe it will soon be safe to think that the important GUI environments
do have a trash can? (With a possibility to turn it off perhaps.)

And maybe it is a waste of time to develop too many GUI environments?
Maybe it uses resources not only from those doing and using the extra
GUI environments but also from all people trying to coordinate? And then
there are all misunderstandings, miscommunications, discussions, extra
development outside to cooperate (but that might on the other hand raise
the need for standard interfaces).




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-30 22:32                                       ` Manoj Srivastava
  2008-08-30 22:40                                         ` Lennart Borgman (gmail)
@ 2008-08-30 23:04                                         ` David De La Harpe Golden
  2008-08-31  3:37                                           ` Manoj Srivastava
  1 sibling, 1 reply; 119+ messages in thread
From: David De La Harpe Golden @ 2008-08-30 23:04 UTC (permalink / raw)
  To: emacs-devel

Manoj Srivastava wrote:
> -- and I personally use fvwm as a window manager, so there
>  is no trashcan -- thank goodness.

Uhm. trashcans are not a function of the window manager‽ fvwm can be
used as a wm with gnome or kde stuff instead of their default wms (the
wm is only a small but admittedly highly visible part of a desktop
environment!) if you want.  The trashcan spec is something apps
that "delete" stuff might or might not comply with, not much to do with
the wm.  If you use fvwm and never use a gui file manager or trashcan
applet, you might seldom/never _see_ a trashcan of course. You might
want to see if you've accumulated a bunch of crap in
~/.local/share/Trash though from apps silently trashing stuff when you
thought they were deleting.














^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-30  9:36     ` Johannes Weiner
@ 2008-08-31  1:30       ` Richard M. Stallman
  2008-08-31  6:22         ` Johannes Weiner
  0 siblings, 1 reply; 119+ messages in thread
From: Richard M. Stallman @ 2008-08-31  1:30 UTC (permalink / raw)
  To: Johannes Weiner; +Cc: lord, lennart.borgman, emacs-devel

Dired is the Emacs version of a directory browser.  So I think it
makes sense to understand Dired in comparison to other directory
browsers.




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-29 15:39                       ` Alan Mackenzie
  2008-08-29 16:32                         ` Drew Adams
@ 2008-08-31  2:32                         ` Sean Sieger
  2008-08-31  2:34                           ` Lennart Borgman (gmail)
  1 sibling, 1 reply; 119+ messages in thread
From: Sean Sieger @ 2008-08-31  2:32 UTC (permalink / raw)
  To: emacs-devel

Alan Mackenzie <acm@muc.de> writes:

    Hah!  I don't use dired at all (except by accident, when I curse for
    having to type C-x k to get rid of it).

`q' might be a little less exasperating.





^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-31  2:32                         ` Sean Sieger
@ 2008-08-31  2:34                           ` Lennart Borgman (gmail)
  2008-08-31  3:28                             ` Sean Sieger
  0 siblings, 1 reply; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-31  2:34 UTC (permalink / raw)
  To: Sean Sieger; +Cc: emacs-devel

Sean Sieger wrote:
> Alan Mackenzie <acm@muc.de> writes:
> 
>     Hah!  I don't use dired at all (except by accident, when I curse for
>     having to type C-x k to get rid of it).
> 
> `q' might be a little less exasperating.

But is not that using dired a little bit ...




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-31  2:34                           ` Lennart Borgman (gmail)
@ 2008-08-31  3:28                             ` Sean Sieger
  0 siblings, 0 replies; 119+ messages in thread
From: Sean Sieger @ 2008-08-31  3:28 UTC (permalink / raw)
  To: emacs-devel

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:

    Sean Sieger wrote:

    > `q' might be a little less exasperating.

    But is not that using dired a little bit ...

I hope this thread has caused some non-readers to become readers of the
Dired section of the manual.  I really like Dired's navigational
features---originally, I liked its poetic name.





^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-30 22:40                                         ` Lennart Borgman (gmail)
@ 2008-08-31  3:35                                           ` Manoj Srivastava
  2008-08-31  3:49                                             ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 119+ messages in thread
From: Manoj Srivastava @ 2008-08-31  3:35 UTC (permalink / raw)
  To: emacs-devel

On Sun, 31 Aug 2008 00:40:03 +0200, Lennart Borgman (gmail)
<lennart.borgman@gmail.com> said:  

> Manoj Srivastava wrote:

>> You can't assume that a GNU/Linux graphical environment has anything
>> whatsoever to do with freedesktop.org.  At debconf earlier this
>> month, I raely saw anyone using the default GNOME/KDE environments --
>> and I personally use fvwm as a window manager, so there is no
>> trashcan -- thank goodness.

> Maybe it will soon be safe to think that the important GUI
> environments do have a trash can? (With a possibility to turn it off
> perhaps.)

        I am not at all sure that is a safe assumption. My phone does
 not have a trash can.  Indeed, none of the graphical user interfaces I
 have used in about 20 years of computing has _ever_ featured a
 trashcan, and I am not so sure I want to assume the future is
 necessarily different.

> And maybe it is a waste of time to develop too many GUI environments?

        Indeed. X10 was perhaps a mistake to go away from.

> Maybe it uses resources not only from those doing and using the extra
> GUI environments but also from all people trying to coordinate? And
> then there are all misunderstandings, miscommunications, discussions,
> extra development outside to cooperate (but that might on the other
> hand raise the need for standard interfaces).

        Nod. Diversity is bad. Conformity should be the goal. We shall
 all be assimilated.

        manoj
-- 
Though one were to live a hundred years without seeing the deathless
state, the life of a single day is better if one sees the deathless state.
Manoj Srivastava <srivasta@acm.org> <http://www.golden-gryphon.com/>  
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C





^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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
  0 siblings, 1 reply; 119+ messages in thread
From: Manoj Srivastava @ 2008-08-31  3:37 UTC (permalink / raw)
  To: emacs-devel

On Sun, 31 Aug 2008 00:04:42 +0100, David De La Harpe Golden <david@harpegolden.net> said: 

> Manoj Srivastava wrote:
>> -- and I personally use fvwm as a window manager, so there
>> is no trashcan -- thank goodness.

> Uhm. trashcans are not a function of the window manager‽ fvwm can be

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

        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.

        manoj
-- 
Badges?  We don't need no stinking badges.
Manoj Srivastava <srivasta@acm.org> <http://www.golden-gryphon.com/>  
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C





^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-31  3:35                                           ` Manoj Srivastava
@ 2008-08-31  3:49                                             ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-31  3:49 UTC (permalink / raw)
  To: emacs-devel

Manoj Srivastava wrote:
> On Sun, 31 Aug 2008 00:40:03 +0200, Lennart Borgman (gmail)
> <lennart.borgman@gmail.com> said:  
> 
>> Manoj Srivastava wrote:
> 
>>> You can't assume that a GNU/Linux graphical environment has anything
>>> whatsoever to do with freedesktop.org.  At debconf earlier this
>>> month, I raely saw anyone using the default GNOME/KDE environments --
>>> and I personally use fvwm as a window manager, so there is no
>>> trashcan -- thank goodness.
> 
>> Maybe it will soon be safe to think that the important GUI
>> environments do have a trash can? (With a possibility to turn it off
>> perhaps.)
> 
>         I am not at all sure that is a safe assumption. My phone does
>  not have a trash can.  Indeed, none of the graphical user interfaces I
>  have used in about 20 years of computing has _ever_ featured a
>  trashcan, and I am not so sure I want to assume the future is
>  necessarily different.

I am not sure that mean that the important GUI environments will not
have trash cans.

>> And maybe it is a waste of time to develop too many GUI environments?
> 
>         Indeed. X10 was perhaps a mistake to go away from.

No idea. And it looks unrelated to the number of GUI environments in the
sense I used it.

>> Maybe it uses resources not only from those doing and using the extra
>> GUI environments but also from all people trying to coordinate? And
>> then there are all misunderstandings, miscommunications, discussions,
>> extra development outside to cooperate (but that might on the other
>> hand raise the need for standard interfaces).
> 
>         Nod. Diversity is bad. Conformity should be the goal. We shall
>  all be assimilated.

Maybe that is a good way to solve conflicts is some cases. But I prefer
thinking over possibilities and consequences.

>         manoj




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-30 21:26                                 ` David De La Harpe Golden
@ 2008-08-31  4:53                                   ` tomas
  2008-08-31 12:25                                     ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 119+ messages in thread
From: tomas @ 2008-08-31  4:53 UTC (permalink / raw)
  To: David De La Harpe Golden
  Cc: Lennart Borgman (gmail), tomas, emacs-devel, Taylor Venable,
	'David House', 'Eli Zaretskii', jasonr,
	Drew Adams

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sat, Aug 30, 2008 at 10:26:37PM +0100, David De La Harpe Golden wrote:
> tomas@tuxteam.de wrote:
> > On Sat, Aug 30, 2008 at 03:16:14AM +0100, David De La Harpe Golden wrote:
> > 
> >> IMO the optional-per-volume-trash-dir aspects are particularly iffy,
> > 
> > Sure. The Windows method of dealing with network-hosted files is so
> > superior [...]

> Huh? While that is awfully stupid of windows (quelle surprise), it's
> quite obviously usually possible to just backup the files trashed from
> netmounted volumes [...]

Sorry. It was meant as a sarcastic remark (and as such rather
inconstructive, I apologize) towards those who want to impose whatever
inconsistent idea Windows has come up upon the rest of us.

"Move-when-in-same file system, copy-when-across filesystems for drag
and drop" is just another such case, which might be marginally defended
on Windows (they have drive letters, after all) and becomes outright
dangerous on Unixen.

As a personal note, I am very happy without any trashcan. On the
contrary: I dropped Gnome because it was accreting far too many gimmicks
of this kind.

Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIuiO0Bcgs9XrR2kYRAtqhAJ40KHmMKNAJlgEoVyQZyv0Dy15LrgCdGA2o
f1LQ8Jd6/cgO4P94GH37ebQ=
=wpX1
-----END PGP SIGNATURE-----




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-31  1:30       ` Richard M. Stallman
@ 2008-08-31  6:22         ` Johannes Weiner
  0 siblings, 0 replies; 119+ messages in thread
From: Johannes Weiner @ 2008-08-31  6:22 UTC (permalink / raw)
  To: rms; +Cc: lord, lennart.borgman, emacs-devel

"Richard M. Stallman" <rms@gnu.org> writes:

> Dired is the Emacs version of a directory browser.  So I think it
> makes sense to understand Dired in comparison to other directory
> browsers.

Yup, I do that.

And compared to my other directory browser in the GNU system, the
combination of bash, ls etc., Emacs' current behaviour is totally
consistent within its environment.

Does the GNU midnight commander has a notion of a trash can?  Or any
other GNU program besides GNOME at all?

If the freedesktop project proposes a trash-can spec, I don't mind if
the freedesktop spec conformant version of Emacs adheres to that.

But as long as Emacs supports running outside of a freedesktop
environment (as it does here), please don't impose by default a
behaviour that absolutely doesn't fit within anything else but Windows
or the freedesktop environment.

	Hannes




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-31  3:37                                           ` Manoj Srivastava
@ 2008-08-31  6:55                                             ` David De La Harpe Golden
  2008-08-31  6:59                                               ` Alfred M. Szmidt
  2008-08-31 10:46                                               ` David De La Harpe Golden
  0 siblings, 2 replies; 119+ messages in thread
From: David De La Harpe Golden @ 2008-08-31  6:55 UTC (permalink / raw)
  To: emacs-devel

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...





^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-31  6:55                                             ` David De La Harpe Golden
@ 2008-08-31  6:59                                               ` Alfred M. Szmidt
  2008-08-31  9:31                                                 ` David De La Harpe Golden
  2008-08-31 10:46                                               ` David De La Harpe Golden
  1 sibling, 1 reply; 119+ messages in thread
From: Alfred M. Szmidt @ 2008-08-31  6:59 UTC (permalink / raw)
  To: David De La Harpe Golden; +Cc: emacs-devel

How about we make delete-file and similar rename the file as a backup
file if you flip an option?  That should satisfy everyone, those who
want to have a safe-delete option can have it, those who do not,
won't.  And one doesn't need to be bothered about any special "trash
can spec" that would not follow Emacs' behaviour anyway.




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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
  0 siblings, 1 reply; 119+ messages in thread
From: David De La Harpe Golden @ 2008-08-31  9:31 UTC (permalink / raw)
  To: ams; +Cc: emacs-devel

Alfred M. Szmidt wrote:
> How about we make delete-file and similar rename the file as a backup
> file if you flip an option? 

Uhm. Might be independently useful, but do bear in mind that
delete-by-moving-to-trash is already in-trunk (in customize group
auto-save).  Lennart might want it on by default, but that's a separate
issue.   At minimum, if emacs is going to support trashcans, it should
support the windows recycle bin on windows, the macosx-style trashcan on
macosx, and the freedesktop.org style trashcan used by GNOME/KDE/XFCE
and others, so that people who  do turn on delete-by-moving-to-trash get
their files moved somewhere platform-appropriate and unsurprising.
























^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-31  6:55                                             ` David De La Harpe Golden
  2008-08-31  6:59                                               ` Alfred M. Szmidt
@ 2008-08-31 10:46                                               ` David De La Harpe Golden
  1 sibling, 0 replies; 119+ messages in thread
From: David De La Harpe Golden @ 2008-08-31 10:46 UTC (permalink / raw)
  To: emacs-devel

David De La Harpe Golden wrote:
> [2] NSWorkspaceRecycleOperation
> http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWorkspace_Class/Reference/Reference.html#//apple_ref/doc/c_ref/NSWorkspaceRecycleOperation

just noting: also see http://www.nickbrawn.com/2008/08/move-to-trash/
FSMoveObjectToTrashSync may work better but is MacOSX 10.5+ only:
http://developer.apple.com/documentation/Carbon/Reference/File_Manager/Reference/reference.html#//apple_ref/c/func/FSMoveObjectToTrashSync





^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-31  4:53                                   ` tomas
@ 2008-08-31 12:25                                     ` Lennart Borgman (gmail)
  2008-08-31 16:51                                       ` tomas
  0 siblings, 1 reply; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-31 12:25 UTC (permalink / raw)
  To: tomas; +Cc: emacs-devel

tomas@tuxteam.de wrote:
> Sorry. It was meant as a sarcastic remark (and as such rather
> inconstructive, I apologize) towards those who want to impose whatever
> inconsistent idea Windows has come up upon the rest of us.

Writing on controversiel matters is difficult. Is not "inconsistent"
another sarcasm? ;-)

I think the idea Stephen Turnbull had to stop this thread is good: Try
to write functions to switch between more platform dependent manners.

And then turn them on by default on the different platforms ... ;-)

It is very difficult avoiding stepping a bit on each other here. I think
we have to accept that instead of saying that it means anyone is
imposing something on another.




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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
  0 siblings, 2 replies; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-31 12:31 UTC (permalink / raw)
  To: Werner LEMBERG; +Cc: emacs-devel

Werner LEMBERG wrote:
>>> I use the `libtrash' library very successfully to prevent
>>> accidental data loss (since I mainly work on the console which
>>> never uses the trash folder of the GUI).
>> Sounds interesting. At what level does it interface?
> 
> At the lowest one.  Here some snippets of the README:
> 
>   libtrash is a shared library which, when preloaded, will intercept
>   calls to a series of GNU libc functions and make sure that, if an
>   attempt to destroy certain files is made, these won't be permanently
>   destroyed but rather moved to a "trash can".  It also allows the
>   user to mark certain directories as "unremovable", which means that
>   calls to functions which would result in the loss of files under
>   these directories will always fail, leaving those files untouched in
>   their original locations.

Thanks. Do I understand this correctly if I assume that you in a
flexible manner can decide which files to include in this?

Wonder if this is implemented in gnuwin32 too ...




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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)
  0 siblings, 1 reply; 119+ messages in thread
From: Alfred M. Szmidt @ 2008-08-31 13:51 UTC (permalink / raw)
  To: David De La Harpe Golden; +Cc: emacs-devel

I think it is quite a bad idea to make emacs behave like GNOME, and
other such enviroments.  Emacs is vastly different from them, and just
making users think that Emacs somehow behaves like GNOME is bad for
the users; it doesn't beave at all like GNOME.




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-31 13:51                                                   ` Alfred M. Szmidt
@ 2008-08-31 15:04                                                     ` Lennart Borgman (gmail)
  2008-08-31 16:38                                                       ` Alfred M. Szmidt
  0 siblings, 1 reply; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-31 15:04 UTC (permalink / raw)
  To: ams; +Cc: emacs-devel, David De La Harpe Golden

Alfred M. Szmidt wrote:
> I think it is quite a bad idea to make emacs behave like GNOME, and
> other such enviroments.  Emacs is vastly different from them, and just
> making users think that Emacs somehow behaves like GNOME is bad for
> the users; it doesn't beave at all like GNOME.

Are you not assuming that users do not expect Emacs to behave like other
applications in the GUI environment they are using?

I think they mostly do expect and want that from any program. Emacs is
no exception for new users as I see it.




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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)
  0 siblings, 2 replies; 119+ messages in thread
From: Alfred M. Szmidt @ 2008-08-31 16:38 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: emacs-devel, david

   > I think it is quite a bad idea to make emacs behave like GNOME,
   > and other such enviroments.  Emacs is vastly different from them,
   > and just making users think that Emacs somehow behaves like GNOME
   > is bad for the users; it doesn't beave at all like GNOME.

   Are you not assuming that users do not expect Emacs to behave like
   other applications in the GUI environment they are using?

I do not expect a KDE program to look, or behave like a GNOME program.
I do not exepct Emacs to look and behave like GNOME either, it
doesn't, just things like the keybindings are sufficiently different,
let alone that you cannot configure Emacs using the GNOME facilities.

   I think they mostly do expect and want that from any program. Emacs
   is no exception for new users as I see it.

Making emacs nice for new users is good, but it should not be the goal
since all new users will become old users.




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-31 12:25                                     ` Lennart Borgman (gmail)
@ 2008-08-31 16:51                                       ` tomas
  2008-08-31 20:22                                         ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 119+ messages in thread
From: tomas @ 2008-08-31 16:51 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: emacs-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, Aug 31, 2008 at 02:25:52PM +0200, Lennart Borgman (gmail) wrote:
> tomas@tuxteam.de wrote:
> > Sorry. It was meant as a sarcastic remark (and as such rather
> > inconstructive, I apologize) towards those who want to impose whatever
> > inconsistent idea Windows has come up upon the rest of us.
> 
> Writing on controversiel matters is difficult. Is not "inconsistent"
> another sarcasm? ;-)

No, this one was really genuine: Windows does undo by default *unless
the drive is a network drive* -- then it doesn't. Windows moves files on
drag-and-drop *unless it's across drives* -- then it copies. In the
second case the user has (usually) a fair chance to know the difference,
courtesy of the drive letters. In the first case, though...

Copying this behaviour to an Unix-like system (as Gnome does) makes even
the second case mystifying. How is the user supposed to know what is
mounted where?

It's those behaviours I was labelling as "inconsistent" -- this was
honest and straight and not a bit sarcastic.

> I think the idea Stephen Turnbull had to stop this thread is good: Try
> to write functions to switch between more platform dependent manners.
> 
> And then turn them on by default on the different platforms ... ;-)

This might be a sane approach. To have a "Unix" and a "Windows" flavour.
Or whatever..

> It is very difficult avoiding stepping a bit on each other here. I think
> we have to accept that instead of saying that it means anyone is
> imposing something on another.

Yep. But if you propose a different default, you might expect to hear
some screams ;-)

BTW: I'm not opposed to the idea of a "trash" can. But I'd like to see
it implemented as part of the file system. That's clean, has no security
risks, and it's not up to every single user app to (re-)implement it in a
possibly slightly different way (yes: a desktop environment is a user
app (or a bunch thereof)).

Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIuswjBcgs9XrR2kYRAsfiAJwLyGNjErcRThOmwaSUFdFsAIZlawCfa9rT
tkL9ZjM846trIjDZWAuu2SM=
=Z7mt
-----END PGP SIGNATURE-----




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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)
  1 sibling, 0 replies; 119+ messages in thread
From: David De La Harpe Golden @ 2008-08-31 17:43 UTC (permalink / raw)
  To: ams; +Cc: Lennart Borgman (gmail), emacs-devel

Alfred M. Szmidt wrote:

> I do not expect a KDE program to look, or behave like a GNOME program.

(Of course those two adhere to the same trashcan spec...)




















^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-31 12:31       ` Lennart Borgman (gmail)
@ 2008-08-31 19:26         ` Richard M. Stallman
  2008-08-31 21:49         ` Werner LEMBERG
  1 sibling, 0 replies; 119+ messages in thread
From: Richard M. Stallman @ 2008-08-31 19:26 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: emacs-devel

If any part of Emacs should use the trash can, it should do so on all
platforms.  Also, Lisp programs should not all be subjected to this,
so any trash can implementation has to be in the code for specific
user-level commands.




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-31 16:51                                       ` tomas
@ 2008-08-31 20:22                                         ` Lennart Borgman (gmail)
  2008-09-01  4:33                                           ` tomas
  0 siblings, 1 reply; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-31 20:22 UTC (permalink / raw)
  To: tomas; +Cc: emacs-devel

tomas@tuxteam.de wrote:
> On Sun, Aug 31, 2008 at 02:25:52PM +0200, Lennart Borgman (gmail) wrote:
>> tomas@tuxteam.de wrote:
>>> Sorry. It was meant as a sarcastic remark (and as such rather
>>> inconstructive, I apologize) towards those who want to impose whatever
>>> inconsistent idea Windows has come up upon the rest of us.
>> Writing on controversiel matters is difficult. Is not "inconsistent"
>> another sarcasm? ;-)
> 
...
> It's those behaviours I was labelling as "inconsistent" -- this was
> honest and straight and not a bit sarcastic.

Yes, I know (but thanks for the details). But "whatever inconsistent
idea Window has come up upon" is perhaps a bit disparaging (though I
tend to believe you did not notice yourself)? Not that I am very fond of
w32, but saves time to avoid both disparaging and adoring expressions
during discussions.

If someone want to express something like that it is much better to do
that separately in my opinion. And I am trying to learn that myself ...

> Yep. But if you propose a different default, you might expect to hear
> some screams ;-)

I think I know ;-)

> BTW: I'm not opposed to the idea of a "trash" can. But I'd like to see
> it implemented as part of the file system. That's clean, has no security
> risks, and it's not up to every single user app to (re-)implement it in a
> possibly slightly different way (yes: a desktop environment is a user
> app (or a bunch thereof)).

Agreed.




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  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)
  1 sibling, 0 replies; 119+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-31 20:25 UTC (permalink / raw)
  To: ams; +Cc: emacs-devel, david

Alfred M. Szmidt wrote:
>    > I think it is quite a bad idea to make emacs behave like GNOME,
>    > and other such enviroments.  Emacs is vastly different from them,
>    > and just making users think that Emacs somehow behaves like GNOME
>    > is bad for the users; it doesn't beave at all like GNOME.
> 
>    Are you not assuming that users do not expect Emacs to behave like
>    other applications in the GUI environment they are using?
> 
> I do not expect a KDE program to look, or behave like a GNOME program.

That is fine and I expect you to not expect that ;-)

But why extrapolate that to the potential base of new users that are out
there, somewhere?




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-31 12:31       ` Lennart Borgman (gmail)
  2008-08-31 19:26         ` Richard M. Stallman
@ 2008-08-31 21:49         ` Werner LEMBERG
  1 sibling, 0 replies; 119+ messages in thread
From: Werner LEMBERG @ 2008-08-31 21:49 UTC (permalink / raw)
  To: lennart.borgman; +Cc: emacs-devel

> >   libtrash is a shared library which, when preloaded, will
> >   intercept calls to a series of GNU libc functions and make sure
> >   that, if an attempt to destroy certain files is made, these
> >   won't be permanently destroyed but rather moved to a "trash
> >   can".  [...]
> 
> Thanks. Do I understand this correctly if I assume that you in a
> flexible manner can decide which files to include in this?

Of course.  For example, to make firefox not use the trash mechanism,
say

  TRASH_OFF=YES firefox

on the command line.  Globally, you can specify which files and
directories are never handled; this is compiled into the library.  All
users can add a local `.libtrash' file in the home directory.


    Werner




^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: Why @#! is not Emacs using the Recycle bin on w32?
  2008-08-31 20:22                                         ` Lennart Borgman (gmail)
@ 2008-09-01  4:33                                           ` tomas
  0 siblings, 0 replies; 119+ messages in thread
From: tomas @ 2008-09-01  4:33 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: tomas, emacs-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, Aug 31, 2008 at 10:22:26PM +0200, Lennart Borgman (gmail) wrote:
> tomas@tuxteam.de wrote:
> > On Sun, Aug 31, 2008 at 02:25:52PM +0200, Lennart Borgman (gmail) wrote:

[...]

> Yes, I know (but thanks for the details). But "whatever inconsistent
> idea Window has come up upon" is perhaps a bit disparaging (though I
> tend to believe you did not notice yourself)?

It wasn't meant to disparage you. If it felt like that, I'm sorry. I
definitely don't like Windows (I guess it shows :), but worse for me is
free systems imitating its behaviour even on those obviously bad cases
which become even worse in an Unixy context (copy vs. move).

>                                               Not that I am very fond of
> w32, but saves time to avoid both disparaging and adoring expressions
> during discussions.

Hey. That's difficult (there are emotions involved after all :). But
I'll try.

[rest elided  -- agreement]

Thanks
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIu3C0Bcgs9XrR2kYRAp62AJ4iLORvq142VzXZwC+je1pLTbBFxwCeI/fX
9IehmVf3kCX46aMJVeUEFLg=
=v7Q7
-----END PGP SIGNATURE-----




^ permalink raw reply	[flat|nested] 119+ messages in thread

end of thread, other threads:[~2008-09-01  4:33 UTC | newest]

Thread overview: 119+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).