* bug#49593: Emacs overrides normal-erase-is-backspace
@ 2021-07-16 6:57 Paul W. Rankin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-16 10:04 ` Lars Ingebrigtsen
0 siblings, 1 reply; 6+ messages in thread
From: Paul W. Rankin via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-07-16 6:57 UTC (permalink / raw)
To: 49593
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"
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#49593: Emacs overrides normal-erase-is-backspace
2021-07-16 6:57 bug#49593: Emacs overrides normal-erase-is-backspace Paul W. Rankin via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-07-16 10:04 ` Lars Ingebrigtsen
2021-07-18 5:01 ` Paul W. Rankin via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-16 10:04 UTC (permalink / raw)
To: Paul W. Rankin; +Cc: 49593
"Paul W. Rankin" <pwr@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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* bug#49593: Emacs overrides normal-erase-is-backspace
2021-07-16 10:04 ` Lars Ingebrigtsen
@ 2021-07-18 5:01 ` Paul W. Rankin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-18 12:08 ` Lars Ingebrigtsen
0 siblings, 1 reply; 6+ messages in thread
From: Paul W. Rankin via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-07-18 5:01 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 49593
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#49593: Emacs overrides normal-erase-is-backspace
2021-07-18 5:01 ` Paul W. Rankin via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-07-18 12:08 ` Lars Ingebrigtsen
2021-07-24 16:23 ` Lars Ingebrigtsen
0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-18 12:08 UTC (permalink / raw)
To: Paul W. Rankin; +Cc: 49593
[-- Attachment #1: Type: text/plain, Size: 330 bytes --]
"Paul W. Rankin" <pwr@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
[-- Attachment #2: Type: image/png, Size: 10353 bytes --]
[-- Attachment #3: Type: text/plain, Size: 166 bytes --]
instead of the "changed outside" message you were getting...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#49593: Emacs overrides normal-erase-is-backspace
2021-07-18 12:08 ` Lars Ingebrigtsen
@ 2021-07-24 16:23 ` Lars Ingebrigtsen
2021-08-22 16:03 ` Lars Ingebrigtsen
0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-24 16:23 UTC (permalink / raw)
To: Paul W. Rankin; +Cc: 49593
Lars Ingebrigtsen <larsi@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#49593: Emacs overrides normal-erase-is-backspace
2021-07-24 16:23 ` Lars Ingebrigtsen
@ 2021-08-22 16:03 ` Lars Ingebrigtsen
0 siblings, 0 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-22 16:03 UTC (permalink / raw)
To: Paul W. Rankin; +Cc: 49593
Lars Ingebrigtsen <larsi@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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-08-22 16:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-16 6:57 bug#49593: Emacs overrides normal-erase-is-backspace Paul W. Rankin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-16 10:04 ` Lars Ingebrigtsen
2021-07-18 5:01 ` Paul W. Rankin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-18 12:08 ` Lars Ingebrigtsen
2021-07-24 16:23 ` Lars Ingebrigtsen
2021-08-22 16:03 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).