emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Daimrod <daimrod@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: analog of org-element-at-point for objects?
Date: Mon, 10 Mar 2014 10:26:29 +0900	[thread overview]
Message-ID: <871tyaj12y.fsf@tanger.home> (raw)
In-Reply-To: <CAJ51ETo6CALauPEVh9yhOgitx59+gUJvvoH9eyxPUtCmHsWcGQ@mail.gmail.com> (John Kitchin's message of "Sun, 9 Mar 2014 20:25:48 -0400")

John Kitchin <jkitchin@andrew.cmu.edu> 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

  reply	other threads:[~2014-03-10  1:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-10  0:25 analog of org-element-at-point for objects? John Kitchin
2014-03-10  1:26 ` Daimrod [this message]
2014-03-10  1:31   ` John Kitchin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871tyaj12y.fsf@tanger.home \
    --to=daimrod@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).