From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "spamfilteraccount@gmail.com" Newsgroups: gmane.emacs.help Subject: Info index completion in Emacs 21 Date: 24 Nov 2006 00:49:17 -0800 Organization: http://groups.google.com Message-ID: <1164358156.980399.98200@h54g2000cwb.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1164391006 27498 80.91.229.2 (24 Nov 2006 17:56:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 24 Nov 2006 17:56:46 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 24 18:56:44 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GnfHv-00020p-Nr for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Nov 2006 18:56:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GnfHv-0000pV-Db for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Nov 2006 12:56:35 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!h54g2000cwb.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 25 Original-NNTP-Posting-Host: 194.88.55.211 Original-X-Trace: posting.google.com 1164358160 15657 127.0.0.1 (24 Nov 2006 08:49:20 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Fri, 24 Nov 2006 08:49:20 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.00 (X11; Linux i686; U; en),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: h54g2000cwb.googlegroups.com; posting-host=194.88.55.211; posting-account=b98TkQ0AAAD7PsllN8gfWGRoPOPWdnv4 Original-Xref: shelby.stanford.edu gnu.emacs.help:143313 Original-To: help-gnu-emacs@gnu.org 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:38929 Archived-At: This bothered me for a long a time, so I came up with a quick solution. Naturally, I only checked afterwards if someone posted a solution for this already. Sigh. Anyway, here it is if anyone's interested. I tested it with Elisp info and it seemed to work correctly: (add-hook 'Info-mode-hook (lambda () (define-key Info-mode-map "i" 'my-info-index))) (defun my-info-index () "Go to an index item in info with completion." (interactive) (Info-index "") (let ((pattern "\\* +\\([^:]*\\):.") completions) (goto-char (point-min)) (while (re-search-forward pattern nil t) (push (list (match-string 1)) completions)) (Info-index (completing-read "Index topic: " completions nil t))))