GNU bug report logs - #50460
27.1; defcustom for mail-user-agent is too strict?

Previous Next

Package: emacs;

Reported by: David Bremner <david <at> tethera.net>

Date: Tue, 7 Sep 2021 17:59:01 UTC

Severity: normal

Found in version 27.1

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50460 in the body.
You can then email your comments to 50460 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#50460; Package emacs. (Tue, 07 Sep 2021 17:59:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to David Bremner <david <at> tethera.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 07 Sep 2021 17:59:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: David Bremner <david <at> tethera.net>
To: bug-gnu-emacs <at> gnu.org
Cc: notmuch <at> notmuchmail.org
Subject: 27.1; defcustom for mail-user-agent is too strict?
Date: Tue, 07 Sep 2021 14:58:41 -0300
[Message part 1 (text/plain, inline)]
The defcustom for mail-user-agent looks like

:type '(radio (function-item :tag "Message package"
			       :format "%t\n"
			       message-user-agent)
;; [...] snip                               
		(function-item :tag "Message with full Gnus features"
			       :format "%t\n"
			       gnus-user-agent)
		(function :tag "Other"))

This means that a symbol without a function definition cannot be set
(using customize) as mail-user-agent. This seem inconsistent with the
docstring of define-mail-user-agent, 

    SYMBOL can be any Lisp symbol.  Its function definition and/or
    value as a variable do not matter for this usage; we use only certain
    properties on its property list, to encode the rest of the arguments.

and with existing mail user agents such as message-user-agent and
gnus-user-agent which don't have function definitions.

As far as I know, this defcustom is still enforcing that the symbol is a
function in emacs 28.x.

In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
 of 2021-03-27, modified by Debian built on x86-conova-01
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux 11 (bullseye)

Configured using:
 'configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --enable-libsystemd --with-pop=yes
 --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/27.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/27.1/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-mailutils --build
 x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man --enable-libsystemd
 --with-pop=yes
 --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/27.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/27.1/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-mailutils --with-cairo
 --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
 'CFLAGS=-g -O2
 -ffile-prefix-map=/build/emacs-LlFm6W/emacs-27.1+1=. -fstack-protector-strong
 -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro'

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD
JSON PDUMPER LCMS2 GMP

Important settings:
  value of $LANG: en_CA.UTF-8
  locale-coding-system: utf-8-unix

Major mode: notmuch-show

Minor modes in effect:
  shell-dirtrack-mode: t
  tracking-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
  line-number-mode: t
  visual-line-mode: t
  transient-mark-mode: t


Features:
(shadow sort company-oddmuse company-keywords company-etags etags
fileloop xref project company-gtags company-dabbrev-code company-dabbrev
company-files company-capf company-cmake company-xcode company-clang
company-semantic company-eclim company-template company-bbdb company
mail-extr emacsbug sendmail cursor-sensor smerge-mode diff mm-archive
shr-color org-clock org-duration view mule-util cal-china lunar solar
cal-dst cal-bahai cal-islam cal-hebrew holidays hol-loaddefs cal-iso
org-eldoc org-element avl-tree generator ol-eww eww mm-url url-queue
ol-rmail ol-mhe ol-irc ol-info ol-gnus nnir gnus-sum url url-proxy
url-privacy url-expand url-methods url-history shr url-cookie url-domsuf
url-util svg xml dom gnus-group gnus-undo gnus-start gnus-cloud nnimap
nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range
gnus-win gnus nnheader ol-docview doc-view jka-compr image-mode exif
ol-bibtex bibtex ol-bbdb ol-w3m face-remap org-agenda org-refile org
org-macro org-footnote org-pcomplete org-list org-faces org-entities
noutline outline org-version ob-dot ob-shell ob-emacs-lisp ob-python
python tramp-sh tramp tramp-loaddefs trampver tramp-integration files-x
tramp-compat shell pcomplete parse-time iso8601 ls-lisp ob ob-tangle
org-src ob-ref ob-lob ob-table ob-exp ob-comint comint ansi-color
ob-core ob-eval org-table org-keys org-loaddefs find-func edmacro kmacro
cl-extra notmuch notmuch-tree notmuch-jump notmuch-hello wid-edit
notmuch-show notmuch-print notmuch-crypto notmuch-mua notmuch-message
notmuch-draft notmuch-maildir-fcc notmuch-address notmuch-company
notmuch-parser notmuch-wash coolj notmuch-query goto-addr icalendar
diary-lib diary-loaddefs cal-menu calendar cal-loaddefs notmuch-tag crm
notmuch-lib notmuch-version notmuch-compat pcase hl-line message rmc
dired dired-loaddefs rfc822 mml mailabbrev gmm-utils mailheader mm-view
mml-smime mml-sec epa derived epg epg-config gnus-util rmail
rmail-loaddefs mail-utils text-property-search time-date smime dig
mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045
mm-util ietf-drums mail-prsvr vc-git server tempo ol-notmuch ol
org-compat org-macs format-spec org-install vc vc-dispatcher
circe-color-nicks color circe-chanop circe advice diff-mode
lui-irc-colors irc make-tls-process tls gnutls puny lcs lui-format lui
tracking shorten easy-mmode rx thingatpt paren help-mode flyspell ispell
ring circe-compat bbdb-loaddefs preview-latex auto-loads tex-site
finder-inf dpkg-dev-el info debian-el slime-autoloads package easymenu
browse-url url-handlers url-parse auth-source cl-seq eieio eieio-core
cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq
byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib 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 tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer 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 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 dbusbind inotify lcms2 dynamic-setting
system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit
x multi-tty make-network-process emacs)

