From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: Build-completion using imenu search hits Date: Mon, 25 May 2009 10:08:01 -0700 Message-ID: <72280665CB674C998AAEB6B1B377A605@us.oracle.com> References: <13bc6545-754f-444c-adbc-a1fd6b004a8b@t21g2000yqi.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1243271310 26898 80.91.229.12 (25 May 2009 17:08:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 May 2009 17:08:30 +0000 (UTC) To: "=?iso-8859-1?Q?'Nordl=F6w'?=" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon May 25 19:08:23 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M8deo-0002fc-NX for geh-help-gnu-emacs@m.gmane.org; Mon, 25 May 2009 19:08:15 +0200 Original-Received: from localhost ([127.0.0.1]:52506 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M8deo-0007WB-9B for geh-help-gnu-emacs@m.gmane.org; Mon, 25 May 2009 13:08:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M8deU-0007VZ-PW for help-gnu-emacs@gnu.org; Mon, 25 May 2009 13:07:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M8deQ-0007Su-89 for help-gnu-emacs@gnu.org; Mon, 25 May 2009 13:07:54 -0400 Original-Received: from [199.232.76.173] (port=42268 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M8deP-0007Se-W9 for help-gnu-emacs@gnu.org; Mon, 25 May 2009 13:07:50 -0400 Original-Received: from acsinet11.oracle.com ([141.146.126.233]:46198) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M8deP-0004nE-At for help-gnu-emacs@gnu.org; Mon, 25 May 2009 13:07:49 -0400 Original-Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by acsinet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n4PH8JbV007171 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 25 May 2009 17:08:21 GMT Original-Received: from abhmt005.oracle.com (abhmt005.oracle.com [141.146.116.14]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n4PH7kre011624; Mon, 25 May 2009 17:07:46 GMT Original-Received: from dradamslap1 (/98.210.250.59) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 25 May 2009 10:07:41 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <13bc6545-754f-444c-adbc-a1fd6b004a8b@t21g2000yqi.googlegroups.com> Thread-Index: AcndUzutJVj8HOKuSO2gCdxyHynC3AAB6TlA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: abhmt005.oracle.com [141.146.116.14] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A010208.4A1AD05E.023F:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:64708 Archived-At: > How can I programmatically access the hits from the search done by imenu `icicle-imenu' does what you want. If you want something similar, look at its code, including the code for its more generic parent function, `icicle-search'. Basically, use the imenu regexp to parse the buffer, giving you hit strings and their locations. Use an alist of such hit+location pairs as the COLLECTION arg for `completing-read'. Given the chosen hit string, look up the location and go there.