Subject: bug#72487: closed (Re: bug#72487: calculator-electric-mode causes freeze on subsequent use of minibuffer)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 21 Sep 2024 08:08:02 +0000

Your bug report

#72487: calculator-electric-mode causes freeze on subsequent use of minibuffer

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
72487: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72487
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#72487: calculator-electric-mode causes freeze on subsequent use of minibuffer
From: martin rudalics <[email-masked]>
To: Eli Zaretskii <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Sat, 21 Sep 2024 10:07:14 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> Installed on master.  If there are no further complaints, I'll close
> this bug in a couple of days.

Done.

martin

Subject: calculator-electric-mode causes freeze on subsequent use of minibuffer
From: Kevin J Witczak <[email-masked]>
To: [email-masked]
Date: Mon, 05 Aug 2024 22:41:57 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

When using the calculator function of GNU Emacs 31.0.50 (bug also found 
in 29.4), usage of `calculator-electric-mode' causes Emacs to hang on 
subsequent uses of the minibuffer.

Emacs -Q

M-: (setf calculator-electric-mode t) <RET>

M-x calcu <RET> q M-x M-p <RET>

Note that the freeze does not depend on specifically calling calculator 
a second time, and calculator may be repeated with C-x z without issue.

The freeze occurs specifically when the minibuffer exits a second time, 
even via C-g, before its contents are processed. Thus, for example, the 
following still yields a freeze:

Emacs -Q

M-: (setf calculator-electric-mode t) <RET>

M-x d-o-e <RET> kill-emacs <RET>

M-x calcu <RET> q M-x kill-emacs <RET>

Apparently, calculator-electric-mode leaves the minibuffer window in a 
broken state after first usage, rather than resetting it correctly.

Emacs must be killed externally at this point, and generally cannot be 
salvaged with C-g. It becomes trapped in a loop emitting terminal bells 
(seen with `visible-bell' mode on, or via a termscript from `-nw').