From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#17394: 24.4.50; enhancement request: split `next-error-function' functionality in two Date: Fri, 2 May 2014 21:30:41 -0700 (PDT) Message-ID: <1257238c-02c2-48f6-a4f1-c53674f87734@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1399091553 24361 80.91.229.3 (3 May 2014 04:32:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 3 May 2014 04:32:33 +0000 (UTC) To: 17394@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 03 06:32:26 2014 Return-path: Envelope-to: geb-bug-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 1WgRcf-0003t2-Uu for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 May 2014 06:32:26 +0200 Original-Received: from localhost ([::1]:47482 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgRcf-0004wF-HQ for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 May 2014 00:32:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40843) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgRcS-0004v2-V1 for bug-gnu-emacs@gnu.org; Sat, 03 May 2014 00:32:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WgRcI-0004dy-K2 for bug-gnu-emacs@gnu.org; Sat, 03 May 2014 00:32:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59888) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgRcI-0004ds-Hn for bug-gnu-emacs@gnu.org; Sat, 03 May 2014 00:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WgRcI-00016Z-5H for bug-gnu-emacs@gnu.org; Sat, 03 May 2014 00:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 May 2014 04:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 17394 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13990914834169 (code B ref -1); Sat, 03 May 2014 04:32:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 May 2014 04:31:23 +0000 Original-Received: from localhost ([127.0.0.1]:49006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WgRbe-00015B-Ce for submit@debbugs.gnu.org; Sat, 03 May 2014 00:31:22 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38959) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WgRbb-00014p-5i for submit@debbugs.gnu.org; Sat, 03 May 2014 00:31:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WgRbL-0004A0-I0 for submit@debbugs.gnu.org; Sat, 03 May 2014 00:31:14 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:45843) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgRbL-00049w-F8 for submit@debbugs.gnu.org; Sat, 03 May 2014 00:31:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40644) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgRbC-0004pB-MU for bug-gnu-emacs@gnu.org; Sat, 03 May 2014 00:31:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WgRb3-0003oA-Vj for bug-gnu-emacs@gnu.org; Sat, 03 May 2014 00:30:54 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:25918) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgRb3-0003o4-P4 for bug-gnu-emacs@gnu.org; Sat, 03 May 2014 00:30:45 -0400 Original-Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s434UhxE008023 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 3 May 2014 04:30:44 GMT Original-Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s434Uh2w029227 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 3 May 2014 04:30:43 GMT Original-Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userz7022.oracle.com (8.14.5+Sun/8.14.4) with ESMTP id s434UgS7009873 for ; Sat, 3 May 2014 04:30:42 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6691.5000 (x86)] X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:88568 Archived-At: Enhancement request, to make the `next-error' feature, or more precisely the buffers that offer it, more usable by other Lisp functions. Currently, buffers, such as `occur' and `grep', that provide `next-error' information hold the destination information for each hit in different ways, and they provide a function for the buffer-local value of `next-error-function' that does two things together: 1. Get the destination information for the next (or previous) hit, e.g. based on point in the search-hits buffer. 2. Go to that search-hit destination. What I would like to see is a buffer-local variable whose value is a function that does only #1. (This var would then be used by a function that is the value of `next-error function', to do its #1 part.) Why? Because instead of just going to the "next" or "previous" hit, I want to gather all of the hits at once, to serve as candidates (e.g. completion candidates) for another way of choosing and navigating among them (e.g. in different orders besides "next" in the hit list). (I sometimes want to in fact visit the target buffers during a #1 function call and pick up some text at or near the hit position to serve as the candidate text, if what is in the error buffer does not provide the best context for choosing. But all I'm really asking for here is to get the search-hit destinations (locations).) This is easy enough to do for each particular buffer and mode such as occur or grep separately, but each one is different. The point of variable `next-error-function' is to provide a common interface: just call the value of that function to do #1 and #2 - no need to know how the given search-hit buffer represents/maps the hit information. When I call the function (the value of the new variable) to do #1, I just want it to return the information for the next hit (its location). I do not want to actually visit the hit at that time for the user, displaying and raising the destination buffer etc. I want to gather the destination information for each of the hits, and in a buffer/mode-independent way. Essentially, I want a wrapper that provides a common interface to the hit information that is stored in the different error buffers in different ways. AFAICT, there is no such feature today, but let me know if I'm missing something obvious. And let me know if this request is not clear to you. In GNU Emacs 24.4.50.1 (i686-pc-mingw32) of 2014-04-29 on ODIEONE Bzr revision: 117031 monnier@iro.umontreal.ca-20140429151607-qnkgbymwfaj5ut= 08 Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --prefix=3D/c/Devel/emacs/snapshot/trunk --enable-checking=3Dyes,glyphs 'CFLAGS=3D-O0 -g3' LDFLAGS=3D-Lc:/Devel/emacs/lib 'CPPFLAGS=3D-DGC_MCHECK=3D1 -Ic:/Devel/emacs/include''