all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mikhail P <mikpom@fastmail.com>
To: Mauro Aranda <maurooaranda@gmail.com>
Cc: 48531@debbugs.gnu.org
Subject: bug#48531: Error on `Apply and Save` when using customize
Date: Sat, 22 May 2021 15:53:22 +0700	[thread overview]
Message-ID: <65f73a72-ac55-c850-654c-aa9877dee837@fastmail.com> (raw)
In-Reply-To: <878s49k94m.fsf@tbb.theblackbeard.org>

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@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@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)))))
>






  reply	other threads:[~2021-05-22  8:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-20  4:34 bug#48531: Error on `Apply and Save` when using customize Mikhail P
2021-05-20 10:11 ` Mauro Aranda
2021-05-22  8:53   ` Mikhail P [this message]
2021-05-23 14:56     ` Mauro Aranda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65f73a72-ac55-c850-654c-aa9877dee837@fastmail.com \
    --to=mikpom@fastmail.com \
    --cc=48531@debbugs.gnu.org \
    --cc=maurooaranda@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.