From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>
Received: from mp0.migadu.com ([2001:41d0:303:e16b::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms8.migadu.com with LMTPS
	id SK4QDbaXtWW+0wAAqHPOHw:P1
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Sun, 28 Jan 2024 00:54:30 +0100
Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp0.migadu.com with LMTPS
	id SK4QDbaXtWW+0wAAqHPOHw
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Sun, 28 Jan 2024 00:54:30 +0100
X-Envelope-To: larch@yhetil.org
Authentication-Results: aspmx1.migadu.com;
	dkim=pass header.d=gmail.com header.s=20230601 header.b=anD5JwSR;
	spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org";
	dmarc=pass (policy=none) header.from=gmail.com
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org;
	s=key1; t=1706399670;
	h=from:from:sender:sender:reply-to:subject:subject:date:date:
	 message-id:message-id:to:to:cc:cc:mime-version:mime-version:
	 content-type:content-type:in-reply-to:in-reply-to:
	 references:references:list-id:list-help:list-unsubscribe:
	 list-subscribe:list-post:dkim-signature;
	bh=0nVCNW6fASEcn3NWnOLSdyfsZ7CY3Mrhv9336QfLwH0=;
	b=AxD5C98oWQRjLqZFUJhgySK3+/T29/d3nX851W01hPWQGcOvUXHLzD7qZsR8oDwHNb0Y4Z
	PAYQXAORf9gW1lAwB1Wv0AsTi4W+EViB05NHm5HhwC5E4Ik2+b3CXqNzvajVry+3yFdZZ4
	boDZY+7aa6/2ZnrqsLr12Sn70dD/IolUolFZm7q0TNeLGiIBLLHcx/FV1V+A8PyErfDii3
	E2PmR2p6E0jsrN7nfaW9UYc5ESLZy8PRTr+tsDCJYzJpP1ZJbI/P6/PGooaNsTWkhL2RDt
	kglpbrjlFqtXg1RbjohU4kOQ0+2/xf1XHWg3yDelmcNij5iJo/crzUTyBZuVWQ==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=pass header.d=gmail.com header.s=20230601 header.b=anD5JwSR;
	spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org";
	dmarc=pass (policy=none) header.from=gmail.com
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1706399670; a=rsa-sha256; cv=none;
	b=lL+b6IpCjJceel+xp8FsRnd8vvRk2anHMRdBxWiVPCSqc5rUud/JJwpdJMRexNeK56ZjJD
	0rV/ER5lHtqXhw6GODJRMJ/uw7PTq82zjloXZAD/sKfDi2SAVh7bpNH2n8Du8sDkS6eWcp
	0RwBaD0NczezaHZug0I5/TCSYeSmAIW54m2ilcFN5TrvH3/q7uEimXkB0HS6PMGrIZlNGc
	dO6AbK/o9gtrUfjGKp3j36nw1Ak2/t+7euuuitDCmBeQGbRamSd7foPSI00CkHfhBaNMXP
	qHCgQ5+yFooI9vq688+UUDaAsQN3NGvTw8VcTeJoNlQK2dT1GU3bU80CL4x4OA==
Received: from lists.gnu.org (lists.gnu.org [209.51.188.17])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by aspmx1.migadu.com (Postfix) with ESMTPS id D9EDE4505C
	for <larch@yhetil.org>; Sun, 28 Jan 2024 00:54:29 +0100 (CET)
Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <emacs-orgmode-bounces@gnu.org>)
	id 1rTsUU-0000Xn-Fr; Sat, 27 Jan 2024 18:53:38 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <mankoff@gmail.com>) id 1rTsUS-0000XZ-V8
 for emacs-orgmode@gnu.org; Sat, 27 Jan 2024 18:53:36 -0500
Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <mankoff@gmail.com>) id 1rTsUR-0007xX-7b
 for emacs-orgmode@gnu.org; Sat, 27 Jan 2024 18:53:36 -0500
