GNU bug report logs - #67395
Fix "Text is read-only" on backspacing initial calc input

Previous Next

Package: emacs;

Reported by: George Kuzler <gkuzler <at> gmail.com>

Date: Thu, 23 Nov 2023 05:58:01 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 67395 in the body.
You can then email your comments to 67395 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#67395; Package emacs. (Thu, 23 Nov 2023 05:58:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to George Kuzler <gkuzler <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 23 Nov 2023 05:58:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: George Kuzler <gkuzler <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Fix "Text is read-only" on backspacing initial calc input
Date: Wed, 22 Nov 2023 21:02:31 -0500
[Message part 1 (text/plain, inline)]
This is a one-line fix for a minor issue in calc-mode. When your last
command has caused the minibuffer to open for input - for example,
you've typed a digit - and you immediately press backspace, it should
clear the minibuffer and return you to *Calculator*. Instead, the
minibuffer is unchanged, and emacs prints the message "Text is
read-only". Note that you can then backspace again to delete the
minibuffer contents as normal; this bug only manifests if you try to
backspace right after the command that puts you in the minibuffer.

The issue is that `calcDigit-backspace' tries to clear the minibuffer with
`erase-buffer', which also tries to delete the prompt, which is
read-only. `delete-minibuffer-contents' would have the desired effect
since it doesn't try to delete the prompt. This change just replaces the
former function with the latter.



In GNU Emacs 29.1 (build 1, x86_64-redhat-linux-gnu, GTK+ Version
 3.24.38, cairo version 1.17.8) of 2023-09-24 built on
 e1d0f5fdfea948b9bb25e212c9c623e4
Windowing system distributor 'The X.Org Foundation', version 11.0.12302002
System Description: Fedora Linux 39 (Workstation Edition)

Configured using:
 'configure --build=x86_64-redhat-linux-gnu
 --host=x86_64-redhat-linux-gnu --program-prefix=
 --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
 --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
 --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
 --libexecdir=/usr/libexec --localstatedir=/var --runstatedir=/run
 --sharedstatedir=/var/lib --mandir=/usr/share/man
 --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png
 --with-rsvg --with-tiff --with-xpm --with-x-toolkit=gtk3 --with-gpm=no
 --with-xwidgets --with-modules --with-harfbuzz --with-cairo --with-json
 --with-native-compilation=aot --with-tree-sitter --with-sqlite3
 --with-webp --with-xinput2 build_alias=x86_64-redhat-linux-gnu
 host_alias=x86_64-redhat-linux-gnu CC=gcc 'CFLAGS=-DMAIL_USE_LOCKF -O2
 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches
 -pipe -Wall -Werror=format-security
 -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS
 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer '
 LDFLAGS=-Wl,-z,relro
 PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig CXX=g++
 'CXXFLAGS=-O2 -flto=auto -ffat-lto-objects -fexceptions -g
 -grecord-gcc-switches -pipe -Wall -Werror=format-security
 -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS
 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ''
[Message part 2 (text/html, inline)]
[calc-mode-backspace-fix.patch (text/x-patch, attachment)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Thu, 23 Nov 2023 15:43:01 GMT) Full text and rfc822 format available.

Notification sent to George Kuzler <gkuzler <at> gmail.com>:
bug acknowledged by developer. (Thu, 23 Nov 2023 15:43:02 GMT) Full text and rfc822 format available.

Message #10 received at 67395-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: George Kuzler <gkuzler <at> gmail.com>
Cc: 67395-done <at> debbugs.gnu.org
Subject: Re: bug#67395: Fix "Text is read-only" on backspacing initial calc
 input
Date: Thu, 23 Nov 2023 17:42:22 +0200
> From: George Kuzler <gkuzler <at> gmail.com>
> Date: Wed, 22 Nov 2023 21:02:31 -0500
> 
> This is a one-line fix for a minor issue in calc-mode. When your last
> command has caused the minibuffer to open for input - for example,
> you've typed a digit - and you immediately press backspace, it should
> clear the minibuffer and return you to *Calculator*. Instead, the
> minibuffer is unchanged, and emacs prints the message "Text is
> read-only". Note that you can then backspace again to delete the
> minibuffer contents as normal; this bug only manifests if you try to
> backspace right after the command that puts you in the minibuffer.
> 
> The issue is that `calcDigit-backspace' tries to clear the minibuffer with
> `erase-buffer', which also tries to delete the prompt, which is
> read-only. `delete-minibuffer-contents' would have the desired effect
> since it doesn't try to delete the prompt. This change just replaces the
> former function with the latter.

Thanks, I installed this on the emacs-29 branch, and I'm closing the
bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 22 Dec 2023 12:24:13 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 141 days ago.

Previous Next


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