all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Berry, Charles" <ccberry@ucsd.edu>
To: Christian Heinrich <com-orgmode-mailinglist@gladbachcity.de>
Cc: "Emacs-orgmode@gnu.org" <Emacs-orgmode@gnu.org>
Subject: Re: Problems with inline source blocks
Date: Tue, 28 May 2019 16:39:01 +0000	[thread overview]
Message-ID: <0705CEDA-C8C9-467A-9C6D-F21882DFEC8A@ucsd.edu> (raw)
In-Reply-To: <94a31341b606bc671670ea5822c42fcee5d83bcc.camel@gladbachcity.de>



> On May 27, 2019, at 9:47 AM, Christian Heinrich <com-orgmode-mailinglist@gladbachcity.de> wrote:
> 
> Hi everyone,
> 
> several issues with inline source blocks:


None of the behavior you cite is in the current master as of 28-may-2019:

4a383ee0f19a001b272097398b43312fc0655798

> 
> 1) https://orgmode.org/manual/Exporting-code-blocks.html states:
> 
>> The :exports header arguments control exporting code blocks only and
>> not inline code:


No mention of inline blocks in 14.6 Exporting Code Blocks. I guess that web page needs to update or refers to something other than master.
> 
> but https://orgmode.org/manual/Using-Header-Arguments.html#Using-Header-Arguments gives as example:
> 
>> src_haskell[:exports both]{fac 5}
> 
> Which one is true?
> 

As you can verify with your test, header args do affect inline src blocks. I believe this is consistent with the current manual.


> 2) I cannot get the results of inline blocks to be exported.
> 
> When I have a file that contains:
> 
>> Test: src_R[:exports results]{4*4} {{{results(=16=)}}}

This worked for me when exporting to an ascii buffer.

There were some problems starting with 5f5d82ed516b7b385a9258271becbfa247e94af3, but these were fixed long ago.

> 
> then the code is always exported but the results are only exported up to
> 623cc4625950f84442d4cde0faa9cc3ea0233283
> 
> but starting from 65ebb128bc380fe4795dedd655d6f7b685249842
> the results macro is ignored and the result never appears.
> 
> Looking at online documentation (other projects) like 
> https://org-babel.readthedocs.io/en/latest/eval/#inline-code-blocks I realize that this may be a
> problem in general (look at the Example sections, such as "The answer to 2 + 3 is .")
> 
> 
> 3) The source block never gets evaluated. I tried 
> src_sh{touch /tmp/test21.txt}
> but this file doesn't get created, only when I execute it directly.

I ran this and it produced the file:

src_sh{touch ~/test21.txt;echo "done"}

Without the echo, export fails as touch produces no result.

> 
> Can anyone point out what I'm doing wrong, or is this actually a bug? I can't even get a basic
> source block like
> 
> #+begin_src R :results output :session *R* :exports none
> 5*5
> #+end_src
> 
> to ignore the code when exporting (but it's not evaluated).
> 

In my test, the code is evaluated in the session, but no results are reported.
> 
> Thanks!
> Christian

If I had to guess, I'd say there is something wrong with your installation.

If you think otherwise, an ECM that runs with only a minimal init file (that you specify) might be helpful.

HTH,

Chuck

  reply	other threads:[~2019-05-28 16:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-27 16:47 Problems with inline source blocks Christian Heinrich
2019-05-28 16:39 ` Berry, Charles [this message]
2019-05-29  2:05   ` Outdated manual web pages left in place WAS: " Berry, Charles

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

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

  git send-email \
    --in-reply-to=0705CEDA-C8C9-467A-9C6D-F21882DFEC8A@ucsd.edu \
    --to=ccberry@ucsd.edu \
    --cc=Emacs-orgmode@gnu.org \
    --cc=com-orgmode-mailinglist@gladbachcity.de \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.