emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Appending results from babel block


From: Ken Mankoff
Subject: Re: Appending results from babel block
Date: Sat, 27 Jan 2024 16:53:24 -0800
User-agent: mu4e 1.8.15; emacs 28.1

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 via email to

[Prev in Thread] Current Thread [Next in Thread]