From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleh Krehel Subject: Re: Conditional link export? Date: Sun, 08 Nov 2015 16:35:57 +0100 Message-ID: <87mvuoa4gy.fsf@gmail.com> References: <87ziyri8lk.fsf@gmail.com> <878u6buupy.fsf@gmail.com> <87d1vmgdt6.fsf@gmail.com> <87fv0hubym.fsf@gmail.com> <874mgwd1mi.fsf@gmail.com> <87h9kw8t1t.fsf@nicolasgoaziou.fr> <87h9kwbkv2.fsf@gmail.com> <871tc08rcc.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58400) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvS0X-0008Mt-Lf for emacs-orgmode@gnu.org; Sun, 08 Nov 2015 10:35:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZvS0U-00047d-9Q for emacs-orgmode@gnu.org; Sun, 08 Nov 2015 10:35:53 -0500 Received: from mail-wi0-x229.google.com ([2a00:1450:400c:c05::229]:37260) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvS0U-00047S-2h for emacs-orgmode@gnu.org; Sun, 08 Nov 2015 10:35:50 -0500 Received: by wiva10 with SMTP id a10so20421708wiv.0 for ; Sun, 08 Nov 2015 07:35:49 -0800 (PST) Received: from firefly (dyn069045.nbw.tue.nl. [131.155.69.45]) by smtp.gmail.com with ESMTPSA id l81sm9390076wmb.2.2015.11.08.07.35.48 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 08 Nov 2015 07:35:48 -0800 (PST) In-Reply-To: <871tc08rcc.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Sun, 08 Nov 2015 16:04:51 +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: > Oleh Krehel writes: > >> Is that a new feature? > > It is probably almost as old as Babel itself. > >> First time I've heard about it, and I did google >> for inline code block evaluation before. > > You should check the Org manual first: > > (info "(org) Structure of code blocks") OK, I was looking at http://orgmode.org/manual/Exporting-code-blocks.html instead. > >> In any case, the HTML export result of e.g. this: >> >> The current time is: src_emacs-lisp{(format "%s" >> "http://google.com" (format-time-string "%H:%M"))}. >> >> is: >> >> The current time is: <a href"> href="http://google.com/">http://google.com/">15:50</a>=. >> >> which is far from what I want. > > Try > > The current time is: src_emacs-lisp[:results html]{(format " href=%S>%s" "http://google.com" (format-time-string "%H:%M"))}. This is quite restrictive, since it implies that I want to export to HTML. What I really want is to insert a raw string, with no further processing into the export, whatever format the export may have. >> And I still think that Elisp could benefit from privileged call >> syntax. Compare: >> >> !(foo) >> >> to >> >> src_emacs-lisp{(foo)} > > I'm not a big fan of redundant syntax. Also, I'm trying to move Org > format out of Elisp's grasp. This doesn't help much either. I think it's better to have people use !(foo) than to be turned away by src_emacs-lisp[:results html]{(foo)} and use nothing at all. Besides, Elisp is a very strong library for Org. We could also have e.g. #+INLINE_LANG Elisp to set the language for !() in the current document. >> Additionally `org-edit-src-code' doesn't work for these blocks. > > Do you want to provide a patch for it? I could provide a patch for `org-edit-src-code' to work with !(). I'm not interested in using the current inline syntax. I'll implement the !(progn (foo) (bar)) style for my config anyway, then it's up to you whether you'll want to merge it or not.