From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daimrod Subject: Re: org-element-context doesn't parse consistently link with spaces Date: Wed, 05 Mar 2014 23:12:29 +0900 Message-ID: <87mwh4ag4y.fsf@tanger.home> References: <87wqgabb08.fsf@tanger.home> <87ha7clqz3.fsf@gmail.com> <87r46gahs2.fsf@tanger.home> <877g88lpwp.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52916) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLCYt-0002S4-Ox for emacs-orgmode@gnu.org; Wed, 05 Mar 2014 09:12:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WLCYl-0000AX-83 for emacs-orgmode@gnu.org; Wed, 05 Mar 2014 09:12:43 -0500 Received: from mail-pb0-x231.google.com ([2607:f8b0:400e:c01::231]:38766) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLCYk-0000AG-W0 for emacs-orgmode@gnu.org; Wed, 05 Mar 2014 09:12:35 -0500 Received: by mail-pb0-f49.google.com with SMTP id jt11so1111054pbb.22 for ; Wed, 05 Mar 2014 06:12:34 -0800 (PST) In-Reply-To: <877g88lpwp.fsf@gmail.com> (Nicolas Goaziou's message of "Wed, 05 Mar 2014 14:45:58 +0100") 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 Nicolas Goaziou writes: > Hello, > > Daimrod writes: > >> I use org-mode version release_8.0.2-101-gce5988 (I follow the git >> upstream) and I tried it with `org-element-use-cache' set to nil. > > There was no `org-element-use-cache' in Org 8.0. Could you update Org > and try again? I had forgotten to rerun make after I pulled the latest version. `org-version' now returns "8.2.5h". And you're right, it doesn't happen when `org-element-use-cache' is set to nil. However, when `org-element-use-cache' is set to t, then it looks like `org-element-context' uses the link's title instead of the link's value. e.g. #+BEGIN_EXAMPLE v-- with the cursor here, it returns (link (:type "file" :path "foo" ...)) [[file:foo][file:test 1 2 3]] ^-----------------^ when the cursor is in this zone, it returns (link (:type "file" :path "test" ...)) ^-- when the cursor is after this point (after the first space) it returns (link (:type "file" :path "test 1 2 3" ...)) #+END_EXAMPLE Best, -- Daimrod/Greg