emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <schulte.eric@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [babel] using #+call for inline results
Date: Mon, 27 Jun 2011 11:45:11 -0700	[thread overview]
Message-ID: <877h87jeq0.fsf@gmail.com> (raw)
In-Reply-To: <87mxh38amn.fsf@ucl.ac.uk> (Eric S. Fraga's message of "Mon, 27 Jun 2011 18:09:04 +0100")

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> Eric Schulte <schulte.eric@gmail.com> writes:
>>
>> I've just pushed up an implementation for inline call blocks, the new
>> syntax is described in the documentation but a simple example is below.
>>
>>     #+source: square
>>     #+begin_src emacs-lisp :var it=0
>>       (* it it)
>>     #+end_src
>>
>>     Here is a call_square(it=4) stuck in the middle of some prose.
>>
>> Please let me know how it works and if you have any problems or
>> recommendations.
>>
>> Cheers -- Eric
>
> Eric,
>
> this was working on Friday but seems to have stopped working for me now
> completely.  For instance, your snippet above exports as
>
> \lstset{language=Lisp}
> \begin{lstlisting}
> (* it it)
> \end{lstlisting}
>
>
>
>
>   Here is a call$_{\mathrm{square}}$(it=4) stuck in the middle of some prose.
>
> I do not believe I have changed anything in my settings...
>
> I do note from the git log that you have made quite a few changes.  Has
> some setting crept in that I need to configure?
>

Hmm, have you updated Org-mode in the last hour/minutes, there have
indeed been a number of changes recently.  I believe that the above
should be working now, without requiring any special configuration.

>
> Also, I note from the comments that you expect the inline call to be
> whitespace delimited.  I haven't tested this but, just in case, could I
> request that the delimiting be either whitespace or punctuation?

As this behaves currently there need only be whitespace _before_ the
inline call line, not after, so most normal punctuation usage should
work.  For example the following exports as expected on my system.

--8<---------------cut here---------------start------------->8---
#+source: square
#+begin_src emacs-lisp :var it=0
  (* it it)
#+end_src

Here is a call_square(it=4), stuck in the middle of some prose.
--8<---------------cut here---------------end--------------->8---

> There are cases where I would like the inline evaluation to be at the
> end of a sentence, for instance, or even something like:
>
>   25^2=call_square(it=25)
>

hmm, good example, so what set of characters should be allowed to prefix
and postfix such a block?  For example, = before should export however =
both before and after would be a literal example.

Cheers -- Eric

>
> Thanks,
> eric

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

  reply	other threads:[~2011-06-27 18:45 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-22 11:07 [babel] using #+call for inline results Eric S Fraga
2011-06-22 16:23 ` Eric Schulte
2011-06-22 18:22   ` Eric S Fraga
2011-06-23  5:32     ` Eric Schulte
2011-06-23  8:10       ` Eric S Fraga
2011-06-23 13:49         ` Nicolas Goaziou
2011-06-23 15:39           ` chris.m.malone
2011-06-23 17:30           ` Eric S Fraga
2011-06-23 19:55             ` Nicolas Goaziou
2011-06-24  8:11               ` Eric S Fraga
2011-06-23  9:25       ` Christian Moe
2011-06-24 22:36         ` Eric Schulte
2011-06-25 19:33           ` Eric S Fraga
2011-06-26 11:56           ` Christian Moe
2011-06-27  0:14             ` Eric Schulte
2011-06-27  6:16               ` Christian Moe
2011-06-27 17:43                 ` Eric Schulte
2011-06-27 19:01                   ` Christian Moe
2011-06-28  8:04                   ` Sebastien Vauban
2011-06-28 20:31                     ` Eric Schulte
2011-06-29  7:40                       ` Sebastien Vauban
2011-06-29 17:12                         ` Eric Schulte
2011-06-29 17:25                           ` Eric Schulte
2011-06-27 17:09           ` Eric S Fraga
2011-06-27 18:45             ` Eric Schulte [this message]
2011-06-29 16:38               ` Eric S Fraga
2011-06-29 17:59                 ` Eric Schulte
2011-06-22 17:53 ` Juan Pechiar

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=877h87jeq0.fsf@gmail.com \
    --to=schulte.eric@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).