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: Thu, 9 Oct 2008 08:00:59 -0700 (PDT) Organization: http://groups.google.com Message-ID: <489a1e3f-8a7d-4bf8-bf3a-a2ef06eddea6@i20g2000prf.googlegroups.com> References: <36eff0bb-4e77-474a-97f2-820fdc077900@t18g2000prt.googlegroups.com> <87prmbdv6h.fsf@manatee.domain> <765c9d83-3749-4a7b-873b-e9e305efbe40@i24g2000prf.googlegroups.com> 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 1223567215 25925 80.91.229.12 (9 Oct 2008 15:46:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Oct 2008 15:46:55 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 09 17:47:51 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 1Knxfe-00079V-Hy for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Oct 2008 17:43:22 +0200 Original-Received: from localhost ([127.0.0.1]:58878 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Knxea-0001dG-Ll for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Oct 2008 11:42:16 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newsfeed.stanford.edu!postnews.google.com!i20g2000prf.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 46 Original-NNTP-Posting-Host: 24.6.185.159 Original-X-Trace: posting.google.com 1223564459 19515 127.0.0.1 (9 Oct 2008 15:00:59 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 9 Oct 2008 15:00:59 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: i20g2000prf.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:163281 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:58625 Archived-At: On Oct 8, 7:49=C2=A0pm, Kevin Rodgers wrote: > Xah wrote: > > On Oct 8, 7:21 am, 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= interactively." > >>> =C2=A0 (interactive (list (read-string "Topic: " nil nil (thing-at-po= int 'symbol))))) > >> (defun elisp-index-search+ () > >> =C2=A0 "Look up TOPIC in the indices of the Emacs Lisp Reference Manua= l." > >> =C2=A0 (interactive) > >> =C2=A0 (let (topic) > >> =C2=A0 =C2=A0 (setq topic (read-string (concat "Subject to look up: ")= nil 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 () > > | =C2=A0 (interactive) > > | =C2=A0 (let ((expr (thing-at-point 'sexp))) > > | =C2=A0 =C2=A0 (elisp-index-search expr))) > > `---- > > > among the 3 suggestions, it seems only Thierry's version works for me. > > What happens when you call my version or Andy's version? it didn't prompt the symbol under cursor. I tried up arrow but i didn't try down arrow; should've. I filed a bug report on this issue. I think it should prompt the symbol under cursor like most other lookup commands such as describe- function, where the current symbol is shown inside the prompt text. Xah =E2=88=91 http://xahlee.org/ =E2=98=84