From: Po Lu Date: Sat, 19 Mar 2022 03:35:55 +0000 (+0800) Subject: Document dired-mouse-drag-files X-Git-Tag: emacs-29.0.90~1931^2~1043 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c7f085b53fe4bf0e6bc13e33b38f46f6b35a5608;p=emacs.git Document dired-mouse-drag-files * doc/emacs/dired.texi (Misc Dired Features): Explain that dragging files is now supported. * etc/NEWS: Update documentation status. * lisp/dired.el (dired-mouse-drag-files): Fix typo in doc string. --- diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index 3112ac332b3..e18c8b048bc 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi @@ -1695,9 +1695,15 @@ directory than in this one. It also marks files with no counterpart, in both directories, as always. @cindex drag and drop, Dired - On the X Window System, Emacs supports the drag and drop -protocol. You can drag a file object from another program, and drop -it onto a Dired buffer; this either moves, copies, or creates a link -to the file in that directory. Precisely which action is taken is -determined by the originating program. Dragging files out of a Dired -buffer is currently not supported. +@vindex dired-mouse-drag-files + On the X Window System, Emacs supports the drag and drop protocol. +You can drag a file object from another program, and drop it onto a +Dired buffer; this either moves, copies, or creates a link to the file +in that directory. Precisely which action is taken is determined by +the originating program. Dragging files out of a Dired buffer is also +supported, by enabling the user option @code{dired-mouse-drag-files}, +the mouse can be used to drag files onto other programs. When set to +@code{link}, it will make the other program (typically a file manager) +create a symbolic link to the file, and setting it to any other +non-@code{nil} value will make the other program open or create a copy +of the file. diff --git a/etc/NEWS b/etc/NEWS index c20d683710d..87fc3239902 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -942,6 +942,7 @@ the thumbnail file. ** Dired ++++ *** New user option 'dired-mouse-drag-files'. If non-nil, dragging file names with the mouse in a Dired buffer will initiate a drag-and-drop session allowing them to be opened in other diff --git a/lisp/dired.el b/lisp/dired.el index 2fe30d2a4e2..3790197f661 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -252,7 +252,7 @@ The target is used in the prompt for file copy, rename etc." "If non-nil, allow the mouse to drag files from inside a Dired buffer. Dragging the mouse and then releasing it over the window of another program will result in that program opening the file, or -creating a copy of it . +creating a copy of it. If the value is `link', then a symbolic link will be created to the file instead by the other program (usually a file manager)."