From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ecay Subject: Re: (Maybe) enhance `org-element-src-block-interpreter'? Date: Tue, 05 Aug 2014 23:39:23 -0400 Message-ID: <87oavywal0.fsf@gmail.com> References: <87tx5qvrl4.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40425) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEs4d-0003Tx-Eg for emacs-orgmode@gnu.org; Tue, 05 Aug 2014 23:39:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XEs4U-0004pp-0C for emacs-orgmode@gnu.org; Tue, 05 Aug 2014 23:39:35 -0400 Received: from mail-qg0-x233.google.com ([2607:f8b0:400d:c04::233]:37119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEs4T-0004pc-SN for emacs-orgmode@gnu.org; Tue, 05 Aug 2014 23:39:25 -0400 Received: by mail-qg0-f51.google.com with SMTP id a108so1999759qge.38 for ; Tue, 05 Aug 2014 20:39:25 -0700 (PDT) In-Reply-To: <87tx5qvrl4.fsf@gmail.com> 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: Thorsten Jolitz , emacs-orgmode@gnu.org Hi Thorsten, 2014ko abuztuak 5an, Thorsten Jolitz-ek idatzi zuen: [...] > > Parse this src-block (with point at beg of block): > > ,---- > | M-: (setq ptree (org-element-at-point)) > `---- > > #+header: :results raw > #+begin_src emacs-lisp > (message "hello world") > #+end_src > > #+results: > hello world > > Then evaluate > > #+begin_src emacs-lisp > (org-element-src-block-interpreter ptree nil) > #+end_src > > #+results: > : #+BEGIN_SRC emacs-lisp > : (message "hello world") > : #+END_SRC > > #+begin_src emacs-lisp > (tj/src-block-interpreter ptree nil) > #+end_src > > #+results: > : #+HEADER: :results raw > : #+BEGIN_SRC emacs-lisp > : (message "hello world") > : #+END_SRC Indeed this seems like an improvement on the status quo. But other elements of org syntax (not just src blocks) can have a valid #+header (and indeed other affiliated keywords, like #+attr_latex), so the fix probably should be more general. -- Aaron Ecay