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

Hi Matt,

On 2024-01-27 at 12:22 -08, Matt <matt@excalamus.com> wrote...
>  ---- On Sat, 27 Jan 2024 03:20:37 +0100 Ken Mankoff wrote ---
>> 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?

Yes that's what I see in general format. You ran it 3x in on second so I can't very we're seeing the same thing. But the order becomes

1
5
4
3
2

That is, 2 is appended as expected, but then 3 is inserted after 1 but before 2, 4 is after 1 but before 3, etc.

> I would expect to see:

Again, all your strings appear the same so I can' verify order. I don't mind multiple :results: :end: drawers, I just want the order to be

1
2
3
4
5


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

I have a beancount (plain text accounting) file that is an Org file. Beancount parsing of that file ignores lines that start with "*" or "#", so I can organize finances by heading. The beancount parser fails on lines that begin with ":"

Under a given set of headings, e.g.,

* Finances
** Assets
*** Bank Foo
**** Checking

I parse the bank data (code defined elsewhere via library-of-babel) and convert to Beancount syntax with:

#+CALL: bank2bc()

I'd like to evaluate (C-c C-c) that CALL when I get a new statement each month, and have results appended, not prepended.

For accounts with a lot of transactions, I add a new  heading, and then this issue goes away.

***** 2024-01

But for accounts with few transactions, I'd like to break it by year not month, and have transactions appear in chronological order.


  -k.


  reply	other threads:[~2024-01-27 23:54 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
2024-01-28  0:53   ` Ken Mankoff [this message]
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=87fryigtx7.fsf@gmail.com \
    --to=mankoff@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=matt@excalamus.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).