diff options
author | Juri Linkov <juri@linkov.net> | 2019-11-17 00:06:16 +0200 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2019-11-17 00:06:16 +0200 |
commit | 5ddec1365c1594b2a5e13383ed6acefb5098947d (patch) | |
tree | 4bb782c0c58f03ecb61b863035affd3c1bee8ac4 /lisp/dired.el | |
parent | 99271ea8de589f2ca5475ab02393c424295ff1f2 (diff) | |
download | emacs-5ddec1365c1594b2a5e13383ed6acefb5098947d.tar.gz |
* lisp/dired.el (dired-dwim-target): Add choice dired-dwim-target-next-visible
* lisp/dired-aux.el (dired-dwim-target-next): Add arg ALL-FRAMES.
(dired-dwim-target-next-visible): New function.
* doc/emacs/dired.texi (Operating on Files): Describe function value
of dired-dwim-target. (Bug#35385)
Diffstat (limited to 'lisp/dired.el')
-rw-r--r-- | lisp/dired.el | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/dired.el b/lisp/dired.el index 009018fafe5..6523e487125 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -190,16 +190,23 @@ 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. +or the most recently used window with a Dired buffer, or to use any other +function. When the value is a function, it will be called with no +arguments and is expected to return a list of directories which will +be used as defaults (i.e. default target and \"future history\") +(though, `dired-dwim-target-defaults' might modify it a bit). +The value t prefers the next windows on the same frame. The target is used in the prompt for file copy, rename etc." :type '(choice (const :tag "No guess" nil) - (function-item :tag "Prefer next windows" + (function-item :tag "Prefer next windows on the same frame" dired-dwim-target-next) + (function-item :tag "Prefer next windows on visible frames" + dired-dwim-target-next-visible) (function-item :tag "Prefer most recently used windows" dired-dwim-target-recent) - (function :tag "Your function") + (function :tag "Custom function") (other :tag "Try to guess" t)) :group 'dired) |