* analog of org-element-at-point for objects?
@ 2014-03-10 0:25 John Kitchin
2014-03-10 1:26 ` Daimrod
0 siblings, 1 reply; 3+ messages in thread
From: John Kitchin @ 2014-03-10 0:25 UTC (permalink / raw)
To: emacs-orgmode@gnu.org
[-- Attachment #1: Type: text/plain, Size: 962 bytes --]
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.
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!
John
-----------------------------------
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu
[-- Attachment #2: Type: text/html, Size: 1333 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: analog of org-element-at-point for objects?
2014-03-10 0:25 analog of org-element-at-point for objects? John Kitchin
@ 2014-03-10 1:26 ` Daimrod
2014-03-10 1:31 ` John Kitchin
0 siblings, 1 reply; 3+ messages in thread
From: Daimrod @ 2014-03-10 1:26 UTC (permalink / raw)
To: emacs-orgmode
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: analog of org-element-at-point for objects?
2014-03-10 1:26 ` Daimrod
@ 2014-03-10 1:31 ` John Kitchin
0 siblings, 0 replies; 3+ messages in thread
From: John Kitchin @ 2014-03-10 1:31 UTC (permalink / raw)
To: Daimrod; +Cc: emacs-orgmode@gnu.org
[-- Attachment #1: Type: text/plain, Size: 1292 bytes --]
Thanks! That does seem to do what I want.
John
-----------------------------------
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu
On Sun, Mar 9, 2014 at 9:26 PM, Daimrod <daimrod@gmail.com> wrote:
> 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
>
>
[-- Attachment #2: Type: text/html, Size: 2110 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-03-10 1:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-10 0:25 analog of org-element-at-point for objects? John Kitchin
2014-03-10 1:26 ` Daimrod
2014-03-10 1:31 ` John Kitchin
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.