From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: org-element-context in table.el behavior Date: Thu, 02 Jan 2020 11:03:46 -0500 Message-ID: References: <8736cxykt6.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:55180) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1in2ww-0001Ia-Um for emacs-orgmode@gnu.org; Thu, 02 Jan 2020 11:03:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1in2wv-0006Us-HT for emacs-orgmode@gnu.org; Thu, 02 Jan 2020 11:03:50 -0500 Received: from mail-qt1-x830.google.com ([2607:f8b0:4864:20::830]:43261) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1in2wv-0006UZ-DX for emacs-orgmode@gnu.org; Thu, 02 Jan 2020 11:03:49 -0500 Received: by mail-qt1-x830.google.com with SMTP id d18so32265093qtj.10 for ; Thu, 02 Jan 2020 08:03:49 -0800 (PST) In-reply-to: <8736cxykt6.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou Cc: org-mode-email Ok, thanks for confirming! Nicolas Goaziou writes: > 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, -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu