emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: Marco Wahl <marcowahlsoft@gmail.com>
Cc: Heiko Schmidt <Heiko.Schmidt@webbedtables.de>, emacs-orgmode@gnu.org
Subject: Re: ob-calc duplicate stack-element issue
Date: Wed, 18 Mar 2020 15:50:17 +0000	[thread overview]
Message-ID: <87fte57jd2.fsf@ucl.ac.uk> (raw)
In-Reply-To: <84fte5lnyd.fsf@gmail.com> (Marco Wahl's message of "Wed, 18 Mar 2020 15:47:22 +0100")

On Wednesday, 18 Mar 2020 at 15:47, Marco Wahl wrote:
> AFAICS at the org babel calc evaluation the last value of the calc stack
> gets dropped.
>
> So your workaround is okay, I think.  You can just write any dummy
> element at the bottom of each block e.g. just 0.  No need of
> duplication.  Looks a bit hackish to me but so what?

Indeed hackish.  But it does beg the question: why does ob-calc pop the
stack?  I cannot see any use case given that the stack is essentially
infinite and can be safely ignored (in most if not all cases).

Could the solution be to simply remove the =(calc-pop 1)= line at the
end of =org-babel-execute:calc= function?

Just a thought.
-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.3.6-432-g73bd24

  reply	other threads:[~2020-03-18 15:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-15 10:46 ob-calc duplicate stack-element issue Heiko Schmidt
2020-03-15 12:06 ` Eric S Fraga
2020-03-15 15:08   ` Heiko Schmidt
2020-03-18 14:47 ` Marco Wahl
2020-03-18 15:50   ` Eric S Fraga [this message]
2020-03-18 16:23     ` Marco Wahl
2020-03-18 16:41       ` Eric S Fraga
2020-04-06  4:39     ` Heiko Schmidt
2020-04-06  4:16   ` Heiko Schmidt

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=87fte57jd2.fsf@ucl.ac.uk \
    --to=e.fraga@ucl.ac.uk \
    --cc=Heiko.Schmidt@webbedtables.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=marcowahlsoft@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).