GNU bug report logs - #33665
27.0.50; Variables not set up in Gnus when hooks are run

Previous Next

Package: emacs;

Reported by: Lars Ingebrigtsen <larsi <at> gnus.org>

Date: Fri, 7 Dec 2018 16:38:02 UTC

Severity: normal

Found in version 27.0.50

Done: Eric Abrahamsen <eric <at> ericabrahamsen.net>

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 33665 in the body.
You can then email your comments to 33665 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#33665; Package emacs. (Fri, 07 Dec 2018 16:38:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lars Ingebrigtsen <larsi <at> gnus.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 07 Dec 2018 16:38:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: bug-gnu-emacs <at> gnu.org
Cc: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Subject: 27.0.50; Variables not set up in Gnus when hooks are run
Date: Fri, 07 Dec 2018 17:37:11 +0100
It looks like gnus-newsgroup-name (and friends?) are no longer set when
the summary mode hooks are run, so hooks that rely on that are now
broken.

It also looks like summary mode line highlights no longer works.

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-match("gnu.emacs.gnus\\|gmane.discuss\\|gnus.ding\\|gmane.te..." nil)
  (and gnus-moderated-groups (string-match gnus-moderated-groups gnus-newsgroup-name))
  (if (and gnus-moderated-groups (string-match gnus-moderated-groups gnus-newsgroup-name)) (progn (gnus-moderation-mode 1)))
  gnus-moderate()
  run-hooks(change-major-mode-after-body-hook special-mode-hook gnus-mode-hook gnus-summary-mode-hook)
  apply(run-hooks (change-major-mode-after-body-hook special-mode-hook gnus-mode-hook gnus-summary-mode-hook))
  run-mode-hooks(gnus-summary-mode-hook)
  gnus-summary-mode()
  gnus-summary-setup-buffer("nntp+news.gmane.org:gwene.com.bookofjoe")
  gnus-summary-read-group-1("nntp+news.gmane.org:gwene.com.bookofjoe" nil t nil nil nil)
  gnus-summary-read-group("nntp+news.gmane.org:gwene.com.bookofjoe" nil t nil nil nil nil)
  gnus-group-read-group(nil t)
  gnus-group-select-group(nil)
  gnus-topic-select-group(nil)
  funcall-interactively(gnus-topic-select-group nil)
  call-interactively(gnus-topic-select-group nil nil)
  command-execute(gnus-topic-select-group)



