From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daimrod Subject: org-element-context doesn't parse consistently link with spaces Date: Tue, 04 Mar 2014 17:53:27 +0900 Message-ID: <87wqgabb08.fsf@tanger.home> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKl6c-0002K3-Ei for emacs-orgmode@gnu.org; Tue, 04 Mar 2014 03:53:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKl6U-0004P5-1u for emacs-orgmode@gnu.org; Tue, 04 Mar 2014 03:53:42 -0500 Received: from mail-pa0-x235.google.com ([2607:f8b0:400e:c03::235]:32812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKl6T-0004Oz-Pp for emacs-orgmode@gnu.org; Tue, 04 Mar 2014 03:53:33 -0500 Received: by mail-pa0-f53.google.com with SMTP id ld10so4985617pab.40 for ; Tue, 04 Mar 2014 00:53:32 -0800 (PST) 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@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hello, I think that there is a bug in `org-element-context' because it doesn't seem to parse link with spaces consistently. For example: #+BEGIN_EXAMPLE v [[file:test 1 2 3]] ^ #+END_EXAMPLE If the cursor is before the '1', then `org-element-context' will return: #+BEGIN_EXAMPLE (link (:type "file" :path "test" :raw-link "file:test" :application nil :se= arch-option nil :begin 26 ...)) #+END_EXAMPLE if the cursor is one or after the '1', then `org-element-context' will retu= rn: #+BEGIN_EXAMPLE (link (:type "file" :path "test%201%202%203" :raw-link "file:test%201%202%2= 03" :application nil :search-option nil :begin 1 ...)) #+END_EXAMPLE Best, =2D-=20 Daimrod/Greg --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJTFZSHAAoJEBNzVHcrZRiUlnQP/jBcMs4ak9FX5FOjGxS8Pa51 haOYxt1poemYXNXOS9FdwZw6gzO4JB3/a7rT+4ltxnVobOFbV9nU22MkufLn8vr7 Rs8EeYCXHUxXAWbdRLOXkxRihuewSymhQx1wyonWhZr6R6OsP7BKw7mv8mZMDXQa UsWlxvjF/oNwGX5P/HteScbxT/XFfkJe5NIMEPT9oHSU2ccRyRSCFwqU5ZX9UUci O+b5LtxEh1kuyuF9+TNIu2NZ5oqzSVeF4YetU5xF5U1yqc+JtFQtLS4KiyZHJFWd E+YvLvw8f4ey/z3sQ60CexnLsENmGZO15IAfuLJVg6pM8+ivDEdJwN1tlmUbtpF4 wjRSTB2eZo+jfpEbs9uLUGmubzvffgwrS/UTjIhZy7rMZZIkAIOl0CGsXRhKSc4i D62sEldJmZuvs7yqfLwRkwg7zl6x/6vJQlCnK4O4Eeku6QqdxiTvbK5r1cYC+LVI fFTc2TYVBCWpjO6a2cXjr+H9EyWI2/UU/oo0gdoxUqDNv8hQFQ91JXcqBm9kPpdq QAydk3jR7zlIU/xyK9SojyuoyMVj8nEVVXk7khT9NJYKjteVbCYLCtAD07lNJihS WefPqz55cj9po1meHbTlprM8cSDtg+IrLtSLENs73f8ew8SIGlLIaCXE+KEH5NCG 1Hbv3XzvOhlQUvbVdZFL =sGSJ -----END PGP SIGNATURE----- --=-=-=--