Memory information:
((conses 16 655778 54211)
 (symbols 48 31792 3)
 (strings 32 150840 22171)
 (string-bytes 1 4753274)
 (vectors 16 59825)
 (vector-slots 8 1381524 89918)
 (floats 8 1245 935)
 (intervals 56 18472 870)
 (buffers 1000 63))
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50460; Package emacs. (Wed, 08 Sep 2021 06:57:02 GMT) Full text and rfc822 format available.

Message #8 received at 50460 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: David Bremner <david <at> tethera.net>
Cc: 50460 <at> debbugs.gnu.org, notmuch <at> notmuchmail.org
Subject: Re: bug#50460: 27.1; defcustom for mail-user-agent is too strict?
Date: Wed, 08 Sep 2021 08:56:19 +0200
David Bremner <david <at> tethera.net> writes:

> The defcustom for mail-user-agent looks like
>
> :type '(radio (function-item :tag "Message package"
> 			       :format "%t\n"
> 			       message-user-agent)
> ;; [...] snip                               
> 		(function-item :tag "Message with full Gnus features"
> 			       :format "%t\n"
> 			       gnus-user-agent)
> 		(function :tag "Other"))
>
> This means that a symbol without a function definition cannot be set
> (using customize) as mail-user-agent. This seem inconsistent with the
> docstring of define-mail-user-agent, 

Yup.  Now fixed in Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 28.1, send any further explanations to 50460 <at> debbugs.gnu.org and David Bremner <david <at> tethera.net> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 08 Sep 2021 06:57:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50460; Package emacs. (Wed, 08 Sep 2021 08:55:01 GMT) Full text and rfc822 format available.

Message #13 received at 50460 <at> debbugs.gnu.org (full text, mbox):

From: Gregor Zattler <telegraph <at> gmx.net>
To: 50460 <at> debbugs.gnu.org, notmuch <at> notmuchmail.org
Subject: Re: bug#50460: 27.1; defcustom for mail-user-agent is too strict?
Date: Wed, 08 Sep 2021 10:54:16 +0200
Hi David, Lars,
* Lars Ingebrigtsen <larsi <at> gnus.org> [2021-09-08; 08:56]:
> David Bremner <david <at> tethera.net> writes:
>
>> The defcustom for mail-user-agent looks like
>>
>> :type '(radio (function-item :tag "Message package"
>> 			       :format "%t\n"
>> 			       message-user-agent)
>> ;; [...] snip
>> 		(function-item :tag "Message with full Gnus features"
>> 			       :format "%t\n"
>> 			       gnus-user-agent)
>> 		(function :tag "Other"))
>>
>> This means that a symbol without a function definition cannot be set
>> (using customize) as mail-user-agent. This seem inconsistent with the
>> docstring of define-mail-user-agent,
>
> Yup.  Now fixed in Emacs 28.

thanks for the fast bug report and fixing.  I confirm it is
now possible to customize `mail-user-agent' to
`notmuch-user-agent' via `customize-variable'.


Ciao; Gregor
--
 -... --- .-. . -.. ..--.. ...-.-




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 06 Oct 2021 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 196 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.