GNU bug report logs -
#48531
Error on `Apply and Save` when using customize
Previous Next
Reported by: Mikhail P <mikpom <at> fastmail.com>
Date: Thu, 20 May 2021 09:20:02 UTC
Severity: normal
Tags: fixed, moreinfo, patch
Merged with 40853,
42801,
46355
Found in versions 26.3, 27.1, 28.0.50
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 48531 in the body.
You can then email your comments to 48531 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#48531
; Package
emacs
.
(Thu, 20 May 2021 09:20:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Mikhail P <mikpom <at> fastmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 20 May 2021 09:20:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Greetings!
I started to see problems with customizing anything using M-x customize.
When I change something and then press |Apply and Save| I get an error.
Attached is what I got in the trace when applying and saving
|debug-on-error| .
Unfortunately I could not reproduce it with -Q because the feature
|Apply and Save| becomes unavailable. However I could reproduce it
without any .emacs file.
Below is what |report-emacs-bug| has generated. Thanks for any help.
-Mikhail
In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.22,
cairo version 1.17.3)
of 2020-08-29 built on juergen
Windowing system distributor 'The X.Org Foundation', version 11.0.12010000
System Description: Arch Linux
Recent messages:
Creating customization items ...78%
Loading url-util...done
Creating customization items ...done
Creating customization setup...done
To install your edits, invoke [State] and choose the Set operation
(New file)
Saving file /home/mikpom/.emacs...
Wrote /home/mikpom/.emacs
Entering debugger...
Making completion list... [4 times]
Configured using:
'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
--localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-wide-int
--with-modules --with-cairo --with-harfbuzz 'CFLAGS=-march=x86-64
-mtune=generic -O2 -pipe -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2
LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'
Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON
PDUMPER LCMS2 GMP
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Debugger
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
buffer-read-only: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml mml-sec epa derived epg epg-config gnus-util
rmail rmail-loaddefs text-property-search time-date mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-fns
radix-tree cl-print debug url-util url-parse auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache url-vars gdb-mi bindat
json subr-x map seq byte-opt gv bytecomp byte-compile cconv gud
easy-mmode comint ansi-color ring edebug backtrace help-mode find-func
apropos cus-edit easymenu cus-start cus-load wid-edit cl-loaddefs cl-lib
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core term/tty-colors frame minibuffer cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)
Memory information:
((conses 16 110836 12650)
(symbols 48 10470 1)
(strings 32 28886 2083)
(string-bytes 1 879796)
(vectors 16 17077)
(vector-slots 8 201036 11912)
(floats 8 39 256)
(intervals 56 1742 129)
(buffers 1000 20))
[Message part 2 (text/html, inline)]
[trace (text/plain, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#48531
; Package
emacs
.
(Thu, 20 May 2021 10:11:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 48531 <at> debbugs.gnu.org (full text, mbox):
Mikhail P <mikpom <at> fastmail.com> writes:
> Greetings!
>
> I started to see problems with customizing anything using M-x customize.
>
> When I change something and then press Apply and Save I get an error. Attached is what
> I got in the trace when applying and saving debug-on-error .
>
> Unfortunately I could not reproduce it with -Q because the feature Apply and Save
> becomes unavailable. However I could reproduce it without any .emacs file.
>
> Below is what report-emacs-bug has generated. Thanks for any help.
>
> Debugger entered--Lisp error: (void-function nil)
> nil(nil)
> widget-apply(nil :value-get)
> widget-value(nil)
> custom-variable-modified-p((custom-variable :tag "Debug Ignored Errors" :value debug-ignored-errors :custom-form edit :custom-magic (custom-magic :args (nil) :parent #1 :indent 0 :children nil :from #<marker (moves after insertion) at 236 in *Customize Apropos*> :to #<marker at 236 in *Customize Apropos*> :buttons nil :value nil) :buttons ((documentation-string :args nil :value "List of errors for which the debugger should not b..." :indent 3 :visibility-widget custom-visibility :parent #1 :doc-overlay #<overlay from 236 to 299 in *Customize Apropos*> :buttons ((custom-visibility :args nil :value nil :help-echo "Show or hide rest of the documentation." :on "Hide" :off "More" :always-active t :action widget-parent-action :parent #13 :indent 3 :button-overlay #<overlay from 299 to 303 in *Customize Apropos*> :from #<marker (moves after insertion) at 299 in *Customize Apropos*> :to #<marker at 303 in *Customize Apropos*>)) :from #<marker (moves after insertion) at 236 in *Customize Apropos*> :to #<marker at 304 in *Customize Apropos*>) (custom-magic :args (nil) :parent #1 :indent 0 :children nil :from #<marker (moves after insertion) at 236 in *Customize Apropos*> :to #<marker at 236 in *Customize Apropos*> :buttons nil :value nil) (item :format "%{%t%} " :sample-face custom-variable-tag :tag "Debug Ignored Errors" :parent #1 :indent 0 :sample-overlay #<overlay from 214 to 234 in *Customize Apropos*> :from #<marker (moves after insertion) at 214 in *Customize Apropos*> :to #<marker at 235 in *Customize Apropos*>) (custom-visibility :args nil :value nil :help-echo "Show the value of this option." :on-glyph "down" :on "Hide" :off-glyph "right" :off "Show Value" :action custom-toggle-hide-variable :parent #1 :indent 0 :suppress-face t :button-overlay #<overlay from 203 to 213 in *Customize Apropos*> :from #<marker (moves after insertion) at 203 in *Customize Apropos*> :to #<marker at 213 in *Customize Apropos*>)) :documentation-indent 3 :children nil :custom-state hidden :from #<marker (moves after insertion) at 203 in *Customize Apropos*> :to #<marker at 304 in *Customize Apropos*>))
Thanks for the bug report. This looks like Bug#40853 (and Bug#42801),
which was fixed in the development branch with this fix:
commit 5c39f6f1165a33f5714eedd3a413f786dffbb5a2
Author: Mauro Aranda <maurooaranda <at> gmail.com>
Date: Fri Aug 14 16:40:40 2020 +0200
Make sure we only act on edited widgets in Custom-save
* lisp/cus-edit.el (Custom-save): Only act on edited widgets in the
buffer. If we attempt to redraw all widgets, we confuse
custom-variable-modified-p, or we end up drawing State buttons for
all options, including the hidden ones (bug#42801).
Would it be possible for you to build Emacs from the master branch and
see if you can reproduce it?
Alternatively, maybe you can try to redefine Custom-save as below in
your Emacs session, and see if you can reproduce it.
(defun Custom-save (&rest _ignore)
"Set all edited settings, then save all settings that have been set.
If a setting was edited and set before, this saves it. If a
setting was merely edited before, this sets it then saves it."
(interactive)
(let (edited-widgets)
(when (custom-command-apply
(lambda (child)
(when (memq (widget-get child :custom-state)
'(modified set changed rogue))
(push child edited-widgets)
(widget-apply child :custom-mark-to-save)))
"Save all settings in this buffer? " t)
;; Save changes to buffer.
(custom-save-all)
;; Redraw and recalculate the state when necessary.
(dolist (widget edited-widgets)
(widget-apply widget :custom-state-set-and-redraw)))))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#48531
; Package
emacs
.
(Sat, 22 May 2021 12:46:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 48531 <at> debbugs.gnu.org (full text, mbox):
Hi Mauro
version build from master branch is free of this bug.
Thanks,
-Mikhail
On 5/20/21 5:11 PM, Mauro Aranda wrote:
> Mikhail P <mikpom <at> fastmail.com> writes:
>
>> Greetings!
>>
>> I started to see problems with customizing anything using M-x customize.
>>
>> When I change something and then press Apply and Save I get an error. Attached is what
>> I got in the trace when applying and saving debug-on-error .
>>
>> Unfortunately I could not reproduce it with -Q because the feature Apply and Save
>> becomes unavailable. However I could reproduce it without any .emacs file.
>>
>> Below is what report-emacs-bug has generated. Thanks for any help.
>>
>> Debugger entered--Lisp error: (void-function nil)
>> nil(nil)
>> widget-apply(nil :value-get)
>> widget-value(nil)
>> custom-variable-modified-p((custom-variable :tag "Debug Ignored Errors" :value debug-ignored-errors :custom-form edit :custom-magic (custom-magic :args (nil) :parent #1 :indent 0 :children nil :from #<marker (moves after insertion) at 236 in *Customize Apropos*> :to #<marker at 236 in *Customize Apropos*> :buttons nil :value nil) :buttons ((documentation-string :args nil :value "List of errors for which the debugger should not b..." :indent 3 :visibility-widget custom-visibility :parent #1 :doc-overlay #<overlay from 236 to 299 in *Customize Apropos*> :buttons ((custom-visibility :args nil :value nil :help-echo "Show or hide rest of the documentation." :on "Hide" :off "More" :always-active t :action widget-parent-action :parent #13 :indent 3 :button-overlay #<overlay from 299 to 303 in *Customize Apropos*> :from #<marker (moves after insertion) at 299 in *Customize Apropos*> :to #<marker at 303 in *Customize Apropos*>)) :from #<marker (moves after insertion) at 236 in *Customize Apropos*> :to #<marker at 304 in *Customize Apropos*>) (custom-magic :args (nil) :parent #1 :indent 0 :children nil :from #<marker (moves after insertion) at 236 in *Customize Apropos*> :to #<marker at 236 in *Customize Apropos*> :buttons nil :value nil) (item :format "%{%t%} " :sample-face custom-variable-tag :tag "Debug Ignored Errors" :parent #1 :indent 0 :sample-overlay #<overlay from 214 to 234 in *Customize Apropos*> :from #<marker (moves after insertion) at 214 in *Customize Apropos*> :to #<marker at 235 in *Customize Apropos*>) (custom-visibility :args nil :value nil :help-echo "Show the value of this option." :on-glyph "down" :on "Hide" :off-glyph "right" :off "Show Value" :action custom-toggle-hide-variable :parent #1 :indent 0 :suppress-face t :button-overlay #<overlay from 203 to 213 in *Customize Apropos*> :from #<marker (moves after insertion) at 203 in *Customize Apropos*> :to #<marker at 213 in *Customize Apropos*>)) :documentation-indent 3 :children nil :custom-state hidden :from #<marker (moves after insertion) at 203 in *Customize Apropos*> :to #<marker at 304 in *Customize Apropos*>))
> Thanks for the bug report. This looks like Bug#40853 (and Bug#42801),
> which was fixed in the development branch with this fix:
>
> commit 5c39f6f1165a33f5714eedd3a413f786dffbb5a2
> Author: Mauro Aranda <maurooaranda <at> gmail.com>
> Date: Fri Aug 14 16:40:40 2020 +0200
>
> Make sure we only act on edited widgets in Custom-save
>
> * lisp/cus-edit.el (Custom-save): Only act on edited widgets in the
> buffer. If we attempt to redraw all widgets, we confuse
> custom-variable-modified-p, or we end up drawing State buttons for
> all options, including the hidden ones (bug#42801).
>
> Would it be possible for you to build Emacs from the master branch and
> see if you can reproduce it?
>
> Alternatively, maybe you can try to redefine Custom-save as below in
> your Emacs session, and see if you can reproduce it.
>
> (defun Custom-save (&rest _ignore)
> "Set all edited settings, then save all settings that have been set.
> If a setting was edited and set before, this saves it. If a
> setting was merely edited before, this sets it then saves it."
> (interactive)
> (let (edited-widgets)
> (when (custom-command-apply
> (lambda (child)
> (when (memq (widget-get child :custom-state)
> '(modified set changed rogue))
> (push child edited-widgets)
> (widget-apply child :custom-mark-to-save)))
> "Save all settings in this buffer? " t)
> ;; Save changes to buffer.
> (custom-save-all)
> ;; Redraw and recalculate the state when necessary.
> (dolist (widget edited-widgets)
> (widget-apply widget :custom-state-set-and-redraw)))))
>
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#48531
; Package
emacs
.
(Sun, 23 May 2021 14:57:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 48531 <at> debbugs.gnu.org (full text, mbox):
unarchive 42801
forcemerge 42801 48531
quit
Mikhail P <mikpom <at> fastmail.com> writes:
> Hi Mauro
>
> version build from master branch is free of this bug.
>
> Thanks,
>
> -Mikhail
>
Thanks for confirming.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 21 Jun 2021 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 358 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.