diff options
| author | Juri Linkov <juri@linkov.net> | 2019-11-12 23:21:14 +0200 |
|---|---|---|
| committer | Juri Linkov <juri@linkov.net> | 2019-11-12 23:21:14 +0200 |
| commit | d0351f4d2010e3e8f3ada04b045dede10f110d7f (patch) | |
| tree | e7fa73d650e3149372ec15bc98acc1dfe0b9c01c /lisp/dired.el | |
| parent | 4cccf7659a4767274b383e5fc820e27391988cc7 (diff) | |
| download | emacs-d0351f4d2010e3e8f3ada04b045dede10f110d7f.tar.gz | |
* lisp/dired.el (dired-dwim-target): Add new choices (bug#35385)
* lisp/dired.el (dired-dwim-target): Add choices
dired-dwim-target-next and dired-dwim-target-recent.
* lisp/dired-aux.el (dired-dwim-target-next)
(dired-dwim-target-recent): New functions.
(dired-dwim-target-directories): Call either of them.
* doc/emacs/dired.texi (Operating on Files): Mention new
preferences in dired-dwim-target.
Diffstat (limited to 'lisp/dired.el')
| -rw-r--r-- | lisp/dired.el | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/lisp/dired.el b/lisp/dired.el index 9d0b13e2279..009018fafe5 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -185,12 +185,22 @@ If a character, new links are unconditionally marked with that character." (defcustom dired-dwim-target nil "If non-nil, Dired tries to guess a default target directory. -This means: if there is a Dired buffer displayed in one of the most -recently selected windows, use its current directory, instead of this -Dired buffer's current directory. +This means: if there is a Dired buffer displayed in some window, +use its current directory, instead of this Dired buffer's +current directory. + +You can customize it to prefer either the next window with a Dired buffer, +or the most recently used window with a Dired buffer. The target is used in the prompt for file copy, rename etc." - :type 'boolean + :type '(choice + (const :tag "No guess" nil) + (function-item :tag "Prefer next windows" + dired-dwim-target-next) + (function-item :tag "Prefer most recently used windows" + dired-dwim-target-recent) + (function :tag "Your function") + (other :tag "Try to guess" t)) :group 'dired) (defcustom dired-copy-preserve-time t |
