0

I have a working Gnus setup for email on one machine. I am now trying to create slightly more modular setup on a second machine. When I start Gnus on the second machine, mail is read and the group buffer appears as I would expect, but if I try to enter a folder, I get the following error:

Buffer is read-only: #<buffer *Group*>

I assume this is somehow connected to the fact that I am trying to run Emacs and Gnus out of a non-standard directory (using Chemacs). Does anyone have any idea how to debug this? What variables should I have a look at?

1 Answer 1

1

I had an error in my new set up. The old setup had

(add-hook 'gnus-group-mode-hook 'gnus-topic-mode)

I tried to achieve the same thing via use-package's :hook with

(use-package 'gnus
 :config
 ... 
 :hook (gnus-group-mode gnus-topic-mode)) 

but I misunderstood the :hook syntax. Thus, I was incorrectly trying to add the two modes as hooks to gnus. D'oh.

So instead I just put

(add-hook 'gnus-group-mode-hook 'gnus-topic-mode))

in the :config block.

5
  • The use-package :hook syntax is indeed somewhat counter-intuitive and has been a source of problems on the Emacs SE in the past. Cave canem!
    – NickD
    Nov 18, 2022 at 17:29
  • How did you fix it? By going back to the explicit add-hook?
    – NickD
    Nov 18, 2022 at 17:30
  • Yes. I just put (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)) in the :config block.
    – loris
    Nov 21, 2022 at 7:14
  • 1
    Can you add that to the answer? It would make the answer complete, not depending on a comment (that might disappear).
    – NickD
    Nov 21, 2022 at 14:38
  • 1
    Thank you for editing the answer!
    – NickD
    Nov 21, 2022 at 16:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.