From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Mastro Newsgroups: gmane.emacs.help Subject: Re: get Elisp reference to info files Date: Fri, 7 Aug 2015 16:06:28 -0700 Message-ID: References: <871tfq1k58.fsf@nl106-137-147.student.uu.se> <87mvy93cry.fsf@robertthorpeconsulting.com> <878u9pus51.fsf@lifelogs.com> <87io8q4t8h.fsf@nl106-137-147.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1438988822 2549 80.91.229.3 (7 Aug 2015 23:07:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Aug 2015 23:07:02 +0000 (UTC) To: "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 08 01:07:01 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 1ZNqj7-0007kv-A0 for geh-help-gnu-emacs@m.gmane.org; Sat, 08 Aug 2015 01:07:01 +0200 Original-Received: from localhost ([::1]:51449 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNqj6-0000re-9h for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Aug 2015 19:07:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46850) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNqiw-0000om-5f for help-gnu-emacs@gnu.org; Fri, 07 Aug 2015 19:06:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZNqiv-0004Ik-7Y for help-gnu-emacs@gnu.org; Fri, 07 Aug 2015 19:06:50 -0400 Original-Received: from mail-ob0-x22d.google.com ([2607:f8b0:4003:c01::22d]:34203) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNqiv-0004IY-1z for help-gnu-emacs@gnu.org; Fri, 07 Aug 2015 19:06:49 -0400 Original-Received: by obbfr1 with SMTP id fr1so52609136obb.1 for ; Fri, 07 Aug 2015 16:06:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=LuDhePS6F8iTTfCTkEXDb6SR/0VyEfGvRtspAlQv2c0=; b=Vb1nrNaCvkHEh6nSQZAZ82K+0hcpFGE9O45W3SIiM26/IwpBr/c/5UWWTIa9rd+1ev xP3Mlew7MmKxF7+P6HpDoLLl6rhlDmw3u+K+kendpy+OuPevY//c4epIrdPKjoNMUa72 9l5scbvhuX6zGUouw2S/Kt3Pg+cCKVRS5wDTid8dJY5dCf4xmf24RGiaR0KyWcJ7rtcg 2f8bzGzijas36dfCaraMfwWQ9fEj36gj0BMJOp6A7+0TDsErJsWsOHKq/36bFhquf/QD Q+waqsW6Mwlfg8J/P12AxpL+W2PKfTF6RVQvfxB9I33yLhNhtXASsk2ZHQKKYANs7Joi X3Fg== X-Received: by 10.182.236.66 with SMTP id us2mr8876707obc.5.1438988808205; Fri, 07 Aug 2015 16:06:48 -0700 (PDT) Original-Received: by 10.76.168.70 with HTTP; Fri, 7 Aug 2015 16:06:28 -0700 (PDT) In-Reply-To: <87io8q4t8h.fsf@nl106-137-147.student.uu.se> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::22d 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:106334 Archived-At: >> In an Info page, `w' will copy the reference to the >> current node (the `(%s)%s' part of your format >> string). > > OK, so it will look like this: > > (defun Info-get-reference () > (interactive) > (let*((node (Info-copy-current-node-name)) > (ref (format "(info \"%s\")" node)) ) > (message "Killed: %s" ref) > (kill-new ref)) ) IIUC, `Info-copy-current-node-name' does exactly what you want when called with a 0 argument. -- john