X-Loop: help-debbugs@HIDDEN Subject: bug#26910: 26.0.50; Enhancement request: type-checking in customize-set-variable Resent-From: "N. Raghavendra" <raghu@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 13 May 2017 16:38:02 +0000 Resent-Message-ID: <handler.26910.B.149469346117309 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 26910 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 26910 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Reply-To: "N. Raghavendra" <raghu@HIDDEN> Received: via spool by submit <at> debbugs.gnu.org id=B.149469346117309 (code B ref -1); Sat, 13 May 2017 16:38:02 +0000 Received: (at submit) by debbugs.gnu.org; 13 May 2017 16:37:41 +0000 Received: from localhost ([127.0.0.1]:43166 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1d9a31-0004V5-3H for submit <at> debbugs.gnu.org; Sat, 13 May 2017 12:37:41 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <raghu@HIDDEN>) id 1d9TGk-0005Y2-Io for submit <at> debbugs.gnu.org; Sat, 13 May 2017 05:23:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <raghu@HIDDEN>) id 1d9TGc-0002wY-C3 for submit <at> debbugs.gnu.org; Sat, 13 May 2017 05:23:17 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:35427) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <raghu@HIDDEN>) id 1d9TGc-0002wC-8Z for submit <at> debbugs.gnu.org; Sat, 13 May 2017 05:23:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <raghu@HIDDEN>) id 1d9TGZ-0003TM-Ff for bug-gnu-emacs@HIDDEN; Sat, 13 May 2017 05:23:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <raghu@HIDDEN>) id 1d9TGW-0002qD-81 for bug-gnu-emacs@HIDDEN; Sat, 13 May 2017 05:23:11 -0400 Received: from sub5.mail.dreamhost.com ([208.113.200.129]:36898 helo=homiemail-a81.g.dreamhost.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <raghu@HIDDEN>) id 1d9TGV-0002mg-V3 for bug-gnu-emacs@HIDDEN; Sat, 13 May 2017 05:23:08 -0400 Received: from homiemail-a81.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a81.g.dreamhost.com (Postfix) with ESMTP id B99FF4450 for <bug-gnu-emacs@HIDDEN>; Sat, 13 May 2017 02:23:01 -0700 (PDT) Received: from retrotexts.net (hrins2.hri.res.in [220.227.103.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: raghu@HIDDEN) by homiemail-a81.g.dreamhost.com (Postfix) with ESMTPSA id 14A0B4339 for <bug-gnu-emacs@HIDDEN>; Sat, 13 May 2017 02:23:01 -0700 (PDT) Received: by retrotexts.net (Postfix, from userid 1000) id 4C2272400BE8; Sat, 13 May 2017 14:52:57 +0530 (IST) From: "N. Raghavendra" <raghu@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Date: Sat, 13 May 2017 14:52:57 +0530 Message-ID: <87h90pxg9a.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Mailman-Approved-At: Sat, 13 May 2017 12:37:37 -0400 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -4.0 (----) I would like a way to set options using Emacs Lisp directly (without interacting with customization buffers), which ensures that the :set and :type specifications of the options are respected. Evaluating (customize-set-variable OPTION VALUE) uses the :set property of OPTION, but doesn't check that VALUE has the type specified in the (defcustom OPTION ...) expression. I request the addition of an optional argument to customize-set-variable, so that, e.g., (customize-set-variable OPTION VALUE "This is a comment." t) generates an error if VALUE is not of the type specified by (defcustom OPTION ...), and otherwise does everything that (customize-set-variable OPTION VALUE "This is a comment.") does now. I also request a similar addition to `custom-set-variables'. ---------------------------------------------------------------------- In GNU Emacs 26.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2017-01-22 built on ailuros Repository revision: 0a49f158f1598fb92989f3cbdc238a7e5f1bd8a3 Windowing system distributor 'The X.Org Foundation', version 11.0.11804000 System Description: Linux Mint 18.1 Serena Recent messages: No new newsgroups Checking new news... nnimap read 0k from imap.gmail.com Reading active file via nndraft...done Checking new news...done Configuring package gnus-topic...done Opening nnimap server on gmail...done nnimap read 0k from imap.gmail.com Configuring package gnus-async...done Configuring package sendmail...done Configured using: 'configure --prefix=/pkg/emacs --with-x --with-x-toolkit=gtk3 --with-xft' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 Important settings: value of $LANG: en_IN locale-coding-system: iso-latin-1-unix Major mode: Group Minor modes in effect: gnus-topic-mode: t gnus-undo-mode: t pdf-occur-global-minor-mode: t delete-selection-mode: t override-global-mode: t helm-mode: t shell-dirtrack-mode: t tooltip-mode: t global-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 auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: /pkg/el-get/org-mode/lisp/ob-lilypond hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-lilypond /pkg/el-get/org-mode/lisp/ob-ruby hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-ruby /pkg/el-get/org-mode/lisp/org-footnote hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-footnote /pkg/el-get/org-mode/lisp/ob-screen hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-screen /pkg/el-get/org-mode/lisp/ob-asymptote hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-asymptote /pkg/el-get/org-mode/lisp/ob-fortran hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-fortran /pkg/el-get/org-mode/lisp/ox-ascii hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ox-ascii /pkg/el-get/org-mode/lisp/org-timer hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-timer /pkg/el-get/org-mode/lisp/org-faces hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-faces /pkg/el-get/org-mode/lisp/ob-calc hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-calc /pkg/el-get/org-mode/lisp/org-clock hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-clock /pkg/el-get/org-mode/lisp/ob-java hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-java /pkg/el-get/org-mode/lisp/ob-gnuplot hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-gnuplot /pkg/el-get/org-mode/lisp/org-irc hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-irc /pkg/el-get/org-mode/lisp/ob-makefile hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-makefile /pkg/el-get/org-mode/lisp/ob-table hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-table /pkg/el-get/org-mode/lisp/ob-exp hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-exp /pkg/el-get/org-mode/lisp/ob-plantuml hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-plantuml /pkg/el-get/org-mode/lisp/org-mouse hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-mouse /pkg/el-get/org-mode/lisp/ob-scheme hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-scheme /pkg/el-get/org-mode/lisp/org-crypt hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-crypt /pkg/el-get/org-mode/lisp/ob-dot hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-dot /pkg/el-get/org-mode/lisp/ob-ledger hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-ledger /pkg/el-get/org-mode/lisp/ox-md hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ox-md /pkg/el-get/org-mode/lisp/ob-core hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-core /pkg/el-get/org-mode/lisp/org-indent hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-indent /pkg/el-get/org-mode/lisp/ob-awk hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-awk /pkg/el-get/org-mode/lisp/ob-scala hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-scala /pkg/el-get/org-mode/lisp/ob-R hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-R /pkg/el-get/org-mode/lisp/org-agenda hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-agenda /pkg/el-get/org-mode/lisp/org-id hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-id /pkg/el-get/org-mode/lisp/org-bibtex hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-bibtex /pkg/el-get/org-mode/lisp/ob-css hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-css /pkg/el-get/org-mode/lisp/ob-shen hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-shen /pkg/el-get/org-mode/lisp/org-attach hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-attach /pkg/el-get/org-mode/lisp/org-colview hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-colview /pkg/el-get/org-mode/lisp/org hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org /pkg/el-get/org-mode/lisp/ob-keys hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-keys /pkg/el-get/org-mode/lisp/ox-icalendar hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ox-icalendar /pkg/el-get/org-mode/lisp/ob-ref hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-ref /pkg/el-get/org-mode/lisp/org-feed hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-feed /pkg/el-get/org-mode/lisp/ob-latex hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-latex /pkg/el-get/org-mode/lisp/ob hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob /pkg/el-get/org-mode/lisp/ox-odt hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ox-odt /pkg/el-get/org-mode/lisp/ob-haskell hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-haskell /pkg/el-get/org-mode/lisp/org-docview hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-docview /pkg/el-get/org-mode/lisp/ob-lisp hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-lisp /pkg/el-get/org-mode/lisp/org-table hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-table /pkg/el-get/org-mode/lisp/ob-io hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-io /pkg/el-get/org-mode/lisp/ob-eval hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-eval /pkg/el-get/org-mode/lisp/ob-sass hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-sass /pkg/el-get/org-mode/lisp/ob-org hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-org /pkg/el-get/org-mode/lisp/org-list hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-list /pkg/el-get/org-mode/lisp/ob-lob hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-lob /pkg/el-get/org-mode/lisp/org-bbdb hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-bbdb /pkg/el-get/org-mode/lisp/org-inlinetask hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-inlinetask /pkg/el-get/org-mode/lisp/ob-C hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-C /pkg/el-get/org-mode/lisp/org-compat hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-compat /pkg/el-get/org-mode/lisp/ob-matlab hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-matlab /pkg/el-get/org-mode/lisp/org-info hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-info /pkg/el-get/org-mode/lisp/ob-clojure hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-clojure /pkg/el-get/org-mode/lisp/ob-emacs-lisp hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-emacs-lisp /pkg/el-get/org-mode/lisp/org-capture hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-capture /pkg/el-get/org-mode/lisp/ox-beamer hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ox-beamer /pkg/el-get/org-mode/lisp/ob-mscgen hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-mscgen /pkg/el-get/org-mode/lisp/ob-comint hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-comint /pkg/el-get/org-mode/lisp/ob-sqlite hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-sqlite /pkg/el-get/org-mode/lisp/ob-octave hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-octave /pkg/el-get/org-mode/lisp/org-macro hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-macro /pkg/el-get/org-mode/lisp/ob-tangle hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-tangle /pkg/el-get/org-mode/lisp/org-mobile hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-mobile /pkg/el-get/org-mode/lisp/ob-picolisp hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-picolisp /pkg/el-get/org-mode/lisp/ob-sql hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-sql /pkg/el-get/org-mode/lisp/org-ctags hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-ctags /pkg/el-get/org-mode/lisp/org-src hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-src /pkg/el-get/org-mode/lisp/org-mhe hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-mhe /pkg/el-get/org-mode/lisp/ox-texinfo hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ox-texinfo /pkg/el-get/org-mode/lisp/ox-html hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ox-html /pkg/el-get/org-mode/lisp/org-rmail hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-rmail /pkg/el-get/org-mode/lisp/ob-ditaa hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-ditaa /pkg/el-get/org-mode/lisp/org-loaddefs hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-loaddefs /pkg/el-get/org-mode/lisp/org-protocol hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-protocol /pkg/el-get/org-mode/lisp/org-datetree hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-datetree /pkg/el-get/org-mode/lisp/org-pcomplete hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-pcomplete /pkg/el-get/org-mode/lisp/org-habit hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-habit /pkg/el-get/org-mode/lisp/ox-man hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ox-man /pkg/el-get/org-mode/lisp/ox-publish hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ox-publish /pkg/el-get/org-mode/lisp/ox-org hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ox-org /pkg/el-get/org-mode/lisp/ox hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ox /pkg/el-get/org-mode/lisp/ob-maxima hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-maxima /pkg/el-get/org-mode/lisp/org-gnus hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-gnus /pkg/el-get/org-mode/lisp/ox-latex hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ox-latex /pkg/el-get/org-mode/lisp/org-archive hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-archive /pkg/el-get/org-mode/lisp/org-entities hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-entities /pkg/el-get/org-mode/lisp/ob-perl hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-perl /pkg/el-get/org-mode/lisp/ob-js hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-js /pkg/el-get/org-mode/lisp/org-plot hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-plot /pkg/el-get/org-mode/lisp/ob-ocaml hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-ocaml /pkg/el-get/org-mode/lisp/org-macs hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-macs /pkg/el-get/org-mode/lisp/org-element hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-element /pkg/el-get/org-mode/lisp/org-eshell hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-eshell /pkg/el-get/org-mode/lisp/org-version hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-version /pkg/el-get/org-mode/lisp/ob-python hides /pkg/emacs/share/emacs/26.0.50/lisp/org/ob-python /pkg/el-get/org-mode/lisp/org-install hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-install /pkg/el-get/org-mode/lisp/org-w3m hides /pkg/emacs/share/emacs/26.0.50/lisp/org/org-w3m Features: (shadow gnus-cite flyspell ispell mail-extr nnir emacsbug sendmail gnus-async gnus-ml gnus-topic nndraft nnmh utf-7 gnus-demon my-ypldap-org-contacts my-ypldap-org-contacts-helper org-contacts org-capture org-agenda network-stream nsm starttls gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig nntp gnus-cache gnus-sum gnus-group gnus-undo my-gnus-init.el offlineimap gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc nnoo gnus-spec gnus-int gnus-range message puny rfc822 mml mml-sec epa derived epg mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums mail-utils winner helm-command helm-elisp helm-eval edebug server my-init.el my-whitespace whitespace my-vc my-uniquify my-tramp my-tool-bar my-tex my-tex-site my-tex-buf my-simple my-sh-script my-sendmail my-reftex my-proof-useropts my-plain-tex my-pg-custom my-pdf-view my-pdf-tools pdf-occur ibuf-ext ibuffer ibuffer-loaddefs tablist tablist-filter semantic/wisent/comp semantic/wisent semantic/wisent/wisent semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local cedet pdf-isearch let-alist pdf-misc imenu pdf-tools pdf-view jka-compr pdf-cache pdf-info pdf-util my-ox 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-element avl-tree 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-comint find-func cal-menu calendar cal-loaddefs ob-exp ob-core org-compat ob-eval org-macs my-ox-publish my-time my-ox-html my-org my-org-contacts my-org-capture my-org-agenda my-dired-some-files my-offlineimap my-nnml my-nnmail my-nnir my-nnfolder mm-util mail-prsvr my-base-feature my-nadvice my-my-ypldap-org-contacts my-my-time my-my-el-get-port my-el-get-port my-my-bibtex-file-field my-my-bibtex-clean agda-input quail my-my-base-feature my-mouse my-mm-decode my-message my-menu-bar my-mailcap my-macrostep my-latex my-ispell my-info my-helm my-helm-mode my-helm-lib my-helm-files my-helm-dabbrev my-helm-config my-helm-command my-helm-buffers my-gnutls my-gnus my-gnus-topic my-gnus-sum my-gnus-start my-gnus-msg my-gnus-group my-gnus-dired my-gnus-demon my-gnus-async my-gnus-art my-frame my-font-lock my-font-core my-flyspell my-files my-faces my-emms-source-file my-emms-setup emms-librefm-stream emms-librefm-scrobbler emms-playlist-limit emms-volume emms-volume-amixer emms-i18n emms-history emms-score emms-stream-info emms-metaplaylist-mode emms-bookmarks emms-cue emms-mode-line-icon emms-browser sort emms-playlist-sort emms-last-played emms-player-xine emms-player-mpd tq emms-playing-time emms-lyrics emms-url time-date emms-streams emms-show-all emms-tag-editor emms-mark emms-mode-line emms-cache emms-info-ogginfo emms-info-mp3info emms-info later-do emms-playlist-mode emms-player-vlc emms-player-mplayer emms-player-simple emms-source-playlist emms-source-file locate my-elisp-mode my-diminish my-delsel delsel my-cus-edit cus-edit cus-start cus-load wid-edit my-coq my-coq-system my-compile my-company-coq my-bibtex my-agda-input my-use-package use-package bind-key my-el-get org-loaddefs helm-mode helm-files rx image-dired image-mode tramp tramp-compat tramp-loaddefs trampver ucs-normalize shell pcomplete parse-time format-spec dired-x dired-aux ffap thingatpt helm-buffers helm-elscreen helm-tags helm-bookmark helm-adaptive helm-info info bookmark helm-locate helm-grep helm-regexp helm-external helm-net browse-url xml helm-utils compile comint ansi-color ring helm-help helm-types helm easy-mmode helm-source eieio-compat helm-multi-match helm-lib advice helm-config helm-easymenu edmacro kmacro helm-autoloads emms-setup emms emms-compat diminish proof-site proof-autoloads pg-vars preview-latex tex-site auto-loads .loaddefs el-get-bundle el-get el-get-autoloading el-get-list-packages el-get-dependencies el-get-build el-get-status pp el-get-methods el-get-fossil el-get-svn el-get-pacman el-get-github-zip el-get-github-tar el-get-http-zip el-get-http-tar el-get-hg el-get-go el-get-git-svn el-get-fink el-get-emacswiki el-get-http el-get-notify el-get-emacsmirror el-get-github el-get-git el-get-elpa el-get-darcs el-get-cvs el-get-bzr el-get-brew el-get-builtin el-get-apt-get el-get-recipes el-get-byte-compile subr-x el-get-custom el-get-core autoload radix-tree lisp-mnt cl dired dired-loaddefs my-system url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap finder-inf package 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 cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib disp-table mule-util 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 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 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 dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 567283 26624) (symbols 48 51192 2) (miscs 40 131 303) (strings 32 133090 16113) (string-bytes 1 4369195) (vectors 16 76644) (vector-slots 8 1110642 10975) (floats 8 728 400) (intervals 56 923 8) (buffers 976 25) (heap 1024 71343 2610)) -- N. Raghavendra <raghu@HIDDEN>, http://www.retrotexts.net/ Harish-Chandra Research Institute, http://www.hri.res.in/
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: "N. Raghavendra" <raghu@HIDDEN> Subject: bug#26910: Acknowledgement (26.0.50; Enhancement request: type-checking in customize-set-variable) Message-ID: <handler.26910.B.149469346117309.ack <at> debbugs.gnu.org> References: <87h90pxg9a.fsf@HIDDEN> X-Gnu-PR-Message: ack 26910 X-Gnu-PR-Package: emacs Reply-To: 26910 <at> debbugs.gnu.org Date: Sat, 13 May 2017 16:38:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 26910 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 26910: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D26910 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#26910: 26.0.50; Enhancement request: type-checking in customize-set-variable Resent-From: Drew Adams <drew.adams@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 13 May 2017 17:51:01 +0000 Resent-Message-ID: <handler.26910.B26910.149469785823936 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 26910 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "N. Raghavendra" <raghu@HIDDEN>, 26910 <at> debbugs.gnu.org Received: via spool by 26910-submit <at> debbugs.gnu.org id=B26910.149469785823936 (code B ref 26910); Sat, 13 May 2017 17:51:01 +0000 Received: (at 26910) by debbugs.gnu.org; 13 May 2017 17:50:58 +0000 Received: from localhost ([127.0.0.1]:43226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1d9bBy-0006Dz-8q for submit <at> debbugs.gnu.org; Sat, 13 May 2017 13:50:58 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:20923) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <drew.adams@HIDDEN>) id 1d9bBw-0006Dm-7B for 26910 <at> debbugs.gnu.org; Sat, 13 May 2017 13:50:56 -0400 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v4DHomcU006082 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 13 May 2017 17:50:49 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.13.8/8.14.4) with ESMTP id v4DHolNt006637 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 13 May 2017 17:50:48 GMT Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v4DHojLi032444; Sat, 13 May 2017 17:50:45 GMT MIME-Version: 1.0 Message-ID: <29d980da-ffd1-4b9c-9c6b-418de1d7db9f@default> Date: Sat, 13 May 2017 10:50:44 -0700 (PDT) From: Drew Adams <drew.adams@HIDDEN> References: <87h90pxg9a.fsf@HIDDEN> In-Reply-To: <87h90pxg9a.fsf@HIDDEN> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6767.5000 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) > I request the addition of an optional argument to > customize-set-variable, so that, e.g., > (customize-set-variable OPTION VALUE "This is a comment." t) > generates an error if VALUE is not of the type specified by > (defcustom OPTION ...), +1 Should it raise an error or just show a message and be ignored (not set the value)? How about having the new optional argument specify the behavior? Non-nil means type-check. The particular non-nil value: * `no-error' means if type-check fails just show a message (and do not set value). * any other non-nil value means raise an error (defun customize-set-variable (variable value &optional comment type-checki= ng) "... Non-nil optional arg TYPE-CHECKING means type-check VALUE and set the option value only if the type is appropriate. If TYPE-CHECKING is `no-error' then display a message about the incorrect type, but do not raise an error. Any other non-nil value means raise an error." ...) > and otherwise does everything that > (customize-set-variable OPTION VALUE "This is a comment.") > does now. Sounds good to me. > I also request a similar addition to `custom-set-variables'. I think this one is impossible, since `custom-set-variables' has only an &rest parameter: the args are not wrapped in an explicit list. We cannot add an optional parameter after the &rest parameter. In addition, `custom-set-variables' accepts an _expression_, without evaluating it (by default) for each variable. Unless the optional NOW element is present - in that case we could type-check the resulting value. This also means that we would need to provide such control separately for each variable passed to `custom-set-variables'. We could do that by allowing NOW to take one or more special non-nil values, to mean type-check after evaluating. Probably we would want to allow two such special type-checking values: If NOW is present and non-nil, then also evaluate EXP and set the default value for the SYMBOL to the value of EXP. If NOW is the symbol `type-check' then raise an error if the result of evaluating EXP is not of an appropriate type. If NOW is the symbol `type-check-no-error' then type-check the value of EXP but just show a message, instead of raising an error, when the value has an inappropriate type. What about also having another function, similar to `custom-set-variables', but which accepts an explicit list of (SYMBOL EXP [NOW [REQUEST [COMMENT]]]) entries plus an optional TYPE-CHECKING arg that has the effect of providing a default type-checking behavior for all entries that have non-nil NOW. Without non-nil arg TYPE-CHECKING it would behave just like (apply 'custom-set-variables VARLIST), where VARLIST is the explicit list of variable specs. Maybe something like this: (defun custom-set-varlist (varlist &optional type-checking) "Invoke `custom-set-variables' on the settings in list VARLIST. Each such setting has the form of an argument acceptable to `custom-set-variables'. Non-nil optional arg TYPE-CHECKING means type-check each VARLIST entry that has a non-nil NOW element, and set the option value only if the type is appropriate. The value of TYPE-CHECKING determines the default type-checking behavior: a value of `no-error' means display messages about the incorrect types, but do not raise an error. Any other non-nil value means raise an error. The default type-checking behavior can be overridden for any given variable by its NOW element. If NOW is `type-check' or `type-check-no-error' then it overrides the value of arg TYPE-CHECKING for that variable. If NOW is any other non-nil value then the value of TYPE-CHECKING determines the behavior." ...)
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.