From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: fetching the description from a link string Date: Mon, 16 Nov 2015 10:45:41 +0100 Message-ID: <87h9kmb7lm.fsf@gmx.us> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44312) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyGMC-0000ap-3M for emacs-orgmode@gnu.org; Mon, 16 Nov 2015 04:45:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyGM8-0000Lc-TB for emacs-orgmode@gnu.org; Mon, 16 Nov 2015 04:45:52 -0500 Received: from plane.gmane.org ([80.91.229.3]:40104) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyGM8-0000LY-Lu for emacs-orgmode@gnu.org; Mon, 16 Nov 2015 04:45:48 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZyGM6-0004f2-S0 for emacs-orgmode@gnu.org; Mon, 16 Nov 2015 10:45:46 +0100 Received: from 62.80.108.9 ([62.80.108.9]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 Nov 2015 10:45:46 +0100 Received: from rasmus by 62.80.108.9 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 Nov 2015 10:45:46 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Alan Schmitt writes: > Hello, > > I cannot seem to find in org.el a function that will return the > description part of a link. I'm probably missing it … Could someone tell > me if such a function exists? org-element-context on a link will give you what you want. It lives in org-element, though. Something like this when point is on a link, (let ((e (org-element-context))) (buffer-substring-no-properties (org-element-property :contents-begin e) (org-element-property :contents-end e))) Hope it helps, Rasmus -- Sådan en god dansk lagereddike kan man slet ikke bruge mere