GNU bug report logs -
#75861
31.0.50; calc units error
Previous Next
Reported by: çağlar girit <cog <at> pelagi.cc>
Date: Sun, 26 Jan 2025 13:15:02 UTC
Severity: normal
Found in version 31.0.50
Fixed in version 31.1
Done: Ulrich Müller <ulm <at> gentoo.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
[Please use Reply All to reply, to keep the bug tracker CC'ed.]
> From: çağlar girit <cog <at> pelagi.cc>
> Date: Sun, 26 Jan 2025 22:42:25 +0100
>
> Thanks for getting back to me. I didn't omit anything. Maybe
> it's a problem with my setup. I removed the elc files and started
> an edebug and found that the error happens when trying to build
> the units table (math-standard-units in calc-units.el) when it
> encounters the entry:
> ( dB "(ln(10)/20) Np" "decibel"))
>
> Instrumenting math-find-base-units-rec, I found that the following
> clause executes when parsing the string "(ln(10)/20) Np"
>
> ((eq (car expr) 'var)
> (or (eq (nth 1 expr) 'pi)
> (error "Unknown name %s in defining expression for
> unit %s"
> (nth 1 expr) (car math-fbu-entry))))
>
> So for some reason it considers 'ln' as a variable, like 'pi'. If
> I replace '(ln(10)/20)' by its numerical value in the units table,
> there is no error anymore. I guess '(ln(10)/20)' is not being
> correctly evaluated as an expression while parsing the units
> table?
If you haven't omitted anything from the steps, then I don't
understand why I don't see the problem. And since I don't see the
problem, I cannot correlate what you say above with the problem.
Here's what I see after performing the steps you describe in Emacs 31:
[Screenshot 2025-01-27 140133.png (image/png, attachment)]
[Message part 3 (text/plain, inline)]
I don't even understand where would the dB units come into play here.
Maybe this is macOS-specific? can anyone else reproduce the problem?
This bug report was last modified 102 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.