emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-context at the beginning of a link
@ 2014-11-21 16:31 Alan Schmitt
  2014-11-21 22:37 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Schmitt @ 2014-11-21 16:31 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 398 bytes --]

Hello,

I'm using a function that relies on `org-element-link-parser'. According
to the documentation, the point needs to be at the element of the link
for it to work. I wrote a small function that takes me to the beginning
of a link, but it fails when the point is already at the beginning of
the link. Here is a reproducible recipe showing the problem.

Open this attached tiny org file: 

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: link.org --]
[-- Type: text/x-org, Size: 36 bytes --]

Start

[[file:link.org][link]]

End

[-- Attachment #1.3: Type: text/plain, Size: 385 bytes --]


Put the point on the 'i' of "link", for instance by (goto-char 26).

Look up the context: (org-context). I get ((:link 8 31))

Go to the beginning of the link: (goto-char 8)

Look up the context: (org-context). I get ((:link nil 31))

Is there a reason why the context is different at the beginning of the
link?

Thanks,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-22 15:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-21 16:31 org-context at the beginning of a link Alan Schmitt
2014-11-21 22:37 ` Nicolas Goaziou
2014-11-22 15:23   ` Alan Schmitt

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).