emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Oleh Krehel <ohwoeowho@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Conditional link export?
Date: Sun, 08 Nov 2015 16:35:57 +0100	[thread overview]
Message-ID: <87mvuoa4gy.fsf@gmail.com> (raw)
In-Reply-To: <871tc08rcc.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Sun, 08 Nov 2015 16:04:51 +0100")

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Oleh Krehel <ohwoeowho@gmail.com> 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	other threads:[~2015-11-08 15:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-06 13:02 Conditional link export? Oleh Krehel
2015-11-06 13:24 ` Aaron Ecay
2015-11-06 13:26   ` Aaron Ecay
2015-11-07 13:05   ` Oleh Krehel
2015-11-07 14:21     ` Aaron Ecay
2015-11-07 16:23       ` Achim Gratz
2015-11-08 14:09       ` Oleh Krehel
2015-11-08 14:27         ` Nicolas Goaziou
2015-11-08 14:56           ` Oleh Krehel
2015-11-08 15:04             ` Nicolas Goaziou
2015-11-08 15:35               ` Oleh Krehel [this message]
2015-11-08 16:06                 ` Nicolas Goaziou
     [not found]                   ` <m2k2ps9x9o.fsf@andrew.cmu.edu>
     [not found]                     ` <8737wg6zi3.fsf@nicolasgoaziou.fr>
     [not found]                       ` <m2ziy6vsw2.fsf@andrew.cmu.edu>
     [not found]                         ` <87io4tpsu2.fsf@nicolasgoaziou.fr>
2015-11-22 23:08                           ` John Kitchin
2015-11-08 18:03         ` Aaron Ecay
2015-11-06 13:28 ` John Kitchin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mvuoa4gy.fsf@gmail.com \
    --to=ohwoeowho@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).