From: Juri Linkov <juri@linkov.net>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: "Basil L. Contovounesios" <contovob@tcd.ie>,
Lars Ingebrigtsen <larsi@gnus.org>,
35385@debbugs.gnu.org
Subject: bug#35385: 27.0.50; Make dired-dwim-target aware of other frames
Date: Wed, 13 Nov 2019 23:41:16 +0200 [thread overview]
Message-ID: <87h837jvyb.fsf@mail.linkov.net> (raw)
In-Reply-To: <87ftir94l8.fsf@web.de> (Michael Heerdegen's message of "Wed, 13 Nov 2019 16:30:11 +0100")
> 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
next prev parent reply other threads:[~2019-11-13 21:41 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-22 21:47 bug#35385: 27.0.50; Make dired-dwim-target aware of other frames Basil L. Contovounesios
2019-04-22 22:11 ` Basil L. Contovounesios
2019-04-29 20:28 ` Juri Linkov
2019-06-23 17:28 ` Lars Ingebrigtsen
2019-09-16 21:11 ` Lars Ingebrigtsen
2019-09-16 21:39 ` Juri Linkov
2019-09-18 21:48 ` Juri Linkov
2019-09-19 8:18 ` martin rudalics
2019-09-19 20:43 ` Juri Linkov
2019-10-26 23:20 ` Juri Linkov
2019-11-04 19:01 ` Michael Heerdegen
2019-11-05 22:18 ` Juri Linkov
2019-11-08 19:13 ` Michael Heerdegen
2019-11-10 20:38 ` Juri Linkov
2019-11-12 21:21 ` Juri Linkov
2019-11-13 15:30 ` Michael Heerdegen
2019-11-13 21:41 ` Juri Linkov [this message]
2019-11-14 15:08 ` Michael Heerdegen
2019-11-14 23:10 ` Juri Linkov
2019-11-15 12:16 ` Michael Heerdegen
2019-11-16 22:06 ` Juri Linkov
2019-11-16 22:42 ` Michael Heerdegen
2020-08-10 11:36 ` Lars Ingebrigtsen
2019-11-14 10:13 ` Eli Zaretskii
2019-11-14 23:07 ` Juri Linkov
2019-09-19 1:51 ` Basil L. Contovounesios
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h837jvyb.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=35385@debbugs.gnu.org \
--cc=contovob@tcd.ie \
--cc=larsi@gnus.org \
--cc=michael_heerdegen@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).