Re: [PATCH v5 3/3] git-jump: invoke emacs/emacsclient
- From
Yoichi Nakayama <yoichi.nakayama@gmail.com>
- Date
- Nov 23, 2022, 21:54 UTC
- Message-ID
- <CAF5D8-uo5rWZ-8vMz3EXVownaBEfKZ4s5R=cjX5XqHCN4DHaiQ@mail.gmail.com>
- In-Reply-To
- <feb7db00-db00-6190-47cf-9101052b9be8@dunelm.org.uk>
On Wed, Nov 23, 2022 at 11:58 PM Phillip Wood <phillip.wood123@gmail.com> wrote:
Show 9 quoted lines
> I've just tried this out and it is much nicer than v4, thank you for > tweaking it. It is a little sluggish to pop up the emacs window though - > are you sure we need the while loop? I've commented it out and it seems > to work just fine. The documentation for pop-to-buffer says it selects > the frame displaying the buffer so I don't think we need to wait before > calling select-frame-set-input-focus (I'm no emacs expert though). I do > think it would be better to quote the filename or better still call > git-jump from compilation-start as Peff suggested. It would also be nice > to stop emacsclient from printing anything in the terminal.
As I wrote in the code comment, there is a race condition in editor="emacsclient" case. You can observe it by removing the while loop and insert "sleep 1 &&" before cat command. However, the while loop can be moved to the end, which reduces latency. So, I'll change its position.
In editor="emacsclient" case, we can stop emacsclient from printing
anything in the
terminal by redirecting stdout to /dev/null. But it causes following error with
editor="emacsclient -t" case:
emacsclient: could not get terminal name
You can use editor="emacsclient -u" to suppress output.Best Wishes,
-- Yoichi NAKAYAMA