From: Yoichi Nakayama Date: Tue, 22 Nov 2022 12:06:05 GMT Subject: Re: [PATCH v3 2/2] git-jump: invoke emacs/emacsclient Message-ID: In-Reply-To: On Tue, Nov 22, 2022 at 3:50 AM Jeff King wrote: > You'll have to either shell-quote the contents, or stuff it in a > tempfile and read it with something like "cat /path/to/tempfile" in the > emacs command (though I'm not sure if that would be racy when you're > using something like emacsclient which may exit before the main emacs > process runs the command). As you pointed out, the previous implementation has a problem in cases such as: git jump grep "hello world" The reason I avoided using temporary files in the previous implementation was a race condition when editor="emacsclient" (emacsclient exits without waiting for the asynchronous execution of the external command). But I found a way around the race condition, so I'll change to use cat on a temporary file. Thanks, -- Yoichi NAKAYAMA