Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to disable copy file on drag-and-drop

Tags:

emacs

According to a doc

Emacs supports “drag and drop”: dropping a file into an ordinary Emacs window visits the file using that window. As an exception, dropping a file into a window displaying a Dired buffer moves or copies the file into the displayed directory.

How can I disable move or copy of a file in a dired mode so that emacs would visit the file in any mode?

like image 210
Oleg Pavliv Avatar asked Feb 28 '23 03:02

Oleg Pavliv


1 Answers

Set dired-dnd-protocol-alist to nil.

(setq dired-dnd-protocol-alist nil)

...or use M-x customize to do it.

like image 133
Deniz Dogan Avatar answered Mar 08 '23 03:03

Deniz Dogan