From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Pierre Rouleau Newsgroups: gmane.emacs.bugs Subject: bug#41831: 26.3; Customize UI fails for defcustom with standard default of list heterogenous choice types Date: Fri, 12 Jun 2020 18:12:23 -0400 Message-ID: <49A07523-0B0A-4A6F-B640-E987468B5ECA@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="80130"; mail-complaints-to="usenet@ciao.gmane.io" To: 41831@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 13 00:13:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jjrvC-000Kh1-MY for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Jun 2020 00:13:10 +0200 Original-Received: from localhost ([::1]:50470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjrvB-0003b5-9c for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 12 Jun 2020 18:13:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42106) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjrv4-0003aw-GN for bug-gnu-emacs@gnu.org; Fri, 12 Jun 2020 18:13:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57345) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jjrv4-00048R-4l for bug-gnu-emacs@gnu.org; Fri, 12 Jun 2020 18:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jjrv3-0001S2-Uu for bug-gnu-emacs@gnu.org; Fri, 12 Jun 2020 18:13:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pierre Rouleau Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 Jun 2020 22:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41831 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15919999565545 (code B ref -1); Fri, 12 Jun 2020 22:13:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Jun 2020 22:12:36 +0000 Original-Received: from localhost ([127.0.0.1]:40658 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjrue-0001RM-2w for submit@debbugs.gnu.org; Fri, 12 Jun 2020 18:12:36 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:52790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjruc-0001RF-T2 for submit@debbugs.gnu.org; Fri, 12 Jun 2020 18:12:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjruc-0003Ie-Lf for bug-gnu-emacs@gnu.org; Fri, 12 Jun 2020 18:12:34 -0400 Original-Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]:38918) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jjrua-0003zb-3H for bug-gnu-emacs@gnu.org; Fri, 12 Jun 2020 18:12:34 -0400 Original-Received: by mail-qt1-x832.google.com with SMTP id k22so8322996qtm.6 for ; Fri, 12 Jun 2020 15:12:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=OrtZSJqjusc5MuUML+8QU4QcqhOPDmzJm89kHoMAI3s=; b=eJ60t/BDqRXfczziAd4BX0u8HH0xUCyHE84CQI8IhX+XCbiOSozXIvTCu7+BIYkj9f gtmeTJhAtUxXwQThybhw7JhMbGYfeXMHFGdPwhA5OClFMZHgq7N7GrEZ+gKeZUJgI+Kw CdnvYdcP2FMtf77mrzjg+sqs7m+qD//ABHONCzANFJabErRQVykVbZq8xtLXqrG8OTSp tMKQIp2fksYWeyHggsKwyrccQ/x6AzOwHYuiieh832uZVdNjzepPMVJ4yHCJwuNwr40p hCz0v6nk8DItEUP4ADozkK/dufEfj7DLYPB2QgEjF00JRdKM6xLxTWRCqF+4xAlmGgUY Hwnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=OrtZSJqjusc5MuUML+8QU4QcqhOPDmzJm89kHoMAI3s=; b=B7TjVDjTRsE7DHYKxdS9nVuQaY/6st66J6Hae6j9qhkDM1nml9O8UyqqyIULZlGoha L0ENTGktb4jp4NuGyKu1EAcnnz1ZmQrAZUoKO4o4U5mC7n8pLPmJSj/mFJwkiwVxoQp8 3uNzOfqMDGaJXj/82z7tVvlxByTz92mf0mojVNaaoptChP9y6ycM+dipgTYjPqnLolP8 zwKpNBeQb2I1qqbd9iyCtCaNnu+LwwZjjJ5eDjgxjwvScLFucpz7XoLi2t3MWZNrY6GJ hFW+Mn4YWkS4xnWKfFumWHanureNFZAOOM6aiWMBiF4ISI63je8ol/0eiM/3B4l6QfE1 4R9A== X-Gm-Message-State: AOAM5305zdsTKf8cOaS5nObtmCAjehvSqhc4qZmx+ay4AZAgYu27gbr4 ikKgzMQJ9Ato+3zsDJYzr34R8AOR X-Google-Smtp-Source: ABdhPJwzI6IcKtGKF+jtjsOl+Qq6Tmsxwz8Aa9okAuqn8Ng6nHNga5XKXI89GrqMXoSoEfy9YMk1Dg== X-Received: by 2002:aed:2252:: with SMTP id o18mr5411674qtc.258.1591999945086; Fri, 12 Jun 2020 15:12:25 -0700 (PDT) Original-Received: from [192.168.0.187] (modemcable082.211-161-184.mc.videotron.ca. [184.161.211.82]) by smtp.gmail.com with ESMTPSA id h8sm5768000qto.0.2020.06.12.15.12.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jun 2020 15:12:24 -0700 (PDT) X-Mailer: Apple Mail (2.3445.104.14) Received-SPF: pass client-ip=2607:f8b0:4864:20::832; envelope-from=prouleau001@gmail.com; helo=mail-qt1-x832.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:181898 Archived-At: - Not a crash issue. - A potential customize UI problem dealing with lists with a choice of element types: - Specifying the default values that include elements of the first choice type works fine, but - Specifying the default value that include elements of the second or third choice type makes the *customize* UI report a *mismatch* = warning and the UI does not allow editing of the value. - However, if I set the default to a list of only the types of the first choice, and via the *customize* buffer UI (which then works OK) I add manually add elements of the second or third choice, the UI let me and let me save the values which are then showing inside the `custom-set-variables' form properly. - Then if I open the *Customize* buffer again I can edit properly: I see the first lists of first choice type and the last element of the second choice type. So, to me it would seem that either my data declaration is invalid and should never be accepted, or I should be able to declare a default that consists of a list with elements of different types. But I am not able to do that. I first asked on StackExchange where I was answered that this might be a bug. My code declarations follows. Notice the 4 commented-out lines following the defcustom `standard' argument: if I activate this code (and update the parens accordingly), the defcustom byte-compiles fine but *customize* buffer UI fails reporting a mismatch and does not let edit/delete entries. ;; beginning of code sample -{- (defcustom pel-key-chords '((global "<>" ("<>\C-b")) (global "[]" ("[]\C-b")) (c-mode "{}" ("{\n\n}\C-p")) (c++-mode "{}" ("{\n\n}\C-p"))) ;; (flyspell-mode "4r" flyspell-correct-word-before-point) ;; (flyspell-prog-mode "4r" flyspell-correct-word-before-point) ;; (global "6y" pel-find-file-at-point-in-window) ;; (global ".;" pel-search-word-from-top)) "List of key-chords activated when the key-chord-mode is turned on. PEL provides a set of defaults. You can replace, delete or add new key-chord definitions to this default. You can define *global* key-chords and mode-specific key-chords. - Global key-chords are stored in the global key-map. - Mode-specific key-chords are stored in the mode key-map of the specified mode when the mode is entered. The `pel-key-chords' value is a list of objects. - Each object is a list of 3 items. - The first item is either: - global : this key-chord is global - A major mode name that identifies the major mode where the key-chord must be activated. For example: c++-mode - The second item is the 2 characters used for the key-chord. Do not quote the characters. You can specify control characters to identify special keys: - for , type: C-q C-i - for RET, type: C-q C-m - It's not possible to identify the function keys here. - The third item describes the action for the key-chord. It can be expressed using one of 3 ways, selected by the Value Menu: - 0: expansion keys: Type the keys you want as replacement. You can place several keys on a line, or spread them on several lines. You can identify control keys by entering the kbd-style like C-b (by typing 'C', '-', then 'b') or by placing the control code by typing C-q C-b. Unfortunately it is currently not possible to identify a keystroke involving other modifiers or combination of modifiers; the PEL code is not able to properly recognize it to pass it to the key-chord function. Use the lambda form instead. BTW, if you know how to fix that please don't hesitate to either let me know or submit a pull-request. - 1: command: Type the name of the Emacs interactive function you want to execute when the key-chord is hit. - 2: lambda: This is the most flexible way. Here you write any elisp code you need inside a lambda expression that take no argument. You can call any elisp function in here." :group 'pel-pkg-for-key-chord :type '(repeat (choice (list :tag "expansion-keys" (symbol :tag "mode" :value global) (string :tag "chars") (repeat (key-sequence :tag "key"))) (list :tag "command" (symbol :tag "mode" :value global) (string :tag "chars") (function :tag "command")) (list :tag "lambda" (symbol :tag "mode" :value global) (string :tag "chars") (function :tag "elisp-code" :value (lambda () (interactive) )))))) ;; end of code sample -}- Thanks! =20 In GNU Emacs 26.3 (build 1, x86_64-apple-darwin18.2.0, NS appkit-1671.20 = Version 10.14.3 (Build 18D109)) of 2019-09-02 built on builder10-14.porkrind.org Windowing system distributor 'Apple', version 10.3.1671 Recent messages: Wrote /Users/roup/dev/elisp/pel/pel--options.el Saving file /Users/roup/dev/elisp/pel/pel--options.el... Wrote /Users/roup/dev/elisp/pel/pel--options.el Mark set Saving file /Users/roup/dev/elisp/pel/pel--options.el... Wrote /Users/roup/dev/elisp/pel/pel--options.el Mark set Saving file /Users/roup/dev/elisp/pel/pel--options.el... Wrote /Users/roup/dev/elisp/pel/pel--options.el Quit [4 times] Configured using: 'configure --with-ns '--enable-locallisppath=3D/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp' --with-modules' Configured features: NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS Important settings: value of $LANG: en_CA.UTF-8 locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: global-magit-file-mode: t magit-auto-revert-mode: t global-git-commit-mode: t override-global-mode: t shell-dirtrack-mode: t async-bytecomp-package-mode: t show-paren-mode: t text-scale-mode: t global-undo-tree-mode: t undo-tree-mode: t winner-mode: t which-key-mode: t diff-auto-refine-mode: t global-anzu-mode: t anzu-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-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 column-number-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: /Users/roup/.emacs.d/utils/highlight-defined hides = /Users/roup/.emacs.d/elpa/highlight-defined-20181106.1718/highlight-define= d /Users/roup/.emacs.d/utils/popup-kill-ring hides = /Users/roup/.emacs.d/elpa/popup-kill-ring-20131020.1854/popup-kill-ring /Users/roup/.emacs.d/utils/pos-tip hides = /Users/roup/.emacs.d/elpa/pos-tip-20191227.1356/pos-tip /Users/roup/.emacs.d/elpa/let-alist-1.0.6/let-alist hides = /Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/let-alist Features: (shadow sort mail-extr emacsbug sendmail checkdoc pel-frame-control flyspell pel-spell ispell dumb-jump hippie-exp pel-hideshow hideshow desktop+ desktop-registry desktop frameset monky view bindat magit-submodule magit-obsolete 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 which-func magit-diff smerge-mode magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process magit-mode git-commit magit-git magit-section with-editor server nhexl-mode hexl sr-speedbar xr pel-search-regexp visual-regexp-steroids visual-regexp pcre2el rxt re-builder regex-tool multiple-cursors mc-hide-unmatched-lines-mode mc-separate-operations rectangular-region-mode mc-mark-pop mc-mark-more mc-cycle-cursors mc-edit-lines multiple-cursors-core rect lice ztree-diff ztree-diff-model ztree-dir ztree-view ztree-util neotree vline smooth-scrolling bind-key free-keys pel-pathmng display-line-numbers pel-emacs ascii-table pel-help hide-comnt expand-region subword-mode-expansions text-mode-expansions cc-mode-expansions the-org-mode-expansions python-el-fgallina-expansions er-basic-expansions expand-region-core expand-region-custom graphviz-dot-mode highlight-defined macrostep rainbow-delimiters parinfer ediff-merg ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff mode-local parinferlib julia-snail julia-snail-parser julia-mode julia-mode-latexsubs parsec spinner exunit alchemist alchemist-macroexpand alchemist-company alchemist-help alchemist-complete company-dabbrev-code company-dabbrev alchemist-refcard alchemist-phoenix alchemist-compile alchemist-iex alchemist-message alchemist-hooks alchemist-hex alchemist-mix alchemist-info alchemist-goto alchemist-scope alchemist-eval alchemist-interact alchemist-server alchemist-execute alchemist-report alchemist-test-mode alchemist-project alchemist-file alchemist-key alchemist-utils elixir-mode elixir-format pkg-info epl elixir-smie smie lfe-mode erlang-flymake flymake-proc flymake edts-start edts-mode edts-xref edts-dialyzer edts-debug-mode edts-debug-list-processes-mode edts-debug-list-interpreted-mode edts-debug-list-breakpoint-mode edts-debug edts-shell edts-plugin edts-refactor edts-project edts-alist edts-complete edts-complete-keyword-source edts-complete-record-source edts-complete-macro-source edts-complete-module-source edts-complete-exported-function-source edts-complete-built-in-function-source edts-man woman man edts-complete-imported-function-source edts-complete-local-function-source edts-complete-variable-source edts-code edts-face edts edts-navigate edts-event edts-api edts-rpc edts-log ferl edts-doc auto-highlight-symbol erlang-start erlang tempo align company-dcd popwin company ac-dcd flycheck-dmd-dub flycheck yasnippet auto-complete d-mode cc-mode cc-fonts cc-guess cc-menus cc-styles cc-align pel-applescript apples-mode counsel-osx-app goto-last-change cc-cmds cc-engine cargo cargo-process markdown-mode racer f rust-mode rx elpy elpy-rpc pyvenv esh-var esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg esh-groups eshell esh-module esh-mode esh-util elpy-shell elpy-profile elpy-django elpy-refactor python json files-x esup esup-child benchmark slime etags arc-mode archive-mode hyperspec c-eldoc cl org-element avl-tree generator org org-macro org-footnote org-pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs org-loaddefs cal-menu calendar cal-loaddefs dired-narrow dired-hacks-utils use-package-ensure use-package-core popup-kill-ring pos-tip popup hl-line vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs tramp-cache tramp-sh tramp tramp-compat tramp-loaddefs trampver shell pcomplete parse-time rg pcase rg-info-hack rg-menu transient rg-ibuffer rg-result wgrep-rg wgrep s rg-history rg-header grep pel-kbmacros vterm term disp-table ehelp vterm-module pel-comment-adorn pel-comment pel-rst rst pel-text-insert log-edit pcvs-util add-log vc-dir ewoc helm-mode helm-files helm-buffers helm-occur helm-tags helm-locate helm-grep helm-regexp helm-utils helm-help helm-types helm-config helm-easymenu async-bytecomp helm helm-source eieio-compat helm-multi-match helm-lib async edebug vc pel-lisp jka-compr paren imenu pel-text-transform pulse face-remap pel-font misearch multi-isearch magit-utils crm dash browse-url pel-undo undo-tree diff pel-mark pel-indent cc-vars cc-defs debug pel-ccp pel-numkpad ace-window subr-x avy cl-print eieio-opt speedbar sb-image ezimage dframe find-func help-fns key-chord two-column iso-transl repeat ibuf-ext ibuffer ibuffer-loaddefs warnings autoload radix-tree executable time-stamp copyright pp vc-dispatcher vc-hg cus-edit cus-start cus-load wid-edit lisp-mnt pel-search pel-window pel-read pel-navigate cap-words superword subword pel-scroll mm-archive message format-spec rfc822 mml mml-sec epa derived epg gnus-util rmail rmail-loaddefs mailabbrev gmm-utils mailheader mm-decode mm-bodies mm-encode mail-utils network-stream starttls url-http tls gnutls mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr url-gw nsm rmc puny url-cache url-auth url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap windmove framemove winner hydra lv bm counsel xdg xref project dired-x dired dired-loaddefs compile comint ansi-color swiper cl-extra help-mode ivy delsel ring ivy-faces ivy-overlay colir color ido pel-completion pel-seq pel-prompt which-key vc-git diff-mode easy-mmode map elec-pair pel_keys anzu thingatpt pel-imenu pel-cursor pel-commonlisp pel-autoload pel--options pel--macros pel--base pel finder-inf edmacro kmacro slime-autoloads info package easymenu epg-config url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp byte-compile cconv benchmark-init advice cl-loaddefs cl-lib time-date tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame 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 minibuffer 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 kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 2861657 321118) (symbols 48 79381 2) (miscs 40 82136 17181) (strings 32 350988 22531) (string-bytes 1 10221691) (vectors 16 138257) (vector-slots 8 2694369 169356) (floats 8 1064 2306) (intervals 56 281724 22233) (buffers 992 78))