From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Porter Subject: Re: Disable org-babel-inline-result-wrap per inline code? Date: Wed, 21 Sep 2016 06:49:09 -0500 Message-ID: <87k2e5scay.fsf@alphapapa.net> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmg1t-0001BW-FM for emacs-orgmode@gnu.org; Wed, 21 Sep 2016 07:49:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmg1p-0007fH-AB for emacs-orgmode@gnu.org; Wed, 21 Sep 2016 07:49:32 -0400 Received: from [195.159.176.226] (port=59629 helo=blaine.gmane.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmg1p-0007do-3D for emacs-orgmode@gnu.org; Wed, 21 Sep 2016 07:49:29 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1bmg1h-00077F-UR for emacs-orgmode@gnu.org; Wed, 21 Sep 2016 13:49:21 +0200 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: emacs-orgmode@gnu.org "David A. Gershman" writes: > Given the following line: > > * Date: src_perl[:results output :exports none]{print 2016;} > > The result '2016' is surrounded by '=' so that HTML export results in > tags surrounding > the '2016'. > > According to the manual section 14.5, 'org-babel-inline-result-wrap' > defines how the results are wrapped. Executing a (print > org-babel-inline-result-wrap), I get: > > {blank line} > =%s= > =%s= > > so I attempted the following: > > * Date: src_emacs-lisp[:exports none]{(setq > org-babel-inline-result-wrap "")} src_perl[:results output :exports > none]{print 2016;} src_emacs-lisp[:exports none]{(setq > org-babel-inline-result-wrap "=%s=")} > > in the hopes of temporarily disabling the '=' wrapping. Sadly no luck. > > I don't want to globally, or even for the whole buffer turn off the > '=%s='...just on a case-by-case basis. Hi David, I haven't done anything quite like this in Org before, but I think maybe Org macros would do what you need: http://orgmode.org/manual/Macro-replacement.html According to that, "Macro expansion takes place during the very beginning of the export process." So it should be easy to write a macro that evaluates to a date in the format you need, and it should take effect when you export it to HTML. At least, that's what it sounds like to me. Please let me know what you find out. :)