unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* 27.1; defcustom for mail-user-agent is too strict?
@ 2021-09-07 17:58 David Bremner
  2021-09-08  6:56 ` bug#50460: " Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: David Bremner @ 2021-09-07 17:58 UTC (permalink / raw)
  To: bug-gnu-emacs; +Cc: notmuch


[-- Attachment #1.1: Type: text/plain, Size: 7315 bytes --]


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))

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 857 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: bug#50460: 27.1; defcustom for mail-user-agent is too strict?
  2021-09-07 17:58 27.1; defcustom for mail-user-agent is too strict? David Bremner
@ 2021-09-08  6:56 ` Lars Ingebrigtsen
  2021-09-08  8:54   ` Gregor Zattler
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-08  6:56 UTC (permalink / raw)
  To: David Bremner; +Cc: 50460, notmuch

David Bremner <david@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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: bug#50460: 27.1; defcustom for mail-user-agent is too strict?
  2021-09-08  6:56 ` bug#50460: " Lars Ingebrigtsen
@ 2021-09-08  8:54   ` Gregor Zattler
  0 siblings, 0 replies; 3+ messages in thread
From: Gregor Zattler @ 2021-09-08  8:54 UTC (permalink / raw)
  To: 50460, notmuch

Hi David, Lars,
* Lars Ingebrigtsen <larsi@gnus.org> [2021-09-08; 08:56]:
> David Bremner <david@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
--
 -... --- .-. . -.. ..--.. ...-.-

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-08  8:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-07 17:58 27.1; defcustom for mail-user-agent is too strict? David Bremner
2021-09-08  6:56 ` bug#50460: " Lars Ingebrigtsen
2021-09-08  8:54   ` Gregor Zattler

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).