GNU bug report logs -
#49593
Emacs overrides normal-erase-is-backspace
Previous Next
Reported by: "Paul W. Rankin" <pwr <at> bydasein.com>
Date: Fri, 16 Jul 2021 07:26:01 UTC
Severity: normal
Tags: moreinfo, patch
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.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 49593 in the body.
You can then email your comments to 49593 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49593
; Package
emacs
.
(Fri, 16 Jul 2021 07:26:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Paul W. Rankin" <pwr <at> bydasein.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 16 Jul 2021 07:26:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Overview:
Emacs overrides user's customization of normal-erase-is-backspace with
no clear way to set it.
Steps to reproduce:
1. insert into start.el:
(custom-set-variables '(normal-erase-is-backspace t))
2. emacs -Q -l start.el
3. M-x customize-option RET normal-erase-is-backspace
Expected behaviour:
normal-erase-is-backspace is t.
Actual behaviour:
normal-erase-is-backspace is maybe; marked as "CHANGED outside of
Customize"
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49593
; Package
emacs
.
(Fri, 16 Jul 2021 10:05:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 49593 <at> debbugs.gnu.org (full text, mbox):
"Paul W. Rankin" <pwr <at> bydasein.com> writes:
> normal-erase-is-backspace is maybe; marked as "CHANGED outside of
> Customize"
The doc string does say:
Setting this variable with setq doesn't take effect. Programmatically,
call `normal-erase-is-backspace-mode' (which see) instead.
But setting it with `custom-set-variables' should work, I'd have
thought? Hm...
(custom-set-variables '(normal-erase-is-backspace t))
sets it to `maybe', so it's not a startup problem (there's been some
with Customize)...
Hm, looking at the code to `normal-erase-is-backspace-mode', I don't see
how that's supposed to work at all. The value is only used in
`normal-erase-is-backspace-setup-frame', and calling
`normal-erase-is-backspace-mode' doesn't actually change the value of
the variable, which explains why `custom-set-variables' does nothing.
The following change seems to fix the issue:
diff --git a/lisp/simple.el b/lisp/simple.el
index 322693f631..01851e0a0a 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -9505,9 +9505,9 @@ normal-erase-is-backspace
:set (lambda (symbol value)
;; The fboundp is because of a problem with :set when
;; dumping Emacs. It doesn't really matter.
- (if (fboundp 'normal-erase-is-backspace-mode)
- (normal-erase-is-backspace-mode (or value 0))
- (set-default symbol value))))
+ (when (fboundp 'normal-erase-is-backspace-mode)
+ (normal-erase-is-backspace-mode (or value 0)))
+ (set-default symbol value)))
(defun normal-erase-is-backspace-setup-frame (&optional frame)
"Set up `normal-erase-is-backspace-mode' on FRAME, if necessary."
But is that the correct fix?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) patch.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Fri, 16 Jul 2021 10:05:02 GMT)
Full text and
rfc822 format available.
Added tag(s) moreinfo.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Fri, 16 Jul 2021 10:06:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49593
; Package
emacs
.
(Sun, 18 Jul 2021 05:03:01 GMT)
Full text and
rfc822 format available.
Message #15 received at 49593 <at> debbugs.gnu.org (full text, mbox):
Hi Lars,
Thanks for looking into this. Yes after reading through the code of this
my opinion is that it would be better scrapped and rewritten from
scratch. (For me the patch did not fix the option persisting after
restarting Emacs.)
I've managed to resolve my problem via the console itself so I'd rather
not touch it, but might be worthwhile keeping the issue open if anyone
else requires the mode/variable.
On 2021-07-16 20:04, Lars Ingebrigtsen wrote:
>
> Hm, looking at the code to `normal-erase-is-backspace-mode', I don't
> see
> how that's supposed to work at all. The value is only used in
> `normal-erase-is-backspace-setup-frame', and calling
> `normal-erase-is-backspace-mode' doesn't actually change the value of
> the variable, which explains why `custom-set-variables' does nothing.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49593
; Package
emacs
.
(Sun, 18 Jul 2021 12:09:02 GMT)
Full text and
rfc822 format available.
Message #18 received at 49593 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
"Paul W. Rankin" <pwr <at> bydasein.com> writes:
> Thanks for looking into this. Yes after reading through the code of
> this my opinion is that it would be better scrapped and rewritten from
> scratch. (For me the patch did not fix the option persisting after
> restarting Emacs.)
Hm, odd. I tried your recipe with the patch, and
[Message part 2 (image/png, inline)]
[Message part 3 (text/plain, inline)]
instead of the "changed outside" message you were getting...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49593
; Package
emacs
.
(Sat, 24 Jul 2021 16:24:01 GMT)
Full text and
rfc822 format available.
Message #21 received at 49593 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Hm, odd. I tried your recipe with the patch, and
>
>
>
> instead of the "changed outside" message you were getting...
I've now pushed the patch, because it seems like the right thing,
anyway.
If you're still seeing the problem (after this update), do you have a
recipe to reproduce it, starting from "emacs -Q"?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49593
; Package
emacs
.
(Sun, 22 Aug 2021 16:04:02 GMT)
Full text and
rfc822 format available.
Message #24 received at 49593 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>> instead of the "changed outside" message you were getting...
>
> I've now pushed the patch, because it seems like the right thing,
> anyway.
>
> If you're still seeing the problem (after this update), do you have a
> recipe to reproduce it, starting from "emacs -Q"?
More information was requested, but no response was given within a
month, and since I'm not able to reproduce the problem, I'm closing this
bug report. If the problem still exists, please respond to this email
and we'll reopen the bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug marked as fixed in version 28.1, send any further explanations to
49593 <at> debbugs.gnu.org and "Paul W. Rankin" <pwr <at> bydasein.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sun, 22 Aug 2021 16:04:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 20 Sep 2021 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 212 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.