[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] canonical way to go beginning of a link
From: |
John Kitchin |
Subject: |
[O] canonical way to go beginning of a link |
Date: |
Mon, 04 Jul 2016 14:38:50 -0400 |
Is there a canonical way to jump to the beginning of a link in org-mode,
i.e. the first char?
I usually do something this like:
(goto-char (org-element-property :begin (org-element-context)))
but in things like font-lock it seems slow compared to a regexp. I have
not found a reliable regexp approach though. say I want to search back
for "cite:" with point at the ^ position below:
some text cite:a-key
^
If I run (re-search-backward "cite:") at the point above, it does not go
to the point 2 characters back.
Any ideas?
--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
- [O] canonical way to go beginning of a link,
John Kitchin <=