From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: org-element-context in table.el behavior Date: Thu, 02 Jan 2020 15:50:13 +0100 Message-ID: <8736cxykt6.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:42544) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1in1no-0004eI-6c for emacs-orgmode@gnu.org; Thu, 02 Jan 2020 09:50:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1in1nm-0005G8-L3 for emacs-orgmode@gnu.org; Thu, 02 Jan 2020 09:50:19 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:48165) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1in1nm-0005EW-FP for emacs-orgmode@gnu.org; Thu, 02 Jan 2020 09:50:18 -0500 In-Reply-To: (John Kitchin's message of "Thu, 2 Jan 2020 07:18:18 -0500") 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" To: John Kitchin Cc: org-mode-email Hello, John Kitchin writes: > I have run into a surprise with org-element-context on a link in a table.el > cell. It is best illustrated here: > > +---+------------+ > | # | name | > +---+------------+ > | 1 | [[./test.org]] | > +---+------------+ > > #+BEGIN_SRC emacs-lisp :results code > (save-excursion > (re-search-backward (concat "test." "org")) > (org-element-context)) > #+END_SRC > > > #+RESULTS: > #+begin_src emacs-lisp > (table > (:begin 1463 :end 1563 :type table\.el :tblfm nil :contents-begin nil > :contents-end nil :value "+---+------------+\n| # | name > |\n+---+------------+\n| 1 | [[./test.org]] |\n+---+------------+\n" > :post-blank 1 :post-affiliated 1463 :parent nil)) > #+end_src > [...] > Is this expected behavior, or a bug? This is expected: table.el tables, as their name suggest, are opaque to Org mode. In particular, it doesn't know how to parse them. It just feeds table.el with them at export time. Regards, -- Nicolas Goaziou