emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Conditional link export?


From: Oleh Krehel
Subject: Re: [O] Conditional link export?
Date: Sun, 08 Nov 2015 16:35:57 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Nicolas Goaziou <address@hidden> writes:

> Oleh Krehel <address@hidden> 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 "<a href=%S>%s</a>"
>> "http://google.com"; (format-time-string "%H:%M"))}.
>>
>> is:
>>
>>     The current time is: <code>&lt;a href</code>"<a
>> href="http://google.com/";>http://google.com/</a>"&gt;15:50&lt;/a&gt;=.
>>
>> which is far from what I want.
>
> Try
>
>     The current time is: src_emacs-lisp[:results html]{(format "<a
> href=%S>%s</a>" "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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]