GNU bug report logs - #78635
30.1.90; wishlist: labels/comments/annotations for individual stack entries

Previous Next

Package: emacs;

Reported by: Christopher Howard <christopher <at> librehacker.com>

Date: Thu, 29 May 2025 19:05:02 UTC

Severity: wishlist

Found in version 30.1.90

Full log


Message #32 received at 78635 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Howard <christopher <at> librehacker.com>
To: Mattias EngdegÄrd <mattias.engdegard <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 78635 <at> debbugs.gnu.org
Subject: Re: bug#78635: 30.1.90; wishlist: labels/comments/annotations for
 individual stack entries
Date: Tue, 26 Aug 2025 13:41:14 -0800
I've continued to look into this a few minutes here and there, as I find time. This has proven a tricky feature to implement. My working idea is to add a fourth element onto the stack entry list, which currently has three elements per stack entry, then modify math-format-stack-value to display the fourth element. This is maybe a good plan, but not all modes of calc, like the various calc "languages", use math-format-stack-value, and a lot of calc functions will just delete the fourth element.

An even trickier part is dealing with the stack itself. It looks like the stack manipulation API, like calc-push-list and calc-top, is meant for dealing, not with entire stack entries, but just the values stored in the first element of each stack entry. But I need to deal with a whole stack entry when I'm adding a fourth element. And it will be a problem if I'm ending up needing to modify some other calc functions that need to respect the fourth element, but these functions only deal with the stored val. There is some API like calc-pop-stack which might be an exception to this, but I'm still trying to figure out how they work.

Maybe the correct approach would be to modify the stored value data structure to have a slot of some kind for a stack entry comment, but that I imagine would require a massive rewrite of the code-base.

Starting to lose steam here, trying to figure this all out by myself and with no documentation. But there are some other features I'd like to see added to Calc, so I suppose I should continue to study the code base and figure out how things work.

-- 
Christopher Howard




This bug report was last modified 24 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.