unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* recover files deleted in Emacs on Ubuntu
@ 2009-05-17 23:59 funny.haha
  2009-05-18  8:19 ` Tim X
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: funny.haha @ 2009-05-17 23:59 UTC (permalink / raw)
  To: help-gnu-emacs

Dear All,

I am running GNU emacs version 22.2.1 on Ubuntu. When I am in DIRED 
mode, I can delete files by pressing SHIFT+D. My question is that: can I 
recover the deleted files in case of a mistake?

Obviously, the file is not in the Trash Can of Ubuntu. One work around 
is to associate "dired-recursive-delete' with perhaps some customized 
command that moves the file to the transh can. Does any one know how to 
do this?

Thank you for any pointer.

Kzhu


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

* Re: recover files deleted in Emacs on Ubuntu
  2009-05-17 23:59 recover files deleted in Emacs on Ubuntu funny.haha
@ 2009-05-18  8:19 ` Tim X
  2009-05-19  4:37   ` Dirk-Jan C. Binnema
  2009-05-18 19:27 ` Nikolaj Schumacher
  2009-06-21 23:20 ` Davin Pearson
  2 siblings, 1 reply; 6+ messages in thread
From: Tim X @ 2009-05-18  8:19 UTC (permalink / raw)
  To: help-gnu-emacs

"funny.haha" <funny.haha@live.ca> writes:

> Dear All,
>
> I am running GNU emacs version 22.2.1 on Ubuntu. When I am in DIRED mode, I
> can delete files by pressing SHIFT+D. My question is that: can I recover
> the deleted files in case of a mistake?
>
> Obviously, the file is not in the Trash Can of Ubuntu. One work around is
> to associate "dired-recursive-delete' with perhaps some customized command
> that moves the file to the transh can. Does any one know how to do this?
>
> Thank you for any pointer.
>
> Kzhu

don't use Shift+d. Instead, just use 'd', then when you have finished
marking all the files you want to delete with 'd', hit 'x' and they are
deleted. You are also prompted before the delete happens to confirm
thats what you want to do (with the list of files marked to be deleted
in a pop-up window.

Note that in Emacs 23, emacs will use a trash can by default. 

Tim

-- 
tcross (at) rapttech dot com dot au


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

* Re: recover files deleted in Emacs on Ubuntu
  2009-05-17 23:59 recover files deleted in Emacs on Ubuntu funny.haha
  2009-05-18  8:19 ` Tim X
@ 2009-05-18 19:27 ` Nikolaj Schumacher
  2009-06-21 23:20 ` Davin Pearson
  2 siblings, 0 replies; 6+ messages in thread
From: Nikolaj Schumacher @ 2009-05-18 19:27 UTC (permalink / raw)
  To: funny.haha; +Cc: help-gnu-emacs

"funny.haha" <funny.haha@live.ca> wrote:

> Obviously, the file is not in the Trash Can of Ubuntu. One work around is to
> associate "dired-recursive-delete' with perhaps some customized command that
> moves the file to the transh can. Does any one know how to do this?

In Emacs 23 you can set delete-by-moving-to-trash.  Don't know about
Emacs 22.

regards,
Nikolaj Schumacher




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

* Re: recover files deleted in Emacs on Ubuntu
  2009-05-18  8:19 ` Tim X
@ 2009-05-19  4:37   ` Dirk-Jan C. Binnema
  0 siblings, 0 replies; 6+ messages in thread
From: Dirk-Jan C. Binnema @ 2009-05-19  4:37 UTC (permalink / raw)
  To: Tim X; +Cc: help-gnu-emacs


On Mon, May 18, 2009 at 06:19:08PM +1000, Tim X wrote:
 
> Note that in Emacs 23, emacs will use a trash can by default. 

Note that (at least in the current pre-releases) it's not the
default. Also, it moves the files to ~/.Trash, not to the newly
standardized ~/.local/share/Trash...

I wrote about this:
http://emacs-fu.blogspot.com/2009/05/using-systems-trash-when-deleting-files.html

Best wishes,
Dirk.

-- 
Dirk-Jan C. Binnema                  Helsinki, Finland
e:djcb@djcbsoftware.nl           w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C




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

