help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to make a thread version of dired-do-copy


From: Eli Zaretskii
Subject: Re: How to make a thread version of dired-do-copy
Date: Sun, 10 Jun 2018 18:13:41 +0300

> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]