unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattiase@acm.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Andreas Schwab <schwab@suse.de>, Eythan Weg <eythanweg@gmail.com>,
	27765@debbugs.gnu.org
Subject: bug#27765: 26.0.50; Calc b% and relch are inconsistent in algebraic and rpn modes
Date: Fri, 3 Sep 2021 11:22:15 +0200	[thread overview]
Message-ID: <58A8A2B5-D624-4279-811C-3E652A449BBD@acm.org> (raw)
In-Reply-To: <87y28e13j2.fsf@gnus.org>

3 sep. 2021 kl. 10.12 skrev Lars Ingebrigtsen <larsi@gnus.org>:

> But perhaps others have other opinions; I've added Mattias to the CCs --
> perhaps he has some comments.

I'm afraid I have nothing clever to say about it. It seems understandable that `relch`, or `calcFunc-relch` in Lisp, follows the convention of just returning the value and not concern itself with its presentation. `b%` is an interactive command and therefore may take an interest in how the result is presented to the user. A weak argument, but perhaps it makes some sort of sense.

I have no idea what would break if we changed `calcFunc-relch` to return something like `(calcFunc-percent 25)` instead of 0.25. Maybe it just works.

Regarding the uniform display of percentages in org-mode: spreadsheet applications tend to use formatting of cells or columns when a certain presentation (like percentage or a certain number of decimals) is desirable. On the other hand, some functions in popular spreadsheets do return values adorned with a presentation hint; this is the case for financial functions that compute interest, for example.

Maybe Calc assumes that someone who uses b% is a HP-12C type of person and wants a percentage, while those using algebraic mode get plain values.






  reply	other threads:[~2021-09-03  9:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-19 12:37 bug#27765: 26.0.50; Calc b% and relch are inconsistent in algebraic and rpn modes Eythan Weg
2017-07-19 12:54 ` Andreas Schwab
2017-07-19 13:49   ` Eythan Weg
2017-07-19 14:10     ` Andreas Schwab
2017-07-19 17:59       ` Eythan Weg
2021-09-03  8:12         ` Lars Ingebrigtsen
2021-09-03  9:22           ` Mattias Engdegård [this message]
2021-09-03 14:56             ` Lars Ingebrigtsen

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.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=58A8A2B5-D624-4279-811C-3E652A449BBD@acm.org \
    --to=mattiase@acm.org \
    --cc=27765@debbugs.gnu.org \
    --cc=eythanweg@gmail.com \
    --cc=larsi@gnus.org \
    --cc=schwab@suse.de \
    /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.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).