[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#35385: 27.0.50; Make dired-dwim-target aware of other frames
From: |
Juri Linkov |
Subject: |
bug#35385: 27.0.50; Make dired-dwim-target aware of other frames |
Date: |
Wed, 13 Nov 2019 23:41:16 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) |
> I think we should add that the non-nil value can be a function, and that
> in this case that function will be called with zero 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 sentence "You can customize it to prefer either the next window with
> a Dired buffer, or the most recently used window with a Dired buffer."
> could get appended "or something else".
Do you think this is good enough?
diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi
index 8fab508dea..d1863510d4 100644
--- a/doc/emacs/dired.texi
+++ b/doc/emacs/dired.texi
@@ -659,7 +659,10 @@ Operating on Files
some window, that other buffer's directory is suggested instead.
You can customize @code{dired-dwim-target} to prefer either the next
window with a Dired buffer, or the most recently used window with
-a Dired buffer.
+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'').
Here are the file-manipulating Dired commands that operate on files.
diff --git a/lisp/dired.el b/lisp/dired.el
index 009018fafe..15286cc9b0 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -190,7 +190,11 @@ dired-dwim-target
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 target is used in the prompt for file copy, rename etc."
:type '(choice
- bug#35385: 27.0.50; Make dired-dwim-target aware of other frames, Michael Heerdegen, 2019/11/04
- bug#35385: 27.0.50; Make dired-dwim-target aware of other frames, Juri Linkov, 2019/11/05
- bug#35385: 27.0.50; Make dired-dwim-target aware of other frames, Michael Heerdegen, 2019/11/08
- bug#35385: 27.0.50; Make dired-dwim-target aware of other frames, Juri Linkov, 2019/11/10
- bug#35385: 27.0.50; Make dired-dwim-target aware of other frames, Juri Linkov, 2019/11/12
- bug#35385: 27.0.50; Make dired-dwim-target aware of other frames, Michael Heerdegen, 2019/11/13
- bug#35385: 27.0.50; Make dired-dwim-target aware of other frames,
Juri Linkov <=
- bug#35385: 27.0.50; Make dired-dwim-target aware of other frames, Michael Heerdegen, 2019/11/14
- bug#35385: 27.0.50; Make dired-dwim-target aware of other frames, Juri Linkov, 2019/11/14
- bug#35385: 27.0.50; Make dired-dwim-target aware of other frames, Michael Heerdegen, 2019/11/15
- bug#35385: 27.0.50; Make dired-dwim-target aware of other frames, Juri Linkov, 2019/11/16
- bug#35385: 27.0.50; Make dired-dwim-target aware of other frames, Michael Heerdegen, 2019/11/16
- bug#35385: 27.0.50; Make dired-dwim-target aware of other frames, Eli Zaretskii, 2019/11/14
- bug#35385: 27.0.50; Make dired-dwim-target aware of other frames, Juri Linkov, 2019/11/14