emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt <matt@excalamus.com>
To: "Ken Mankoff" <mankoff@gmail.com>
Cc: "Org-mode list" <emacs-orgmode@gnu.org>
Subject: Re: Appending results from babel block
Date: Sat, 27 Jan 2024 21:22:10 +0100	[thread overview]
Message-ID: <18d4c963b2e.124d935012378350.8650834621085686252@excalamus.com> (raw)
In-Reply-To: <87sf2jwjhu.fsf@gmail.com>


 ---- On Sat, 27 Jan 2024 03:20:37 +0100  Ken Mankoff  wrote --- 
 
 > I'd like to append results from a babel block, but without the leading ":" that sometimes appears. Is this possible. I'm using v9.7-pre.

AFAIK, the only ways are to use 'raw' or something that wraps the result, like :wrap or 'drawer'.  As you observed, using 'raw' will "prepend" the latest output because Org doesn't consider the previous output a result.

I'm curious, what broader goal are you trying to achieve?  How does the leading ":" stop you?

 > Weirdly,
 > 
 > :results append drawer
 > 
 > Appends result #2, but then inserts all results after the first.
 
I'm not sure what you mean.  However, trying it, I see bunches of "results-end" groups.  I assume this is what you see, too?

#+BEGIN_SRC bash :results append drawer
echo "$(date)"
#+END_SRC

#+RESULTS:
:results:
Sat Jan 27 09:11:21 PM CET 2024
:end:
:results:
Sat Jan 27 09:11:21 PM CET 2024
:end:
:results:
Sat Jan 27 09:11:21 PM CET 2024
:end:

 > Is this last behavior a bug?

That's a good question.  Skimming the manual, I didn't see mention of it, although I may have missed it.  The behavior I see doesn't match my expectation.  I would expect to see:

#+RESULTS:
:results:
Sat Jan 27 09:11:21 PM CET 2024
Sat Jan 27 09:11:21 PM CET 2024
Sat Jan 27 09:11:21 PM CET 2024
:end:

--
Matt Trzcinski
Emacs Org contributor (ob-shell)
Learn more about Org mode at https://orgmode.org
Support Org development at https://liberapay.com/org-mode



  reply	other threads:[~2024-01-27 20:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-27  3:19 Appending results from babel block Ken Mankoff
2024-01-27 20:22 ` Matt [this message]
2024-01-28  0:53   ` Ken Mankoff
2024-01-30 12:28     ` [FR] Append wrapped results from babel block (was: Appending results from babel block) Ihor Radchenko

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=18d4c963b2e.124d935012378350.8650834621085686252@excalamus.com \
    --to=matt@excalamus.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mankoff@gmail.com \
    /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).