help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: recover files deleted in Emacs on Ubuntu


From: Dirk-Jan C . Binnema
Subject: Re: recover files deleted in Emacs on Ubuntu
Date: Mon, 22 Jun 2009 07:44:20 +0300
User-agent: SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.7 Emacs/23.0.94 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

<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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]