In GNU Emacs 27.0.50 (build 54, x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
 of 2018-12-07 built on stories
Repository revision: e4a8f6ebbf4e8cf4d87d5b7b9940b61b51073fd3
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.11902000
System Description: Debian GNU/Linux 9 (stretch)


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





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33665; Package emacs. (Fri, 07 Dec 2018 17:26:02 GMT) Full text and rfc822 format available.

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

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 33665 <at> debbugs.gnu.org
Subject: Re: bug#33665: 27.0.50;
 Variables not set up in Gnus when hooks are run
Date: Fri, 07 Dec 2018 09:25:21 -0800
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> It looks like gnus-newsgroup-name (and friends?) are no longer set when
> the summary mode hooks are run, so hooks that rely on that are now
> broken.

Yes, since `gnus-summary-mode' is now a real mode, it clears local
variables before running the hook. The right place for that sort of hook
is now `gnus-summary-prepared-hook'. I tried to change all the relevant
hooks I could within the codebase, but I guess gnus-mdrtn.el isn't
publicly available? I can change the Moderation section of the manual to
update the installation instructions.

> It also looks like summary mode line highlights no longer works.

I'll take a look now.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33665; Package emacs. (Fri, 07 Dec 2018 17:53:02 GMT) Full text and rfc822 format available.

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

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 33665 <at> debbugs.gnu.org
Subject: Re: bug#33665: 27.0.50;
 Variables not set up in Gnus when hooks are run
Date: Fri, 07 Dec 2018 09:52:03 -0800
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:

> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>
>> It looks like gnus-newsgroup-name (and friends?) are no longer set when
>> the summary mode hooks are run, so hooks that rely on that are now
>> broken.
>
> Yes, since `gnus-summary-mode' is now a real mode, it clears local
> variables before running the hook. The right place for that sort of hook
> is now `gnus-summary-prepared-hook'. I tried to change all the relevant
> hooks I could within the codebase, but I guess gnus-mdrtn.el isn't
> publicly available? I can change the Moderation section of the manual to
> update the installation instructions.
>
>> It also looks like summary mode line highlights no longer works.
>
> I'll take a look now.

Hang on, I'm not sure what you mean here. You don't mean the
read/unread/ticked/etc face properties on individual articles lines in
the Summary buffer, do you? I'm not sure what highlighting happens in
the Summary mode line.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33665; Package emacs. (Fri, 07 Dec 2018 18:05:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: 33665 <at> debbugs.gnu.org
Subject: Re: bug#33665: 27.0.50;
 Variables not set up in Gnus when hooks are run
Date: Fri, 07 Dec 2018 19:04:07 +0100
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:

> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>
>> It looks like gnus-newsgroup-name (and friends?) are no longer set when
>> the summary mode hooks are run, so hooks that rely on that are now
>> broken.
>
> Yes, since `gnus-summary-mode' is now a real mode, it clears local
> variables before running the hook. The right place for that sort of hook
> is now `gnus-summary-prepared-hook'. I tried to change all the relevant
> hooks I could within the codebase, but I guess gnus-mdrtn.el isn't
> publicly available? I can change the Moderation section of the manual to
> update the installation instructions.

No, you can't break third-party software that way.  You have to set the
variables the hooks expect to exist before calling the hook.

>> It also looks like summary mode line highlights no longer works.

I think that was a false alarm.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33665; Package emacs. (Fri, 07 Dec 2018 18:37:02 GMT) Full text and rfc822 format available.

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

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 33665 <at> debbugs.gnu.org
Subject: Re: bug#33665: 27.0.50;
 Variables not set up in Gnus when hooks are run
Date: Fri, 07 Dec 2018 10:36:18 -0800
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>
>> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>>
>>> It looks like gnus-newsgroup-name (and friends?) are no longer set when
>>> the summary mode hooks are run, so hooks that rely on that are now
>>> broken.
>>
>> Yes, since `gnus-summary-mode' is now a real mode, it clears local
>> variables before running the hook. The right place for that sort of hook
>> is now `gnus-summary-prepared-hook'. I tried to change all the relevant
>> hooks I could within the codebase, but I guess gnus-mdrtn.el isn't
>> publicly available? I can change the Moderation section of the manual to
>> update the installation instructions.
>
> No, you can't break third-party software that way.  You have to set the
> variables the hooks expect to exist before calling the hook.

Okay. This patch should restore that behavior. I don't see any other
buffer-local variables that were being set to a specific value, other
than `gnus-newsgroup-name'.


[patch.txt (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33665; Package emacs. (Wed, 12 Dec 2018 14:37:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: 33665 <at> debbugs.gnu.org
Subject: Re: bug#33665: 27.0.50;
 Variables not set up in Gnus when hooks are run
Date: Wed, 12 Dec 2018 15:36:35 +0100
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:

> Okay. This patch should restore that behavior. I don't see any other
> buffer-local variables that were being set to a specific value, other
> than `gnus-newsgroup-name'.

I think that looks OK, but I don't understand the:

-      (setq gnus-newsgroup-name group)
+;      (setq gnus-newsgroup-name group)


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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33665; Package emacs. (Wed, 12 Dec 2018 19:53:02 GMT) Full text and rfc822 format available.

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

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 33665 <at> debbugs.gnu.org
Subject: Re: bug#33665: 27.0.50;
 Variables not set up in Gnus when hooks are run
Date: Wed, 12 Dec 2018 11:52:47 -0800
On 12/12/18 15:36 PM, Lars Ingebrigtsen wrote:
> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>
>> Okay. This patch should restore that behavior. I don't see any other
>> buffer-local variables that were being set to a specific value, other
>> than `gnus-newsgroup-name'.
>
> I think that looks OK, but I don't understand the:
>
> -      (setq gnus-newsgroup-name group)
> +;      (setq gnus-newsgroup-name group)

That was just sort of a note to self -- if `gnus-newsgroup-name' is set
in `gnus-summary-mode' then it doesn't need to be set again in
`gnus-summary-setup-buffer'. But I was nervous I would break more stuff,
and couldn't bring myself to actually delete it.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33665; Package emacs. (Wed, 19 Dec 2018 21:59:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: 33665 <at> debbugs.gnu.org
Subject: Re: bug#33665: 27.0.50;
 Variables not set up in Gnus when hooks are run
Date: Wed, 19 Dec 2018 22:57:47 +0100
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:

> On 12/12/18 15:36 PM, Lars Ingebrigtsen wrote:
>> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>>
>>> Okay. This patch should restore that behavior. I don't see any other
>>> buffer-local variables that were being set to a specific value, other
>>> than `gnus-newsgroup-name'.
>>
>> I think that looks OK, but I don't understand the:
>>
>> -      (setq gnus-newsgroup-name group)
>> +;      (setq gnus-newsgroup-name group)
>
> That was just sort of a note to self -- if `gnus-newsgroup-name' is set
> in `gnus-summary-mode' then it doesn't need to be set again in
> `gnus-summary-setup-buffer'. But I was nervous I would break more stuff,
> and couldn't bring myself to actually delete it.

You haven't pushed the fixes yet?  Gnus is unusable for me on master as
it is.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33665; Package emacs. (Wed, 19 Dec 2018 22:15:02 GMT) Full text and rfc822 format available.

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

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 33665 <at> debbugs.gnu.org
Subject: Re: bug#33665: 27.0.50;
 Variables not set up in Gnus when hooks are run
Date: Wed, 19 Dec 2018 14:14:01 -0800
On 12/19/18 22:57 PM, Lars Ingebrigtsen wrote:
> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>
>> On 12/12/18 15:36 PM, Lars Ingebrigtsen wrote:
>>> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>>>
>>>> Okay. This patch should restore that behavior. I don't see any other
>>>> buffer-local variables that were being set to a specific value, other
>>>> than `gnus-newsgroup-name'.
>>>
>>> I think that looks OK, but I don't understand the:
>>>
>>> -      (setq gnus-newsgroup-name group)
>>> +;      (setq gnus-newsgroup-name group)
>>
>> That was just sort of a note to self -- if `gnus-newsgroup-name' is set
>> in `gnus-summary-mode' then it doesn't need to be set again in
>> `gnus-summary-setup-buffer'. But I was nervous I would break more stuff,
>> and couldn't bring myself to actually delete it.
>
> You haven't pushed the fixes yet?  Gnus is unusable for me on master as
> it is.

Done. If that solves the problem completely I'll close the bug report.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33665; Package emacs. (Wed, 19 Dec 2018 22:18:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: 33665 <at> debbugs.gnu.org
Subject: Re: bug#33665: 27.0.50;
 Variables not set up in Gnus when hooks are run
Date: Wed, 19 Dec 2018 23:17:18 +0100
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:

> Done. If that solves the problem completely I'll close the bug report.

Thanks; seems to work for me.

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




Reply sent to Eric Abrahamsen <eric <at> ericabrahamsen.net>:
You have taken responsibility. (Wed, 19 Dec 2018 22:31:02 GMT) Full text and rfc822 format available.

Notification sent to Lars Ingebrigtsen <larsi <at> gnus.org>:
bug acknowledged by developer. (Wed, 19 Dec 2018 22:31:02 GMT) Full text and rfc822 format available.

Message #37 received at 33665-done <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 33665-done <at> debbugs.gnu.org
Subject: Re: bug#33665: 27.0.50;
 Variables not set up in Gnus when hooks are run
Date: Wed, 19 Dec 2018 14:30:17 -0800
On 12/19/18 23:17 PM, Lars Ingebrigtsen wrote:
> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>
>> Done. If that solves the problem completely I'll close the bug report.
>
> Thanks; seems to work for me.

Cool.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 17 Jan 2019 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 94 days ago.

Previous Next


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