unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#54127: 29.0.50; auth-sources defcustom bug
@ 2022-02-23 14:45 Mauro Aranda
  2022-02-23 14:49 ` Mauro Aranda
  0 siblings, 1 reply; 3+ messages in thread
From: Mauro Aranda @ 2022-02-23 14:45 UTC (permalink / raw)
  To: 54127

After emacs -Q:

M-x load-library RET auth-source
M-x customize-option RET auth-sources
Click the INS button to insert a new source.
Select "Source definition" from the Value Menu.
Click the INS button for Extra Parameters.

A new extra parameter is added but with an invalid value, detected by
the widget code.

Furthermore, auth-source-backend-parse-parameters thinks these extra
parameters are in a plist, but the type spec looks wrong in that case
since after setting for the session, auth-sources is something like:
("~/.authinfo" "~/.authinfo.gpg" "~/.netrc"
 (:source ""
	  (:host t)
	  (:port imap)))


In GNU Emacs 29.0.50 (build 66, i686-pc-linux-gnu, GTK+ Version 2.24.32, cairo version 1.16.0)
 of 2022-02-23 built on tbb-desktop
Repository revision: 85ad8616007e286c237bb2906d1928bb551462e7
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
System Description: Ubuntu 18.04.6 LTS

Configured using:
 'configure --with-dbus --with-mailutils
 PKG_CONFIG_PATH=/opt/cairo/lib/pkgconfig'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG MODULES
NOTIFY INOTIFY PDUMPER PNG SECCOMP SOUND THREADS TIFF
TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK2 ZLIB

Important settings:
  value of $LC_MONETARY: es_AR.UTF-8
  value of $LC_NUMERIC: es_AR.UTF-8
  value of $LC_TIME: es_AR.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  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
  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
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media rmc puny
dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg
rfc6068 epg-config gnus-util text-property-search time-date seq gv
subr-x byte-opt bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode 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 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 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 emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button 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 move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 8 42511 5795)
 (symbols 24 5665 1)
 (strings 16 15717 1167)
 (string-bytes 1 503805)
 (vectors 8 11122)
 (vector-slots 4 164043 34266)
 (floats 8 20 26)
 (intervals 28 202 0)
 (buffers 564 10))





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

* bug#54127: 29.0.50; auth-sources defcustom bug
  2022-02-23 14:45 bug#54127: 29.0.50; auth-sources defcustom bug Mauro Aranda
@ 2022-02-23 14:49 ` Mauro Aranda
  2022-02-23 20:05   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Mauro Aranda @ 2022-02-23 14:49 UTC (permalink / raw)
  To: 54127

[-- Attachment #1: Type: text/plain, Size: 17 bytes --]

Here's a patch:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-patch, Size: 1797 bytes --]

From 57b5ff82d35f8059f152453526a30283cf65ea22 Mon Sep 17 00:00:00 2001
From: Mauro Aranda <maurooaranda@gmail.com>
Date: Sun, 20 Feb 2022 19:35:31 -0300
Subject: [PATCH] Fix auth-sources defcustom

* lisp/auth-source.el (auth-sources): The extra attributes should be
in a plist, so inline both :host and :port.  Also, give a valid
default value for the choice.  (Bug#54127)
---
 lisp/auth-source.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/auth-source.el b/lisp/auth-source.el
index 8a425cf9bc..cb528cebdc 100644
--- a/lisp/auth-source.el
+++ b/lisp/auth-source.el
@@ -280,15 +280,16 @@ auth-sources
                                          (const :tag "default" default))))
                         (repeat :tag "Extra Parameters" :inline t
                                 (choice :tag "Extra parameter"
+                                        :value (:host t)
                                         (list
-                                         :tag "Host"
+                                         :tag "Host" :inline t
                                          (const :format "" :value :host)
                                          (choice :tag "Host (machine) choice"
                                                  (const :tag "Any" t)
                                                  (regexp
                                                   :tag "Regular expression")))
                                         (list
-                                         :tag "Protocol"
+                                         :tag "Protocol" :inline t
                                          (const :format "" :value :port)
                                          (choice
                                           :tag "Protocol"
-- 
2.17.1


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

* bug#54127: 29.0.50; auth-sources defcustom bug
  2022-02-23 14:49 ` Mauro Aranda
@ 2022-02-23 20:05   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2022-02-23 20:05 UTC (permalink / raw)
  To: Mauro Aranda; +Cc: 54127

Mauro Aranda <maurooaranda@gmail.com> writes:

> * lisp/auth-source.el (auth-sources): The extra attributes should be
> in a plist, so inline both :host and :port.  Also, give a valid
> default value for the choice.  (Bug#54127)

Makes sense to me; pushed to Emacs 29.

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





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

end of thread, other threads:[~2022-02-23 20:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-23 14:45 bug#54127: 29.0.50; auth-sources defcustom bug Mauro Aranda
2022-02-23 14:49 ` Mauro Aranda
2022-02-23 20:05   ` Lars Ingebrigtsen

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

	https://git.savannah.gnu.org/cgit/emacs.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).