emacs-devel
[Top][All Lists]
Advanced

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

Re: delete-file to trash


From: Tassilo Horn
Subject: Re: delete-file to trash
Date: Fri, 21 May 2010 22:15:13 +0200
User-agent: KMail/1.13.3 (Linux/2.6.34-gentoo; KDE/4.4.3; x86_64; ; )

On Friday 21 May 2010 21:48:43 Leo wrote:

> I still maintain a more suitable approach is to have delete-file not
> move to trash bin unless explicitly called for. For example, it can be
> implemented similarly to handle-shift-selection.

Yes, the current approach is not really perfect when you enable
`delete-by-moving-to-trash' globally, but when enabling it only for
example for eshell or dired mode, I think it's quite good.

--8<---------------cut here---------------start------------->8---
(defun th-dired-mode-init ()
  (set (make-local-variable 'delete-by-moving-to-trash) t))

(add-hook 'dired-mode-hook 'th-dired-mode-init t)
--8<---------------cut here---------------end--------------->8---

Bye,
Tassilo



reply via email to

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