emacsorphanage / helm-ag

The silver searcher with helm interface
492 stars 76 forks source link

next-error won't work in Edit mode keymap the 2nd time (and afterwards) of using it #405

Open xuanni opened 1 year ago

xuanni commented 1 year ago

Actual behavior

M-n M-g (next-error) only work in edit mode once per emacs session. After use it once, I have to close emacs and re-open it to make it work.

Expected behavior

M-n M-g (next-error) should work in edit mode (C-c C-e from helm-ag result) every time it's used.

Steps to reproduce

  1. Run emacs -q, setup melpa then package-initialize, install helm-ag from melpa (helm-ag-20221017.1528).
  2. Then in any directory with files, m-x helm-ag RET pattern RET, in then C-c C-e go to edit mode, M-g M-n (next-error) will bring you to the search result in the source file. (1st time of use is all good).
  3. Now C-c C-k to abort the helm-ag. Repeat step 2, the next-error returns message "marker does not point anywhere", and it won't work unless you exit and re-open emacs. Each emacs session allows only one instance of edit mode usage.

in the README, it says quote

You can use next-error and previous-error for seeing file content which current line indicates.