Re: [PATCH v8 0/3] git-jump: support Emacs
- From
- Phillip Wood <phillip.wood123@gmail.com>
- Date
- Nov 28, 2022, 10:13 UTC
- Message-ID
- <b79a4852-1e20-2c9a-a91c-f1ea629af402@dunelm.org.uk>
- In-Reply-To
- <pull.1423.v8.git.1669511933.gitgitgadget@gmail.com>
Hi Yoichi
On 27/11/2022 01:18, Yoichi NAKAYAMA via GitGitGadget wrote:
Show 5 quoted lines
> Add an optional argument 'stdout' to print the quickfix lines to standard > output. It can be used with M-x grep on Emacs. > > Detect emacsclient by GIT_EDITOR and invoke the function. Tested with > EDITOR="emacsclient" and EDITOR="emacsclient -t".
I've tested this version and it addresses all of my previous concerns, thanks for working on it.
Best Wishes
Phillip
Show 48 quoted lines
> Jeff King (1):
> git-jump: move valid-mode check earlier
>
> Yoichi Nakayama (2):
> git-jump: add an optional argument '--stdout'
> git-jump: invoke emacs/emacsclient
>
> contrib/git-jump/README | 10 ++++++++-
> contrib/git-jump/git-jump | 45 ++++++++++++++++++++++++++++++++++++---
> 2 files changed, 51 insertions(+), 4 deletions(-)
>
>
> base-commit: eea7033409a0ed713c78437fc76486983d211e25
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1423%2Fyoichi%2Fgit-jump-emacs-support-v8
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1423/yoichi/git-jump-emacs-support-v8
> Pull-Request: https://github.com/gitgitgadget/git/pull/1423
>
> Range-diff vs v7:
>
> 1: 446777d300d ! 1: afface9b010 git-jump: add an optional argument '--stdout'
> @@ contrib/git-jump/git-jump: mode_ws() {
> + case "$1" in
> + --stdout)
> + use_stdout=t
> -+ shift
> + ;;
> + --*)
> + usage >&2
> @@ contrib/git-jump/git-jump: mode_ws() {
> + break
> + ;;
> + esac
> ++ shift
> +done
> if test $# -lt 1; then
> usage >&2
> 2: 972d51888ba = 2: e9aa6fdf836 git-jump: move valid-mode check earlier
> 3: d8233f96175 ! 3: 048f508ca99 git-jump: invoke emacs/emacsclient
> @@ contrib/git-jump/git-jump: EOF
> + #
> + # Wait for completion of the asynchronously executed process
> + # to avoid race conditions in case of "emacsclient".
> -+ eval "$editor --eval \"(let ((buf (compilation-start \\\"cat \$1\\\" 'grep-mode))) (pop-to-buffer buf) (select-frame-set-input-focus (selected-frame)) (while (get-buffer-process buf) (sleep-for 0.1)))\""
> ++ eval "$editor --eval \"(let ((buf (grep \\\"cat \$1\\\"))) (pop-to-buffer buf) (select-frame-set-input-focus (selected-frame)) (while (get-buffer-process buf) (sleep-for 0.1)))\""
> + ;;
> + *)
> + # assume anything else is vi-compatible
>