* bug#33665: 27.0.50; Variables not set up in Gnus when hooks are run
@ 2018-12-07 16:37 Lars Ingebrigtsen
2018-12-07 17:25 ` Eric Abrahamsen
0 siblings, 1 reply; 11+ messages in thread
From: Lars Ingebrigtsen @ 2018-12-07 16:37 UTC (permalink / raw)
To: 33665; +Cc: Eric Abrahamsen
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#33665: 27.0.50; Variables not set up in Gnus when hooks are run
2018-12-07 16:37 bug#33665: 27.0.50; Variables not set up in Gnus when hooks are run Lars Ingebrigtsen
@ 2018-12-07 17:25 ` Eric Abrahamsen
2018-12-07 17:52 ` Eric Abrahamsen
2018-12-07 18:04 ` Lars Ingebrigtsen
0 siblings, 2 replies; 11+ messages in thread
From: Eric Abrahamsen @ 2018-12-07 17:25 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 33665
Lars Ingebrigtsen <larsi@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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#33665: 27.0.50; Variables not set up in Gnus when hooks are run
2018-12-07 17:25 ` Eric Abrahamsen
@ 2018-12-07 17:52 ` Eric Abrahamsen
2018-12-07 18:04 ` Lars Ingebrigtsen
1 sibling, 0 replies; 11+ messages in thread
From: Eric Abrahamsen @ 2018-12-07 17:52 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 33665
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
> Lars Ingebrigtsen <larsi@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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#33665: 27.0.50; Variables not set up in Gnus when hooks are run
2018-12-07 17:25 ` Eric Abrahamsen
2018-12-07 17:52 ` Eric Abrahamsen
@ 2018-12-07 18:04 ` Lars Ingebrigtsen
2018-12-07 18:36 ` Eric Abrahamsen
1 sibling, 1 reply; 11+ messages in thread
From: Lars Ingebrigtsen @ 2018-12-07 18:04 UTC (permalink / raw)
To: Eric Abrahamsen; +Cc: 33665
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
> Lars Ingebrigtsen <larsi@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
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#33665: 27.0.50; Variables not set up in Gnus when hooks are run
2018-12-07 18:04 ` Lars Ingebrigtsen
@ 2018-12-07 18:36 ` Eric Abrahamsen
2018-12-12 14:36 ` Lars Ingebrigtsen
0 siblings, 1 reply; 11+ messages in thread
From: Eric Abrahamsen @ 2018-12-07 18:36 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 33665
[-- Attachment #1: Type: text/plain, Size: 1026 bytes --]
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Lars Ingebrigtsen <larsi@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'.
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1581 bytes --]
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 4baf4bc826..58605826f6 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -3064,6 +3064,7 @@ gnus-summary-mode
(let ((gnus-summary-local-variables gnus-newsgroup-variables))
(gnus-summary-make-local-variables))
(gnus-summary-make-local-variables)
+ (setq gnus-newsgroup-name gnus-summary-mode-group)
(when (gnus-visual-p 'summary-menu 'menu)
(gnus-summary-make-menu-bar)
(gnus-summary-make-tool-bar))
@@ -3457,6 +3458,11 @@ gnus-summary-set-article-display-arrow
(point)
(current-buffer))))))
+(defvar gnus-summary-mode-group nil
+ "Variable for communication with `gnus-summary-mode'.
+Allows the `gnus-newsgroup-name' local variable to be set before
+the summary mode hooks are run.")
+
(defun gnus-summary-setup-buffer (group)
"Initialize summary buffer for GROUP.
This function does all setup work that relies on the specific
@@ -3476,10 +3482,11 @@ gnus-summary-setup-buffer
(not gnus-newsgroup-prepared))
(set-buffer (gnus-get-buffer-create buffer))
(setq gnus-summary-buffer (current-buffer))
- (gnus-summary-mode)
+ (let ((gnus-summary-mode-group group))
+ (gnus-summary-mode))
(when (gnus-group-quit-config group)
(set (make-local-variable 'gnus-single-article-buffer) nil))
- (setq gnus-newsgroup-name group)
+; (setq gnus-newsgroup-name group)
(turn-on-gnus-mailing-list-mode)
;; These functions don't currently depend on GROUP, but might in
;; the future.
^ permalink raw reply related [flat|nested] 11+ messages in thread
* bug#33665: 27.0.50; Variables not set up in Gnus when hooks are run
2018-12-07 18:36 ` Eric Abrahamsen
@ 2018-12-12 14:36 ` Lars Ingebrigtsen
2018-12-12 19:52 ` Eric Abrahamsen
0 siblings, 1 reply; 11+ messages in thread
From: Lars Ingebrigtsen @ 2018-12-12 14:36 UTC (permalink / raw)
To: Eric Abrahamsen; +Cc: 33665
Eric Abrahamsen <eric@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
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#33665: 27.0.50; Variables not set up in Gnus when hooks are run
2018-12-12 14:36 ` Lars Ingebrigtsen
@ 2018-12-12 19:52 ` Eric Abrahamsen
2018-12-19 21:57 ` Lars Ingebrigtsen
0 siblings, 1 reply; 11+ messages in thread
From: Eric Abrahamsen @ 2018-12-12 19:52 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 33665
On 12/12/18 15:36 PM, Lars Ingebrigtsen wrote:
> Eric Abrahamsen <eric@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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#33665: 27.0.50; Variables not set up in Gnus when hooks are run
2018-12-12 19:52 ` Eric Abrahamsen
@ 2018-12-19 21:57 ` Lars Ingebrigtsen
2018-12-19 22:14 ` Eric Abrahamsen
0 siblings, 1 reply; 11+ messages in thread
From: Lars Ingebrigtsen @ 2018-12-19 21:57 UTC (permalink / raw)
To: Eric Abrahamsen; +Cc: 33665
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
> On 12/12/18 15:36 PM, Lars Ingebrigtsen wrote:
>> Eric Abrahamsen <eric@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
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#33665: 27.0.50; Variables not set up in Gnus when hooks are run
2018-12-19 21:57 ` Lars Ingebrigtsen
@ 2018-12-19 22:14 ` Eric Abrahamsen
2018-12-19 22:17 ` Lars Ingebrigtsen
0 siblings, 1 reply; 11+ messages in thread
From: Eric Abrahamsen @ 2018-12-19 22:14 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 33665
On 12/19/18 22:57 PM, Lars Ingebrigtsen wrote:
> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> On 12/12/18 15:36 PM, Lars Ingebrigtsen wrote:
>>> Eric Abrahamsen <eric@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.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2018-12-19 22:30 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-07 16:37 bug#33665: 27.0.50; Variables not set up in Gnus when hooks are run Lars Ingebrigtsen
2018-12-07 17:25 ` Eric Abrahamsen
2018-12-07 17:52 ` Eric Abrahamsen
2018-12-07 18:04 ` Lars Ingebrigtsen
2018-12-07 18:36 ` Eric Abrahamsen
2018-12-12 14:36 ` Lars Ingebrigtsen
2018-12-12 19:52 ` Eric Abrahamsen
2018-12-19 21:57 ` Lars Ingebrigtsen
2018-12-19 22:14 ` Eric Abrahamsen
2018-12-19 22:17 ` Lars Ingebrigtsen
2018-12-19 22:30 ` 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).