Subject: bug#38642: closed (Re: bug#38642: 'C-x RET c' gets stuck in universal-argument loop)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 20 Dec 2019 22:53:02 +0000

Your bug report

#38642: 'C-x RET c' gets stuck in universal-argument loop

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].

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

Subject: Re: bug#38642: 'C-x RET c' gets stuck in universal-argument loop
From: Stefan Monnier <[email-masked]>
To: Eli Zaretskii <[email-masked]>
Cc: [email-masked], Andreas Schwab <[email-masked]>, [email-masked]
Date: Fri, 20 Dec 2019 17:52:17 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

> Stefan, any ideas for how to fix this unintended consequence?

I installed a patch which seems to fix it.  We should rewrite this
function completely, but I tried to minimize the changes for now.

        Stefan

Subject: 'C-x RET c' gets stuck in universal-argument loop
From: Juri Linkov <[email-masked]>
To: [email-masked]
Date: Mon, 16 Dec 2019 23:56:08 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

emacs -Q
C-x RET c       ;; universal-coding-system-argument
RET             ;; accept default e.g. utf-8-unix
C-u C-b         ;; moves backwards 4 chars
C-b C-b C-b ...

Every C-b still moves backwards 4 chars because it gets stuck with an old
'prefix-arg' in the 'while' loop in 'universal-coding-system-argument'.

It gets out of this loop only on an error such as when point reaches
the beginning of the buffer that signals an error.

PS: this is the simplest reproducible case, but I found this bug
by trying to use 'C-x RET c C-u C-u M-x rgrep' that with two C-u prefixes
allows editing the grep command.