From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.help Subject: Re: get Elisp reference to info files Date: Wed, 05 Aug 2015 21:23:22 -0400 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <878u9pus51.fsf@lifelogs.com> References: <871tfq1k58.fsf@nl106-137-147.student.uu.se> <87mvy93cry.fsf@robertthorpeconsulting.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1438824327 5443 80.91.229.3 (6 Aug 2015 01:25:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Aug 2015 01:25:27 +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 Aug 06 03:25:22 2015 Return-path: Envelope-to: geh-help-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 1ZN9vr-0007pA-7h for geh-help-gnu-emacs@m.gmane.org; Thu, 06 Aug 2015 03:25:19 +0200 Original-Received: from localhost ([::1]:42994 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZN9vq-00032u-DN for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Aug 2015 21:25:18 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!1.eu.feeder.erje.net!news.albasani.net!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 23 Original-X-Trace: news.albasani.net DgmBE0QrmChNtEn8lUtylhzFmCrl4+DJgue0JH80JzD/plEfHfxcCpeWt0FTqYlJbylM0UBa+qn7NHTLVpiZ0A== Original-NNTP-Posting-Date: Thu, 6 Aug 2015 01:23:23 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="r/hRdrUX1b1teYgPelYkT6P/Knc+btNv6M5iU7BbKeoYNtdTRdnyhOUcAFz8H9wfkGdl9aFZlEqtmuGl67CtzK23JYUpxaJ3xdw3I61bmW+84hWAS/sqVJQg9NPwJCxD"; mail-complaints-to="abuse@albasani.net" User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Cancel-Lock: sha1:KVOCLqe1CY+SDZAc3NZD66FcOjM= sha1:fEXe24LBU3gViccahV7QsQ1Mnbc= Original-Xref: usenet.stanford.edu gnu.emacs.help:213996 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:106281 Archived-At: On Wed, 05 Aug 2015 22:19:20 +0200 Emanuel Berg wrote: EB> Robert Thorpe writes: >> Have a look at (info "(elisp)Startup Summary") and see EB> In another thread, I asked how to automatically get EB> that kind of Elisp references to the info files. EB> I don't know if anyone replied to that, if so I missed EB> it, but here is a function that has proved to work in EB> the two cases I have tested it: EB> (defun Info-get-reference () EB> (interactive) EB> (let*((field (car (last (split-string Info-current-file "/")))) EB> (topic Info-current-node) EB> (ref (format "(info \"(%s)%s\")" field topic) )) EB> (message "Killed: %s" ref) EB> (kill-new ref)) ) In an Info page, `w' will copy the reference to the current node (the `(%s)%s' part of your format string). Ted