From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daimrod Subject: Re: analog of org-element-at-point for objects? Date: Mon, 10 Mar 2014 10:26:29 +0900 Message-ID: <871tyaj12y.fsf@tanger.home> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51992) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMozG-0002cD-8S for emacs-orgmode@gnu.org; Sun, 09 Mar 2014 21:26:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WMozF-0007OD-50 for emacs-orgmode@gnu.org; Sun, 09 Mar 2014 21:26:38 -0400 Received: from mail-pb0-x22f.google.com ([2607:f8b0:400e:c01::22f]:36492) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMozE-0007O9-Te for emacs-orgmode@gnu.org; Sun, 09 Mar 2014 21:26:37 -0400 Received: by mail-pb0-f47.google.com with SMTP id up15so6571487pbc.20 for ; Sun, 09 Mar 2014 18:26:35 -0700 (PDT) In-Reply-To: (John Kitchin's message of "Sun, 9 Mar 2014 20:25:48 -0400") 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 John Kitchin writes: Hi John, > Is there an easy way to to get the object at point? I found > org-element-at-point, but what I need is to determine if point is on a > link of a particular type, and links appear to be objects rather than > elements. I think that `org-element-context' is what you're looking for. > an alternative solution for me would be how do you move point to the > beginning of a link (if it is on a link)? I found org-next-link and > org-previous-link, but neither of these move you to the beginning of > the current link. Then, I could use org-element-link-parser, but that > only works with point at the beginning of a link. > > The reason I was looking into this is here: http://kitchingroup.cheme.cmu.edu/blog/2014/03/07/Storing-label-links-in-org-mode/ > > It just seems there must be a better way than I implemented. thanks! Best, -- Daimrod/Greg