bug#81586: 31.0.90; customize-dirlocals: C-x C-s in text field of type '(choice ... (string)) attempts to save to custom.el
Antonio Romano <[email protected]>
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <[email protected]> |
To reproduce:
1. Define a custom variable of type '(choice ... (string ....))
--8<---------------cut here---------------start------------->8---
(defcustom mve-custom nil
""
:type '(choice (const :tag "Default" nil)
(string :tag "My String")))
--8<---------------cut here---------------end--------------->8---
2. Open `customize-dirlocals'
3. As variable to customize, set `mve-custom', then press RET to make
the 'value' field to match the type specified above.
4. Select "My String" from the "Choice:" drop-down menu, then move the
point inside the "My String:" text field.
5. Press `C-x C-s'. You'll notice "Wrote ..../.emacs.d/custom.el". This
is contrary to the expected behaviour of saving the content to the local
.dir-locals.el file, which is what happens anywhere else in the buffer.
In GNU Emacs 31.0.90 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.52, cairo version 1.18.4) of 2026-07-01 built on X13
Repository revision: 5dd8fe25c23944cb8ac97d2d54b946c6a394d0fb
Repository branch: emacs-31
System Description: GNOME 50 (Flatpak runtime)
Configured using:
'configure --prefix=/app --with-gnutls --with-tree-sitter --with-pgtk
--with-native-compilation=aot --with-modules 'CFLAGS=-O2 -pipe -g
-Wp,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions
-fstack-protector-strong -grecord-gcc-switches
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer '
'LDFLAGS=-L/app/lib -Wl,-z,relro,-z,now -Wl,--as-needed ''
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG
LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK
PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
TREE_SITTER WEBP XIM GTK3 ZLIB
Important settings:
value of $LC_MONETARY: it_IT.UTF-8
value of $LC_NUMERIC: it_IT.UTF-8
value of $LC_TIME: it_IT.UTF-8
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
Major mode: Group
Minor modes in effect:
global-git-commit-mode: t
gnus-undo-mode: t
cursor-sensor-mode: t
gcmh-mode: t
diff-hl-flydiff-mode: t
diff-hl-margin-mode: t
xref-mouse-mode: t
override-global-mode: t
which-key-mode: t
savehist-mode: t
save-place-mode: t
repeat-mode: t
recentf-mode: t
pixel-scroll-precision-mode: t
minibuffer-electric-default-mode: t
marginalia-mode: t
global-so-long-mode: t
global-auto-revert-mode: t
delete-selection-mode: t
auto-insert-mode: t
package-autosuggest-mode: t
server-mode: t
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
global-prettify-symbols-mode: t
file-name-shadow-mode: t
horizontal-scroll-bar-mode: t
mouse-shift-adjust-mode: t
context-menu-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
window-divider-mode: t
minibuffer-nonselected-mode: t
minibuffer-regexp-mode: t
buffer-read-only: t
line-number-mode: t
visual-line-mode: t
transient-mark-mode: t
delete-trailing-whitespace-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
temp-buffer-resize-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr nndraft nnmh nnfolder utf-7 network-stream nsm
gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg nntp
gnus-cache emacsbug runbox-eglot vc-hg vc-bzr vc-src vc-sccs vc-svn
vc-cvs vc-rcs bug-reference dabbrev magit-extras magit-bookmark
magit-submodule magit-blame magit-stash magit-reflog magit-bisect
magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit
magit-sequence magit-notes magit-worktree magit-tag magit-merge
magit-branch magit-reset magit-files magit-refs magit-status magit
magit-repos magit-apply magit-wip magit-log magit-diff which-func
smerge-mode git-commit magit-core magit-autorevert magit-margin
magit-transient magit-process with-editor magit-mode transient benchmark
magit-git magit-base magit-section crm llama cond-let org-appear
org-special-block-extras lf ox-odt rng-loc rng-uri rng-parse rng-match
rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util
ox-latex ox-icalendar ox-html table ox-ascii ox-publish ox org-attach
dash olivetti corg s mixed-pitch oc-basic ol-eww eww vtable url-queue
mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-art mm-uu
mml2015 mm-view mml-smime smime gnutls dig gnus-sum shr pixel-fill
kinsoku url-file svg dom gnus-group gnus-undo gnus-start gnus-cloud
nnimap nnmail mail-source utf7 nnoo gnus-spec gnus-int gnus-range
message sendmail yank-media puny rfc822 mml mml-sec epa derived epg
rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231
rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win
conf-gnus gnus nnheader gnus-util mail-utils range mm-util mail-prsvr
ol-docview doc-view image-mode exif ol-bibtex bibtex ol-bbdb ol-w3m
ol-doi org-link-doi conf-org org-link-completion org-inlinetask org-num
org-lazy-babel org-capture org-agenda org-element org-persist org-id
avl-tree generator org-refile org ob ob-tangle ob-ref ob-lob ob-table
ob-exp org-macro org-src sh-script smie executable ob-comint
org-element-ast inline org-pcomplete org-list org-footnote org-faces
org-entities org-version ob-emacs-lisp ob-core ob-eval org-cycle
org-table ol org-fold org-fold-core org-keys oc org-compat org-loaddefs
cal-menu calendar cal-loaddefs org-macs pulse consult-xref consult
bookmark char-fold misearch multi-isearch cus-dep cus-theme elisp-scope
view jka-compr shortdoc shortdoc-doc secrets send-to help-fns cl-print
indent-bars-ts indent-bars face-remap noutline outline color
java-ts-mode c-ts-common vc-git runbox runbox-tramp-prefix find-dired
grep cursor-sensor gcmh checkdoc ligature elec-pair whitespace flyspell
ispell display-line-numbers diff-hl-flydiff diff-hl-margin diff-hl-dired
dired dired-loaddefs diff-hl-show-hunk diff-hl log-view log-edit add-log
pcvs-util vc-dir vc vc-dispatcher hl-line hideshow init eglot
external-completion jsonrpc xref flymake thingatpt diff diff-mode
track-changes ert ewoc debug backtrace find-func imenu edmacro kmacro
bind-key easy-mmode which-key treesit tramp-container tramp-cmds
savehist saveplace repeat tramp-sh recentf tree-widget project
pixel-scroll minibuf-eldef marginalia so-long autorevert filenotify
delsel libadwaita-theme orderless compat color-scheme-sync dbus xml
autoinsert misc-defs doom-lib benchmark-init comp comp-cstr warnings
.user-lisp-autoloads pcase byte-opt tramp-cache time-stamp tramp
trampver tramp-integration files-x tramp-message tramp-compat shell
pcomplete parse-time iso8601 time-date format-spec tramp-loaddefs
compile text-property-search comint ansi-osc ansi-color ring comp-run
comp-common rx loaddefs-gen lisp-mnt radix-tree bytecomp byte-compile
early-init finder-inf info advice-patch-autoloads
adwaita-dark-theme-autoloads auctex-autoloads tex-site
auto-dim-other-buffers-autoloads auto-scroll-bar-autoloads
backline-autoloads benchmark-init-el-autoloads breadcrumb-autoloads
buffer-env-autoloads buffer-to-pdf-autoloads cape-autoloads
cdlatex-autoloads colorful-mode-autoloads corfu-autoloads
corg.el-autoloads crux-autoloads custom-css-autoloads diff-hl-autoloads
eat-autoloads eglot-jdtls-autoloads cl-extra help-mode dape-autoloads
elenv-autoloads embark-consult-autoloads consult-autoloads
embark-autoloads engrave-faces-autoloads gcmh-autoloads
haskell-mode-autoloads helpful-autoloads elisp-refs-autoloads
indent-bars-autoloads keycast-autoloads ligature-autoloads
list-utils-autoloads magit-autoloads magit-section-autoloads
llama-autoloads cond-let-autoloads marginalia-autoloads
material-icon-autoloads math-delimiters-autoloads math-symbols-autoloads
mixed-pitch-autoloads modern-fringes-autoloads msgu-autoloads
nix-ts-mode-autoloads nov-autoloads olivetti-autoloads
on-demand-scroll-bar-autoloads orderless-autoloads org-appear-autoloads
org-download-autoloads async-autoloads org-link-completion-autoloads
org-modern-autoloads org-ql-autoloads f-autoloads org-rnote-autoloads
org-special-block-extras-autoloads lolcat-autoloads dad-joke-autoloads
lf-autoloads org-super-agenda-autoloads ht-autoloads org-xopp-autoloads
outline-minor-faces-autoloads ov-autoloads project-x-autoloads
rainbow-delimiters-autoloads rainbow-mode-autoloads
solaire-mode-autoloads ts-autoloads s-autoloads vala-mode-autoloads
cc-styles cc-align cc-engine cc-vars cc-defs vundo-autoloads
windresize-autoloads with-editor-autoloads xeft-autoloads xr-autoloads
xref-union-autoloads yascroll-autoloads yasnippet-autoloads
zone-nyan-autoloads esxml-autoloads zone-rainbow-autoloads
zone-select-autoloads dash-autoloads zone-sl-autoloads package
browse-url xdg url url-proxy url-privacy url-expand url-methods
url-history url-cookie generate-lisp-file url-domsuf url-util mailcap
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs gv
password-cache json subr-x mule-util map url-vars package-activate
cus-edit pp cus-start cus-load icons wid-edit cl-loaddefs cl-lib server
rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win
term/common-win touch-screen pgtk-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine 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 emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify
dynamic-setting system-font-setting font-render-setting cairo gtk pgtk
lcms2 multi-tty move-toolbar make-network-process tty-child-frames
native-compile emacs)
Memory information:
((conses 16 1071239 3533612) (symbols 48 56078 131) (strings 32 286226 114542)
(string-bytes 1 12112515) (vectors 16 93387) (vector-slots 8 1274481 1053445)
(floats 8 794 31084) (intervals 56 22687 12475) (buffers 1064 45))