0

I'm having an issue setting custom Emacs variables. When I try to set the variable pressing STATE I run into this error: (wrong-type-argument stringp custom-variable-set) This is the full debugger stack :

 substitute-command-keys(custom-variable-set)
  widget-choose(#("Operation on Python Shell Interpreter" 13 37 (custom-data python-shell-interpreter)) (keymap (custom-variable-set menu-item "Set for Current Session" custom-variable-set :enable (eq (widget-get custom-actioned-widget :custom-state) 'modified)) (custom-variable-save menu-item "Save for Future Sessions" custom-variable-save :enable (memq (widget-get custom-actioned-widget :custom-state) '(modified set changed rogue))) (custom-redraw menu-item "Undo Edits" custom-redraw :enable (memq (widget-get custom-actioned-widget :custom-state) '(modified changed))) (custom-variable-reset-saved menu-item "Revert This Session's Customization" custom-variable-reset-saved :enable (memq (widget-get custom-actioned-widget :custom-state) '(modified set changed rogue))) (custom-variable-reset-standard menu-item "Erase Customization" custom-variable-reset-standard :enable (memq (widget-get custom-actioned-widget :custom-state) '(modified set changed saved rogue))) (custom-variable-reset-backup menu-item "Set to Backup Value" custom-variable-reset-backup :enable (get (widget-value custom-actioned-widget) 'backup-value)) (sep0 menu-item "---") (custom-comment-show menu-item "Add Comment" custom-comment-show :enable (custom-comment-invisible-p custom-actioned-widget)) (sep1 menu-item "---") (custom-variable-edit menu-item "Show Current Value" custom-variable-edit :button (:radio eq (widget-get custom-actioned-widget :custom-form) 'edit)) (custom-variable-edit-lisp menu-item "Show Saved Lisp Expression" custom-variable-edit-lisp :button (:radio eq (widget-get custom-actioned-widget :custom-form) 'lisp))) nil)
  (let* ((completion-ignore-case t) (custom-actioned-widget widget) (answer (widget-choose (concat "Operation on " (custom-unlispify-tag-name (widget-get widget :value))) (if custom-variable-menu (custom-menu-filter custom-variable-menu widget) custom-variable-extended-menu) event))) (if answer (funcall answer widget)))
  (if (eq (widget-get widget :custom-state) 'hidden) (custom-toggle-hide widget) (if (eq (widget-get widget :custom-state) 'modified) nil (custom-variable-state-set widget)) (custom-redraw-magic widget) (let* ((completion-ignore-case t) (custom-actioned-widget widget) (answer (widget-choose (concat "Operation on " (custom-unlispify-tag-name (widget-get widget :value))) (if custom-variable-menu (custom-menu-filter custom-variable-menu widget) custom-variable-extended-menu) event))) (if answer (funcall answer widget))))
  custom-variable-action((custom-variable :group ... :tag ... :custom-prefixes ... :custom-level 2 :value python-shell-interpreter :parent ... :indent ...) nil)
  widget-apply((custom-variable :group ... :tag ... :custom-prefixes ... :custom-level 2 :value python-shell-interpreter :parent ... :indent ...) :action nil)
  widget-parent-action((custom-magic :args ... :parent ... :indent 0 :children ... :from #<marker (moves after insertion) at 3993 in *Customize Group: Python*> :to #<marker at 4072 in *Customize Group: Python*> :buttons ...) nil)
  widget-apply((custom-magic :args ... :parent ... :indent 0 :children ... :from #<marker (moves after insertion) at 3993 in *Customize Group: Python*> :to #<marker at 4072 in *Customize Group: Python*> :buttons ...) :action nil)
  widget-parent-action((choice-item :help-echo "Change the sta..." :format "%[%t%]" :button-prefix widget-push-button-prefix :button-suffix widget-push-button-suffix :mouse-down-action widget-magic-mouse-down-action :tag " State " :parent ...) nil)
  widget-apply((choice-item :help-echo "Change the sta..." :format "%[%t%]" :button-prefix widget-push-button-prefix :button-suffix widget-push-button-suffix :mouse-down-action widget-magic-mouse-down-action :tag " State " :parent ...) :action nil)
  widget-apply-action((choice-item :help-echo "Change the sta..." :format "%[%t%]" :button-prefix widget-push-button-prefix :button-suffix widget-push-button-suffix :mouse-down-action widget-magic-mouse-down-action :tag " State " :parent ...) nil)
  (if button (widget-apply-action button event) (error "You can't edit this part of the Custom buffer"))
  (let ((button (get-char-property pos 'button))) (or button (if (setq button (get-char-property (line-beginning-position) 'button)) (or (eq (widget-type button) 'custom-group-link) (setq button nil)))) (if button (widget-apply-action button event) (error "You can't edit this part of the Custom buffer")))
  Custom-newline(3996)
  funcall-interactively(Custom-newline 3996)
  call-interactively(Custom-newline nil nil)
  command-execute(Custom-newline)
2
  • 1
    1. Do you see the problem if you start Emacs using emacs -Q (no init file)? If not, bisect your init file to find the culprit. 2. Provide a step-by-step recipe to specify the problem. IOW, state clearly what you did, to get the error.
    – Drew
    Jul 2, 2023 at 20:32
  • If difficult to state what you did clearly, GIF please.
    – shynur
    Jul 3, 2023 at 0:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.