GNU bug report logs - #40185
28.0.50; Emacs Calc selection of a sub-formula doesn't highlight it

Previous Next

Package: emacs;

Reported by: Narendra Joshi <narendraj9 <at> gmail.com>

Date: Sun, 22 Mar 2020 18:25:01 UTC

Severity: normal

Found in version 28.0.50

Done: Mattias Engdegård <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#40185: closed (28.0.50; Emacs Calc selection of a sub-formula
 doesn't highlight it)
Date: Mon, 23 Mar 2020 20:38:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 23 Mar 2020 21:37:40 +0100
with message-id <7F26B461-ABA9-4E84-9DB0-6F9B6832EA28 <at> acm.org>
and subject line Re: #40185: 28.0.50; Emacs Calc selection of a sub-formula doesn't highlight it
has caused the debbugs.gnu.org bug report #40185,
regarding 28.0.50; Emacs Calc selection of a sub-formula doesn't highlight it
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
40185: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=40185
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Narendra Joshi <narendraj9 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; Emacs Calc selection of a sub-formula doesn't highlight it
Date: Sun, 22 Mar 2020 19:24:05 +0100
+ Start Emacs Calc with `C-x * *`.
+ Enter the following formula with:
 ' (a + b)^3 / c d
+ Move point to be before "+" and use "j s" to select the 
sub-formula "(a + b)".
+ This should have hidden the rest of the formula. But it does 
not.

          3
   (a + b)
1*  --------
     c d

Selecting a Calc sub-formula doesn't highlight it. For example, in 
the stack entry above, I have selected (a + b) but other parts of 
the formula are still visible. All commands operate on the 
selected formula and it is selected as evident from the '*' after 
the number of the stack entry. It is not highlighted. This seems 
to be working fine in Emacs 26. It's broken in the latest Emacs 
versions: Emacs 27 and Emacs 28. I can confirm that it is not 
happening because of any of my configuration because I tried the 
same thing with `emacs -Q` and the result was the same.

Best, 
-- 
Narendra Joshi


[Message part 3 (message/rfc822, inline)]
From: Mattias Engdegård <mattiase <at> acm.org>
To: Narendra Joshi <narendraj9 <at> gmail.com>
Cc: 40185-done <at> debbugs.gnu.org
Subject: Re: #40185: 28.0.50; Emacs Calc selection of a sub-formula doesn't
 highlight it
Date: Mon, 23 Mar 2020 21:37:40 +0100
23 mars 2020 kl. 20.06 skrev Narendra Joshi <narendraj9 <at> gmail.com>:

> Can you please help me
> understand what exactly the issue was and how declaring the variable
> fixed it? I see that it is `defvar`ed  in `calc-ext.el`.

'defvar' without an initial value is a declaration scoped to the surrounding lexical scope (or file, if at top level). It appears that calc.el does not require calc-ext, so that math-comp-selected was assumed to be lexical where it was bound in math-format-stack-value. This caused it to have the wrong number further down the call tree (in math-comp-to-string-flat, I think).

In Emacs 26 and earlier, calc.el used dynamic binding.

Thanks for verifying! Patch pushed to emacs-27.



This bug report was last modified 5 years and 57 days ago.

Previous Next


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