From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Emacs can't capture fzf output in Windows 10
Date: Mon, 02 Mar 2020 10:42:54 +0200 [thread overview]
Message-ID: <83d09vywoh.fsf@gnu.org> (raw)
In-Reply-To: <tencent_7CE77BEB2C9CCC5972C0EFA6577447FCB908@qq.com> (shuguang79@qq.com)
> From: "Shuguang Sun" <shuguang79@qq.com>
> Date: Mon, 2 Mar 2020 12:25:48 +0800
>
> I'm trying to use fzf (junegunn/fzf) in windows, however it seems emacs can't capture the output of fzf.
>
>
> Example: fzf with -filter will be in filter mode and do not start interactive finder.
>
> - In shell (cmd): "fzf.exe --filter=tmp" will not exit
> - In shell (cmd): "fzf.exe --filter=tmp > aa.txt" will not exit
>
> - (call-process "cmd.exe" nil t nil "/C" "start" "fzf" "--filter=tmp") will give a flash window (with list of findings) and print 0 in emacs.
>
> - (shell-command "fzf --filter=tmp") will lead to a message (Shell command failed with code 1 and no output)
> - (shell-command-to-string "fzf --filter=tmp") give a empty string
>
>
> However if I run "fzf --filter=tmp" in the CMD box it will provide a list of finding, and "fzf --filter=tmp > aa.txt" will print the findings to file aa.txt.
>
>
> It can't run fzf in interactive mode as I understand there is no true term for emacs in windows but why it can't be run in filter mode?
It looks like fzf uses direct screen I/O? If so, this won't work on
Windows when stdout is a pipe, which is what happens when Emacs on
Windows runs a subprocess.
I suggest to open an issue with fzf, and ask there whether it can run
with pipes as stdin/stdout.
prev parent reply other threads:[~2020-03-02 8:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-02 4:25 Emacs can't capture fzf output in Windows 10 Shuguang Sun
2020-03-02 8:42 ` Eli Zaretskii [this message]
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=83d09vywoh.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.
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).