Subject: Re: bug#48718: 27.2; Mode-line still displays ~Active after LaTex embedded calc has ended

From: Kyle Meyer <[email-masked]>
Date: Fri, 28 May 2021 12:42:26 -0400

Colin Baxter writes:

> 1. emacs -Q <RET>
> 2. C-x C-f test.tex <RET>
> 3. Mode line says "LaTeX"
> 3. In buffer enter $2*2$
> 4. With point in expression do C-x * e.
> 8. $2*2$ changes to $4$.
> 9. Echo area gives message "Embedded Calc mode enabled; Give this
>    command again to return to normal". Mode-line says "LaTeX ~Active".
> 10. Give command C-x * e again.
> 11. Buffer returns to normal with message "Back to LaTeX mode".
> 12. But mode-line still displays "LaTeX ~Active", and does so until the
>     buffer is killed.

As far as I understand, that's by design.  It indicates that formulas
are still active in the buffer.

>From (info "(calc)Assignments in Embedded Mode"):

  [...] Calc puts ‘~Active’ in the mode line if some, but probably not
  all, formulas in the buffer are active.  This happens if you activate
  a few formulas one at a time but never use ‘C-x * a’, or if you used
  ‘C-x * a’ but then Calc had to deactivate a formula because it lost
  track of it.  If neither of these symbols appears in the mode line, no
  embedded formulas are active in the buffer (e.g., before Embedded mode
  has been used, or after a ‘M-- C-x * a’).

You should see an entry for the buffer in the variable
calc-embedded-active.  Invoking the keybinding mentioned in the last
sentence quoted above (triggering calc-embedded-forget) should remove
the buffer's entry from calc-embedded-active and "~Active" from the mode
line.