all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* move point to first error, without opening target buffer
@ 2015-12-24 23:15 Sam Halliday
  2015-12-24 23:32 ` Sam Halliday
  0 siblings, 1 reply; 3+ messages in thread
From: Sam Halliday @ 2015-12-24 23:15 UTC (permalink / raw)
  To: help-gnu-emacs

Dear Emacs users,

I am using a package called `ag' as a faster replacement for grep (silversearcher), installing the emacs package like so:

    (use-package ag
      :commands ag
      :config
      (add-hook 'ag-search-finished-hook 'next-error-no-select))

for all intents and purposes, this could be any subprocess that uses the `compile' support and search results are shown as "errors".

Ag has a hook (see above) which runs when the search is complete. What I'm trying to do is to make the point jump to the first search result, so that I don't have to manually `C-x o' and then `C-s' to the hits (sometimes the preamble can be quite long).

What I have above is nearly there, but it opens the first search result in a buffer and I don't want that. I just want the point to move to the first hit so I can manually select which ones I care about. Reading through `simple.el' I'm pretty confused about how I can achieve that, could somebody please help?

In addition, it would be far better if the hook was run when the first search result (or "error") was detected. There doesn't appear to be a hook point for this, but maybe I'm wrong.

Best regards,
Sam


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-12-25  0:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-24 23:15 move point to first error, without opening target buffer Sam Halliday
2015-12-24 23:32 ` Sam Halliday
2015-12-25  0:11   ` Sam Halliday

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.