From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sam Halliday Newsgroups: gmane.emacs.help Subject: move point to first error, without opening target buffer Date: Thu, 24 Dec 2015 15:15:30 -0800 (PST) Message-ID: <4bd36afe-1422-4300-bbc2-fc516d780bd9@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1450999223 15429 80.91.229.3 (24 Dec 2015 23:20:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Dec 2015 23:20:23 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 25 00:20:20 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aCFBD-0000iw-Fe for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Dec 2015 00:20:19 +0100 Original-Received: from localhost ([::1]:33703 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCFBC-0000ou-JJ for geh-help-gnu-emacs@m.gmane.org; Thu, 24 Dec 2015 18:20:18 -0500 X-Received: by 10.31.169.141 with SMTP id s135mr33067485vke.11.1450998931033; Thu, 24 Dec 2015 15:15:31 -0800 (PST) X-Received: by 10.50.78.73 with SMTP id z9mr653637igw.9.1450998930998; Thu, 24 Dec 2015 15:15:30 -0800 (PST) Original-Path: usenet.stanford.edu!6no683600qgy.0!news-out.google.com!l1ni1389igd.0!nntp.google.com!mv3no20783968igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2.101.49.251; posting-account=kRukCAoAAAANs-vsVh9dFwo5kp5pwnPz Original-NNTP-Posting-Host: 2.101.49.251 User-Agent: G2/1.0 Injection-Date: Thu, 24 Dec 2015 23:15:31 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:216180 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:108470 Archived-At: Dear Emacs users, I am using a package called `ag' as a faster replacement for grep (silverse= archer), 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 `c= ompile' 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 `simp= le.el' I'm pretty confused about how I can achieve that, could somebody ple= ase help? In addition, it would be far better if the hook was run when the first sear= ch result (or "error") was detected. There doesn't appear to be a hook poin= t for this, but maybe I'm wrong. Best regards, Sam