Received: by mail-pf1-x42f.google.com with SMTP id
 d2e1a72fcca58-6ddc5faeb7fso1372379b3a.3
 for <emacs-orgmode@gnu.org>; Sat, 27 Jan 2024 15:53:34 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1706399613; x=1707004413; darn=gnu.org;
 h=mime-version:message-id:date:in-reply-to:subject:cc:to:from
 :user-agent:references:from:to:cc:subject:date:message-id:reply-to;
 bh=0nVCNW6fASEcn3NWnOLSdyfsZ7CY3Mrhv9336QfLwH0=;
 b=anD5JwSR3wF9llNisl960Q/XEnrfjft2EyDJPXReOuT6RlOvCYcyQMZu3o52soaL9I
 9YnHOZ5PNx44Gpkb3IJA0Yz7bavawrTpNAN4odf30z+ltQQaylpqoQhgnNWbdr+PhEym
 svisrWtVsQ1eteZVagexuCIVM/DuZ1qgR9aFu22HdPQNaOK6laVO5CsAK1e7c/mfBErO
 3wGVNc/z0ijHLzd+anSl6zf1HpjaPkULhS9siF1tkGev2aTRWJ6oMNg9G5P/ilO/FEjr
 WzK8DB6mcA1/tb/Tjlxm9rnFRmAaxv7IA/vhEsMYmNBp7Sgw2Kv3pK+vms6LOkygsuLx
 0mpA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1706399613; x=1707004413;
 h=mime-version:message-id:date:in-reply-to:subject:cc:to:from
 :user-agent:references:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=0nVCNW6fASEcn3NWnOLSdyfsZ7CY3Mrhv9336QfLwH0=;
 b=MjJevGwj8Utr7tv0Oe+J6ZFskaUfmjUqqgh8F0s1KryNI3EPwXhoJ0sgRFEuAiLUyl
 FVPb0dKbzcc5odBw5OdPM7XrfAcBDtpeI0dVDRAhLa10lXtl42s1uMo/291dqtl5ubR5
 oNtCHhF7DLq4i2wdD7oHWYvQN7loaiJjIr22khb0nBRPdedzTJXJ9mv3jgyosP0tQC7L
 6JNEoUIZGV5BjWe5plZMZYwhX1eDKKTP29PTsgIAy81zjj9LJhmnS+2/Nr8LUFWBkzsB
 o53omF+mVl/yoivUoLIrd3EET6PGkzgqR/AAQj+3uARXp5i07EddJ/3HgnC2cm/0aMB1
 7YmA==
X-Gm-Message-State: AOJu0Yx7W6PAEUiifVSwOrwOmL10MpsMvqM73WTn2C7TzW7Mj74oWO55
 nRnee1MfPJWilMHpmvxObjBZN+OxhaEtlf1hCHJJeXZLDed/7zf8hhGp9v7tc6o=
X-Google-Smtp-Source: AGHT+IGTZAlzZzpheKZ+OBZPaXJzmKi3pYfS7wyDT0OC5gW7H/Xr7hR+qm5/bsEoGJP9AjmACk6SBA==
X-Received: by 2002:a05:6a00:18a1:b0:6dd:c61e:2026 with SMTP id
 x33-20020a056a0018a100b006ddc61e2026mr2134008pfh.9.1706399613455; 
 Sat, 27 Jan 2024 15:53:33 -0800 (PST)
Received: from t480 ([129.222.170.55]) by smtp.gmail.com with ESMTPSA id
 fn17-20020a056a002fd100b006dd84763ce3sm3294307pfb.169.2024.01.27.15.53.31
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 27 Jan 2024 15:53:32 -0800 (PST)
References: <87sf2jwjhu.fsf@gmail.com>
 <18d4c963b2e.124d935012378350.8650834621085686252@excalamus.com>
User-agent: mu4e 1.8.15; emacs 28.1
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
In-reply-to: <18d4c963b2e.124d935012378350.8650834621085686252@excalamus.com>
Date: Sat, 27 Jan 2024 16:53:24 -0800
Message-ID: <87fryigtx7.fsf@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2607:f8b0:4864:20::42f;
 envelope-from=mankoff@gmail.com; helo=mail-pf1-x42f.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-BeenThere: emacs-orgmode@gnu.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "General discussions about Org-mode." <emacs-orgmode.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/emacs-orgmode>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=subscribe>
Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org
Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org
X-Migadu-Flow: FLOW_IN
X-Migadu-Country: US
X-Migadu-Spam-Score: -9.97
X-Migadu-Scanner: mx13.migadu.com
X-Spam-Score: -9.97
X-Migadu-Queue-Id: D9EDE4505C
X-TUID: zsNXv+FLPSUr

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.