From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: How to make a thread version of dired-do-copy
Date: Sun, 10 Jun 2018 18:13:41 +0300 [thread overview]
Message-ID: <83602qsmhm.fsf@gnu.org> (raw)
In-Reply-To: <CACspjXdNb9Y=m8=YSYqjgJVmOwiRVjs8RJ_Qn7mVMzWcM2xXmA@mail.gmail.com> (message from Shuguang Sun on Sun, 10 Jun 2018 16:07:50 +0800)
> From: Shuguang Sun <shuguang@gmail.com>
> Date: Sun, 10 Jun 2018 16:07:50 +0800
>
> I try to make a thread version of dired-do-copy as below
>
> (defun foo-dired-do-copy ()
> (interactive)
> (make-thread #'dired-do-copy))
It makes little sense to run dired-do-copy in a separate thread,
because the primitive functions it invokes don't run asynchronously,
and therefore the new thread will not yield to the main thread. The
result will be that the main thread will be suspended for the entire
time dired-do-copy runs, I think. Which is not what you want.
> 2. if disable ido-everywhere, it raised a GUI window (in Windows 7) to ask
> the target directory instead of the minibuffer. How could I still use the
> minibuffer to input the targe directory?
Ask the user for the directory before starting the thread, then wrap
dired-do-copy in a function which fetches the directory input by the
user from some variable.
next prev parent reply other threads:[~2018-06-10 15:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-10 8:07 How to make a thread version of dired-do-copy Shuguang Sun
2018-06-10 15:13 ` Eli Zaretskii [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-06-11 8:50 Shuguang Sun
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83602qsmhm.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.