From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Newsgroups: gmane.emacs.help Subject: Re: elisp-index-search on current word Date: Wed, 8 Oct 2008 09:11:01 -0700 (PDT) Organization: http://groups.google.com Message-ID: <765c9d83-3749-4a7b-873b-e9e305efbe40@i24g2000prf.googlegroups.com> References: <36eff0bb-4e77-474a-97f2-820fdc077900@t18g2000prt.googlegroups.com> <87prmbdv6h.fsf@manatee.domain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1223484300 5107 80.91.229.12 (8 Oct 2008 16:45:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Oct 2008 16:45:00 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 08 18:45:56 2008 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 1Knc7K-0007pO-Da for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Oct 2008 18:42:30 +0200 Original-Received: from localhost ([127.0.0.1]:54838 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Knc6G-0002Pr-Fb for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Oct 2008 12:41:24 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!i24g2000prf.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 40 Original-NNTP-Posting-Host: 24.6.185.159 Original-X-Trace: posting.google.com 1223482261 7366 127.0.0.1 (8 Oct 2008 16:11:01 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 8 Oct 2008 16:11:01 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: i24g2000prf.googlegroups.com; posting-host=24.6.185.159; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.22, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:163205 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:58548 Archived-At: On Oct 8, 7:21=C2=A0am, Andy Stewart wrote: > Kevin Rodgers writes: > >Xahwrote: > >> when i do elisp-index-search, is there a way to make the default > >> choice the symbol the cursor is on? > > > (defadvice elisp-index-search (before interactive-default activate) > > =C2=A0 "Provide the symbol at point as the default when reading TOPIC i= nteractively." > > =C2=A0 (interactive (list (read-string "Topic: " nil nil (thing-at-poin= t 'symbol))))) > > (defun elisp-index-search+ () > =C2=A0 "Look up TOPIC in the indices of the Emacs Lisp Reference Manual." > =C2=A0 (interactive) > =C2=A0 (let (topic) > =C2=A0 =C2=A0 (setq topic (read-string (concat "Subject to look up: ") ni= l nil (symbol-name (symbol-at-point)))) > =C2=A0 =C2=A0 (funcall 'switch-to-buffer-other-window nil) > =C2=A0 =C2=A0 (info "elisp") > =C2=A0 =C2=A0 (Info-index topic))) Thierry wrote: ,---- | (defun tv-get-index-at-point () | (interactive) | (let ((expr (thing-at-point 'sexp))) | (elisp-index-search expr))) `---- among the 3 suggestions, it seems only Thierry's version works for me. is there a reason why it shouldn't prompt for current symbol? I think its also useful for describe-function to provide a link to the elisp manual at bottom. I just filed a bug report btw. Xah =E2=88=91 http://xahlee.org/ =E2=98=84