* bug#50437: 28.0.50; describe-variable completion loads nndiary; changes variable value
@ 2021-09-06 19:13 Eric Abrahamsen
2021-09-07 15:29 ` Lars Ingebrigtsen
0 siblings, 1 reply; 3+ messages in thread
From: Eric Abrahamsen @ 2021-09-06 19:13 UTC (permalink / raw)
To: 50437
Running describe-variable on Gnus-related variables and then TAB
completing in the minibuffer runs `help--symbol-completion-table', which
loads all gnus libraries, including 'gnus-diary, which in turn requires
'nndiary, which alters the values of `gnus-extra-headers' and
`nnmail-extra-headers'. Leading to the weird reported behavior that
inspecting the value of `gnus-extra-headers' can alter the value of
`gnus-extra-headers'.
nndiary.el probably shouldn't alter variable values at load time; the
diff below is one possible solution.
1 file changed, 5 insertions(+), 6 deletions(-)
lisp/gnus/nndiary.el | 11 +++++------
modified lisp/gnus/nndiary.el
@@ -416,6 +416,11 @@ nndiary-retrieve-headers
(deffoo nndiary-open-server (server &optional defs)
(nnoo-change-server 'nndiary server defs)
+ (dolist (header nndiary-headers)
+ (setq header (intern (format "X-Diary-%s" (car header))))
+ ;; Required for building NOV databases and some other stuff.
+ (add-to-list 'gnus-extra-headers header)
+ (add-to-list 'nnmail-extra-headers header))
(when (not (file-exists-p nndiary-directory))
(ignore-errors (make-directory nndiary-directory t)))
(cond
@@ -1557,12 +1562,6 @@ nndiary-renew-article-p
;; The end... ===============================================================
-(dolist (header nndiary-headers)
- (setq header (intern (format "X-Diary-%s" (car header))))
- ;; Required for building NOV databases and some other stuff.
- (add-to-list 'gnus-extra-headers header)
- (add-to-list 'nnmail-extra-headers header))
-
(unless (assoc "nndiary" gnus-valid-select-methods)
(gnus-declare-backend "nndiary" 'post-mail 'respool 'address))
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#50437: 28.0.50; describe-variable completion loads nndiary; changes variable value
2021-09-06 19:13 bug#50437: 28.0.50; describe-variable completion loads nndiary; changes variable value Eric Abrahamsen
@ 2021-09-07 15:29 ` Lars Ingebrigtsen
2021-09-07 18:54 ` Eric Abrahamsen
0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-07 15:29 UTC (permalink / raw)
To: Eric Abrahamsen; +Cc: 50437
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
> nndiary.el probably shouldn't alter variable values at load time; the
> diff below is one possible solution.
Looks good to me.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#50437: 28.0.50; describe-variable completion loads nndiary; changes variable value
2021-09-07 15:29 ` Lars Ingebrigtsen
@ 2021-09-07 18:54 ` Eric Abrahamsen
0 siblings, 0 replies; 3+ messages in thread
From: Eric Abrahamsen @ 2021-09-07 18:54 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 50437-done
On 09/07/21 17:29 PM, Lars Ingebrigtsen wrote:
> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> nndiary.el probably shouldn't alter variable values at load time; the
>> diff below is one possible solution.
>
> Looks good to me.
Done, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-07 18:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-06 19:13 bug#50437: 28.0.50; describe-variable completion loads nndiary; changes variable value Eric Abrahamsen
2021-09-07 15:29 ` Lars Ingebrigtsen
2021-09-07 18:54 ` Eric Abrahamsen
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).