* Re: recover files deleted in Emacs on Ubuntu
  2009-05-17 23:59 recover files deleted in Emacs on Ubuntu funny.haha
  2009-05-18  8:19 ` Tim X
  2009-05-18 19:27 ` Nikolaj Schumacher
@ 2009-06-21 23:20 ` Davin Pearson
  2 siblings, 0 replies; 6+ messages in thread
From: Davin Pearson @ 2009-06-21 23:20 UTC (permalink / raw)
  To: help-gnu-emacs

On May 18, 11:59 am, "funny.haha" <funny.h...@live.ca> wrote:
> Dear All,
>
> I am running GNU emacs version 22.2.1 on Ubuntu. When I am in DIRED
> mode, I can delete files by pressing SHIFT+D. My question is that: can I
> recover the deleted files in case of a mistake?
>
> Obviously, the file is not in the Trash Can of Ubuntu. One work around
> is to associate "dired-recursive-delete' with perhaps some customized
> command that moves the file to the transh can. Does any one know how to
> do this?
>
> Thank you for any pointer.
>
> Kzhu

Try my trashcan.el

http://davin.50webs.com/research/2006/trashcan.el.html


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

* Re: recover files deleted in Emacs on Ubuntu
@ 2009-06-22  4:44 Dirk-Jan C. Binnema
  0 siblings, 0 replies; 6+ messages in thread
From: Dirk-Jan C. Binnema @ 2009-06-22  4:44 UTC (permalink / raw)
  To: help-gnu-emacs

<d0ee9d77-d858-4225-82d8-4660ce5809eb@r31g2000prh.googlegroups.com>
References: <guq8ca$jfe$1@news.eternal-september.org>
	<d0ee9d77-d858-4225-82d8-4660ce5809eb@r31g2000prh.googlegroups.com>
User-Agent: Wanderlust/2.15.6 (Almost Unreal) Emacs/23.0 Mule/6.0
(HANACHIRUSATO)
Organization: DJCBSoftware
Reply-to: djcb@djcbsoftware.nl


>>>>> Davin Pearson <davin.pearson@gmail.com> writes:

    > On May 18, 11:59 am, "funny.haha" <funny.h...@live.ca> wrote:
    >> Dear All, I am running GNU emacs version 22.2.1 on Ubuntu. When I am in
    >> DIRED mode, I can delete files by pressing SHIFT+D. My question is
    >> that: can I recover the deleted files in case of a mistake?  Obviously,
    >> the file is not in the Trash Can of Ubuntu. One work around is to
    >> associate "dired-recursive-delete' with perhaps some customized command
    >> that moves the file to the transh can. Does any one know how to do
    >> this?  Thank you for any pointer.  Kzhu

    > Try my trashcan.el

    > http://davin.50webs.com/research/2006/trashcan.el.html

I know the question was about Emacs 22, but for completeness sake: Emacs 23
/can/ support the system's trashcan, with some small trickery.

  (setq delete-by-moving-to-trash t)

will move to to ~/.Trash; this is not where Ubuntu 9.04 keeps its trash
though; a simple solution is to symlink ~/.Trash to ~/.local/share/Trash/files. 

With Davin's solution, you could use 
   (setq trashcan-dirname "~/.local/share/Trash/files")
to get similar behavior for E22.

Also see:
http://emacs-fu.blogspot.com/2009/05/using-systems-trash-when-deleting-files.html

Best wishes,
Dirk.

-- 
Dirk-Jan C. Binnema                  Helsinki, Finland
e:djcb@djcbsoftware.nl           w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C




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

end of thread, other threads:[~2009-06-22  4:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-17 23:59 recover files deleted in Emacs on Ubuntu funny.haha
2009-05-18  8:19 ` Tim X
2009-05-19  4:37   ` Dirk-Jan C. Binnema
2009-05-18 19:27 ` Nikolaj Schumacher
2009-06-21 23:20 ` Davin Pearson
  -- strict thread matches above, loose matches on Subject: below --
2009-06-22  4:44 Dirk-Jan C. Binnema

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