From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: org-context at the beginning of a link Date: Fri, 21 Nov 2014 08:31:51 -0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xrr7w-0004FK-W7 for emacs-orgmode@gnu.org; Fri, 21 Nov 2014 11:32:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xrr7q-0002Gf-P7 for emacs-orgmode@gnu.org; Fri, 21 Nov 2014 11:32:08 -0500 Received: from mx1.polytechnique.org ([129.104.30.34]:41328) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xrr7q-0002GK-JK for emacs-orgmode@gnu.org; Fri, 21 Nov 2014 11:32:02 -0500 Received: from top.local (unknown [73.15.189.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTPSA id 07EE7140A9141 for ; Fri, 21 Nov 2014 17:31:59 +0100 (CET) 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 --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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:=20 --=-=-= Content-Type: text/x-org Content-Disposition: inline; filename=link.org Start [[file:link.org][link]] End --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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 =2D-=20 OpenPGP Key ID : 040D0A3B4ED2E5C7 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iQEcBAEBCgAGBQJUb2j9AAoJEAQNCjtO0uXHQ34H/AnhaOwhj/HvHN5SijcHFPHs ZJ2s2AlA0jVkmHKZH7EQbQ+33sjOR+1YQHBgJ9GlaLoiMJYaZavPbMmjdQVTKkGA c27/Q68kAiLyPa/hDtQx0CY2SwtgfOIe5Xgn7lc+LvteFEYml7CVc7cswDan9QsH u2aZ4++685wAA/lJXcSTLyWP6Lc1I6BmfakvRdZ8ktvTt15TcZ6qc3qzQ97SQFhF MfpKbygBAS5dEF+yeh+RbldSeaeEELGsduzeL8jB3TNTNvl3XPZjvb7+W1ADxiXo 2xQbJvUQgpED43DxnfmPBmasj1A4WEj28quffXfkyYLY5EjAxgGwKVjBBaiCruw= =9uez -----END PGP SIGNATURE----- --==-=-=--