Gnus development mailing list
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: Stephen Berman <stephen.berman@gmx.net>
Cc: Colin Baxter <m43cap@yandex.com>,  ding@gnus.org
Subject: Re: gnus-extra-headers
Date: Mon, 06 Sep 2021 11:40:00 -0700	[thread overview]
Message-ID: <877dftim4f.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <87zgsppquh.fsf@rub.de> (Stephen Berman's message of "Mon, 06 Sep 2021 19:16:06 +0200")


On 09/06/21 19:16 PM, Stephen Berman wrote:
> On Mon, 06 Sep 2021 09:15:24 -0700 Eric Abrahamsen <eric@ericabrahamsen.net> wrote:
>
>> Colin Baxter <m43cap@yandex.com> writes:
>>
>>> 1.  Remove all ~/.gnus.el and related files from system.
>>> 2.  emacs-28.0.50 -Q <RET>
>>> 3.  C-h load-history <RET>
>>> 4.  Search for loaded gnus libraries.
>>> 5.  2 matches for "gnus" in buffer: *Help*
>>>     3994:  (defun . gnus-batch-kill)
>>>     3995:  (defun . gnus-set-sorted-intersection)
>>>     No nndiary loaded.
>>> 6.  C-h gnus-extra-headers <RET>
>>> 7.  (X-Diary-Time-Zone X-Diary-Dow X-Diary-Year X-Diary-Month X-Diary-Dom
>>>     X-Diary-Hour X-Diary-Minute To Cc Keywords Gcc Newsgroups X-GM-LABELS)
>>>     Original value was
>>>     (To Cc Keywords Gcc Newsgroups X-GM-LABELS)
>>> 8.  C-h load-history <RET>
>>> 9.  Search for loaded gnus libraries.
>>> 10. 4874 matches in 3654 lines for "gnus" in buffer: *Help*
>>>     94 matches in 65 lines for "nndiary" in buffer: *Help*
>>>
>>>
>>> It appears that finding the value of gnus-extra-headers by means of C-h
>>> loads various gnus and nndiary libraries. We cannot find the "original
>>> value" of gnus-extra-headers because we cannot avoid loading nndiary
>>> libraries.
>>>
>>> Is this expected?
>>
>> No, none of that is expected, and it's not what I see here. Doing C-h v
>> gnus-extra-headers does load a bunch of Gnus files, but not nndiary, and
>> the value of the option doesn't change.
>
> I can reproduce what Colin reports.  When I start Emacs from master with
> -Q and do `C-h v gnus-extra-headers', the value includes the X-Diary-*
> headers.
>
>> And the fact that putting a call to (error) (actually, it should have
>> been called with a string argument, but the effect is the same) in
>> nndiary.el doesn't actually raise an error and give you a traceback
>> means that you're not loading that file at all.
>
> But here I do get an error by inserting `(error "nndiary loaded")' at
> the end of nndiary.el, and with debug-on-error enabled, I get the
> attached backtrace, which indicates that the file is loaded as a
> consequence of `describe-variable' invoking completion on elisp library
> prefixes.
>
> Steve Berman
>
> Debugger entered--Lisp error: (error "nndiary loaded")
>   signal(error ("nndiary loaded"))
>   error("nndiary loaded")
>   eval-buffer(#<buffer  *load*-113627> nil "/home/steve/src/emacs/emacs-master/lisp/gnus/nndia..." nil t)  ; Reading at buffer position 55496
>   load-with-code-conversion("/home/steve/src/emacs/emacs-master/lisp/gnus/nndia..." "/home/steve/src/emacs/emacs-master/lisp/gnus/nndia..." nil t)
>   require(nndiary)
>   eval-buffer(#<buffer  *load*> nil "/home/steve/src/emacs/emacs-master/lisp/gnus/gnus-..." nil t)  ; Reading at buffer position 1207
>   load-with-code-conversion("/home/steve/src/emacs/emacs-master/lisp/gnus/gnus-..." "/home/steve/src/emacs/emacs-master/lisp/gnus/gnus-..." t t)
>   load("gnus-diary" noerror nomessage)
>   help--load-prefixes((("gnus-" "nnselect" "nnheader" "gnus-win" "gnus-vm" "gnus-uu" "gnus-util" "gnus-undo" "gnus-topic" "gnus-sum" "gnus-start" "gnus-srvr" "gnus-spec" "gnus-score" "gnus-salt" "gnus-registry" "gnus-range" "gnus-msg" "gnus-mh" "gnus-logic" "gnus-kill" "gnus-int" "gnus-html" "gnus-group" "gnus-fun" "gnus-dup" "gnus-draft" "gnus-diary" "gnus-demon" "gnus-cus" "gnus-cite" "gnus-cache" "gnus-async" "gnus-art" "gnus-agent" "gnus" "deuglify")))
>   help--symbol-completion-table("gnus-extra-" #f(compiled-function (vv) #<bytecode 0x5932c117145b3a>) metadata)
>   completion-metadata("gnus-extra-" help--symbol-completion-table #f(compiled-function (vv) #<bytecode 0x5932c117145b3a>))
>   completion--field-metadata(20)
>   completion--do-completion(20 31)
>   completion--in-region-1(20 31)
>   #f(compiled-function (start end collection predicate) #<bytecode 0x8376d053da1c3d0>)(20 31 help--symbol-completion-table #f(compiled-function (vv) #<bytecode 0x5932c117145b3a>))
>   apply(#f(compiled-function (start end collection predicate) #<bytecode 0x8376d053da1c3d0>) (20 31 help--symbol-completion-table #f(compiled-function (vv) #<bytecode 0x5932c117145b3a>)))
>   #f(compiled-function (funs global args) #<bytecode -0x731a92f7266cda2>)(nil nil (20 31 help--symbol-completion-table #f(compiled-function (vv) #<bytecode 0x5932c117145b3a>)))
>   completion--in-region(20 31 help--symbol-completion-table #f(compiled-function (vv) #<bytecode 0x5932c117145b3a>))
>   completion-in-region(20 31 help--symbol-completion-table #f(compiled-function (vv) #<bytecode 0x5932c117145b3a>))
>   minibuffer-complete()

Awesome, this was the information we needed, thanks. I did forget that
`debug-on-error' was necessary to get the backtrace, sorry.

So I wasn't seeing the behavior because I hadn't use completion in "C-h
v". Simply completing on a gnus-prefixed symbol definitely shouldn't end
up changing the value of a variable, so I'll push something to fix this
in a bit.

Sorry this took so long to figure out!

Eric


  reply	other threads:[~2021-09-06 18:40 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-01  8:15 gnus-extra-headers Colin Baxter
2021-09-02 22:12 ` gnus-extra-headers Eric Abrahamsen
2021-09-03  5:42   ` gnus-extra-headers Colin Baxter
2021-09-03 18:30     ` gnus-extra-headers Eric Abrahamsen
2021-09-04 14:39       ` gnus-extra-headers Colin Baxter
2021-09-04 15:15         ` gnus-extra-headers Eric Abrahamsen
2021-09-05  8:36           ` gnus-extra-headers Colin Baxter
2021-09-06  3:31             ` gnus-extra-headers Eric Abrahamsen
2021-09-06  7:14               ` gnus-extra-headers Colin Baxter
2021-09-06  8:37                 ` gnus-extra-headers Colin Baxter
2021-09-06 16:15                   ` gnus-extra-headers Eric Abrahamsen
2021-09-06 16:29                     ` gnus-extra-headers Colin Baxter
2021-09-06 17:39                       ` gnus-extra-headers Eric Abrahamsen
2021-09-06 19:33                         ` gnus-extra-headers Colin Baxter
2021-09-06 17:16                     ` gnus-extra-headers Stephen Berman
2021-09-06 18:40                       ` Eric Abrahamsen [this message]
2021-09-07  5:53                         ` gnus-extra-headers Colin Baxter
2021-09-07 18:56                           ` gnus-extra-headers Eric Abrahamsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877dftim4f.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=ding@gnus.org \
    --cc=m43cap@yandex.com \
    --cc=stephen.berman@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).