all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Help with GNUS?
@ 2024-08-31 19:39 Dom (shymega) Rodriguez
  2024-08-31 21:45 ` James Thomas
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Dom (shymega) Rodriguez @ 2024-08-31 19:39 UTC (permalink / raw)
  To: help-gnu-emacs


[-- Attachment #1.1: Type: text/plain, Size: 1510 bytes --]

Hello!

I've recently gotten back into Emacs, and by extension, GNUS.

I repurposed an old config from a few years ago, but GNUS doesn't appear to
'like' it.

I get the following error in `*Messages*`:

> Warning: Opening nnimap server on rnet...failed: ; Unable to open server
> nnimap+rnet due to: Wrong type argument: stringp, ("rnet" "localhost");
> Opening nnimap server on dev...failed: ; Unable to open server nnimap+dev due
> to: Wrong type argument: stringp, ("dev" "localhost"); Opening nnimap server
> on personal...failed: ; Unable to open server nnimap+personal due to: Wrong
> type argument: stringp, ("personal" "localhost"); Opening nntp server on
> leafnode...failed: ; Server nntp+leafnode previously determined to be down;
> not retrying; Opening nntp server on leafnode...failed: ; Server
> nntp+leafnode previously determined to be down; not retrying; Unable to open
> server nntp+leafnode due to: Wrong type argument: stringp, ("localhost"
> "leafnode")

I think there's been a change in how GNUS parses the select method since I last
used it.

I should explain that I have three IMAP accounts (attached is the GNUS elisp
source) that connect to `localhost:143`, and a NNTP select method (Leafnode)
that connect to `localhost:119`.

In theory - this should work. But I haven't used GNUS/Emacs for so long, that I
am a bit rusty.

Could someone point me in the right direction?

Thank you.

Best wishes,
--
Dom Rodriguez
GPG Fingerprint: EB0D 45E6 D0DC 1BA1 A2B5  FC24 72DC F123 1E54 BD43

[-- Attachment #1.2: shy-gnus.el --]
[-- Type: text/plain, Size: 2982 bytes --]

;;; gnus.el --- GNUS configuration for Emacs
;;; commentary:
;;; code:

(setq gnus-save-newsrc-file nil
      gnus-read-newsrc-file t)

(setq gnus-select-method '(nnnil nil))

(setq gnus-secondary-select-methods
  '(
    (nnimap "personal"
            (nnimap-address "localhost")
            (nnimap-user "Dominic.Rodriguez@rodriguez.rog.uk")
            (nnimap-stream plain))
    (nnimap "dev"
            (nnimap-stream plain)
            (nnimap-address "localhost")
            (nnimap-user "shymega@shymega.org.uk"))
    (nntp "laefnode"
          (nntp-port-number 1119)
          (nntp-address "localhost"))
    (nnimap "rnet"
            (nnimap-stream plain)
            (nnimap-user "rnet@rodriguez.org.uk")
            (nnimap-address "localhost"))))

(setq mm-text-html-renderer 'w3m)

(setq gnus-use-cache t)

(defun get-sig-from-mutt (acc)
  "Return account's signature specifed by ACC in $HOME/.mutt/accounts/%s.sig."
  (with-temp-buffer
    (insert-file-contents
     (expand-file-name (format "%s/.config/neomutt/conf.d/accounts.d//%s.sig"
                               (getenv "HOME") acc)))
    (buffer-string)))

(setq gnus-posting-styles
  '(("dominic.rodriguez@rodriguez.org.uk"
     (signature (get-sig-from-mutt "dominic.rodriguez@rodriguez.org.uk"))
     (name "Dom Rodriguez")
     (address "dominic.rodriguez@rodriguez.org.uk"))
    ("rnet@rodriguez.org.uk"
     (signature (get-sig-from-mutt "rnet@rodriguez.org.uk"))
     (name "RNET Administrators")
     (address "rnet@rodriguez.org.uk"))
    ("shymega@shymega.org.uk"
     (signature (get-sig-from-mutt "shymega@shymega.org.uk"))
     (name "Dom Rodriguez")
     (address "shymega@shymega.org.uk"))
    ("nntp-oss"
     (signature (get-sig-from-mutt "shymega@shymega.org.uk"))
     (name "Dom Rodriguez")
     (address "shymega@shymega.org.uk"))))

(setq mm-discouraged-alternatives '("text/html" "text/richtext"))

(setq gnus-read-active-file 'some)

(setq gnus-summary-thread-gathering-function 'gnus-gather-threads-by-subject)

(setq gnus-thread-hide-subtree t)
(setq gnus-thread-ignore-subject t)

(setq gnus-use-correct-string-widths nil)

(setq gnus-thread-sort-functions
  '((not gnus-thread-sort-by-date)
    (not gnus-thread-sort-by-number)))

;;; send emails with msmtp-enqueue
;;; I've set up a script to perform checks on the queue and deal with them as needed, depending on connectivity.

(setq message-send-mail-function 'message-send-mail-with-sendmail
      mail-specify-envelope-from t
      message-sendmail-f-is-evil nil
      mail-envelope-from 'header
      message-sendmail-envelope-from 'header)

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

(setq gnus-topic-topology '(("Gnus" visible)
                              (("dominic.rodriguez@rodriguez.org.uk" visible nil nil))
                              (("shymega@shymega.org.uk" visible nil nil))
                              (("rnet@rodriguez.org.uk" visible nil nil))))

(provide 'shy-gnus)
;;; gnus.el ends here

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Help with GNUS?
  2024-08-31 19:39 Help with GNUS? Dom (shymega) Rodriguez
@ 2024-08-31 21:45 ` James Thomas
  2024-09-01 10:32   ` Dom RODRIGUEZ
  2024-08-31 21:54 ` Stefan Monnier via Users list for the GNU Emacs text editor
  2024-09-01 22:18 ` Dom Rodriguez
  2 siblings, 1 reply; 10+ messages in thread
From: James Thomas @ 2024-08-31 21:45 UTC (permalink / raw)
  To: help-gnu-emacs

Dom (shymega) Rodriguez wrote:

>> Warning: Opening nnimap server on rnet...failed: ; Unable to open
>> server
>> nnimap+rnet due to: Wrong type argument: stringp, ("rnet"
>> "localhost");

> I should explain that I have three IMAP accounts (attached is the GNUS
> elisp
> source) that connect to `localhost:143`, and a NNTP select method
> (Leafnode)
> that connect to `localhost:119`.

It seems to me that .authinfo is not zeroing in on one credential. You
must be using the same file, no?

Or maybe the wrong port is tried. (info "(gnus) Customizing the IMAP
Connection") seems to default to 'undecided' rather than 'network'.

--



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Help with GNUS?
  2024-08-31 19:39 Help with GNUS? Dom (shymega) Rodriguez
  2024-08-31 21:45 ` James Thomas
@ 2024-08-31 21:54 ` Stefan Monnier via Users list for the GNU Emacs text editor
  2024-09-01 10:32   ` Dom RODRIGUEZ
  2024-09-01 22:18 ` Dom Rodriguez
  2 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2024-08-31 21:54 UTC (permalink / raw)
  To: help-gnu-emacs

>> Warning: Opening nnimap server on rnet...failed: ; Unable to open server
>> nnimap+rnet due to: Wrong type argument: stringp, ("rnet" "localhost");
>> Opening nnimap server on dev...failed: ; Unable to open server nnimap+dev due
>> to: Wrong type argument: stringp, ("dev" "localhost"); Opening nnimap server
>> on personal...failed: ; Unable to open server nnimap+personal due to: Wrong
>> type argument: stringp, ("personal" "localhost");

Hmm.. don't know where these come from, sorry (the settings you show
seems sufficiently close to the ones I use).

>> Opening nntp server on
>> leafnode...failed: ; Server nntp+leafnode previously determined to be down;
>> not retrying; Opening nntp server on leafnode...failed: ; Server
>> nntp+leafnode previously determined to be down; not retrying; Unable to open
>> server nntp+leafnode due to: Wrong type argument: stringp, ("localhost"
>> "leafnode")

But this look odd: the string "leafnode" does not appear in the config
file you attached (it's typo'd to "laefnode" and it uses the port 1119
instead of 119).
Are you sure you attached the right config file?


        Stefan




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Help with GNUS?
  2024-08-31 21:54 ` Stefan Monnier via Users list for the GNU Emacs text editor
@ 2024-09-01 10:32   ` Dom RODRIGUEZ
  0 siblings, 0 replies; 10+ messages in thread
From: Dom RODRIGUEZ @ 2024-09-01 10:32 UTC (permalink / raw)
  To: help-gnu-emacs

Hi Stefan,

On 31/08/2024 22:54, Stefan Monnier via Users list for the GNU Emacs 
text editor wrote:
>>> Warning: Opening nnimap server on rnet...failed: ; Unable to open server
>>> nnimap+rnet due to: Wrong type argument: stringp, ("rnet" "localhost");
>>> Opening nnimap server on dev...failed: ; Unable to open server nnimap+dev due
>>> to: Wrong type argument: stringp, ("dev" "localhost"); Opening nnimap server
>>> on personal...failed: ; Unable to open server nnimap+personal due to: Wrong
>>> type argument: stringp, ("personal" "localhost");
> 
> Hmm.. don't know where these come from, sorry (the settings you show
> seems sufficiently close to the ones I use).

Yeah, looking at the manual, I think it's correct as well. It's biarre.

Would you be able to share your config?

> 
>>> Opening nntp server on
>>> leafnode...failed: ; Server nntp+leafnode previously determined to be down;
>>> not retrying; Opening nntp server on leafnode...failed: ; Server
>>> nntp+leafnode previously determined to be down; not retrying; Unable to open
>>> server nntp+leafnode due to: Wrong type argument: stringp, ("localhost"
>>> "leafnode")
> 
> But this look odd: the string "leafnode" does not appear in the config
> file you attached (it's typo'd to "laefnode" and it uses the port 1119
> instead of 119).
> Are you sure you attached the right config file?


It was a typo - good catch! I host Leafnode on port 1119, so it can run 
under my user. That's the next thing on my list..

I corrected the typo, with no luck.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Help with GNUS?
  2024-08-31 21:45 ` James Thomas
@ 2024-09-01 10:32   ` Dom RODRIGUEZ
  2024-09-01 21:54     ` James Thomas
  0 siblings, 1 reply; 10+ messages in thread
From: Dom RODRIGUEZ @ 2024-09-01 10:32 UTC (permalink / raw)
  To: help-gnu-emacs

Hi James,

On 31/08/2024 22:45, James Thomas wrote:
> Dom (shymega) Rodriguez wrote:
> 
>>> Warning: Opening nnimap server on rnet...failed: ; Unable to open
>>> server
>>> nnimap+rnet due to: Wrong type argument: stringp, ("rnet"
>>> "localhost");
> 
>> I should explain that I have three IMAP accounts (attached is the GNUS
>> elisp
>> source) that connect to `localhost:143`, and a NNTP select method
>> (Leafnode)
>> that connect to `localhost:119`.
> 
> It seems to me that .authinfo is not zeroing in on one credential. You
> must be using the same file, no?
> 
> Or maybe the wrong port is tried. (info "(gnus) Customizing the IMAP
> Connection") seems to default to 'undecided' rather than 'network'.
> 
> --
> 
> 

I use `~/.authinfo.gpg`, which has three entries, all with the same 
hostname. The funny thing is, this setup did work some years back.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Help with GNUS?
  2024-09-01 10:32   ` Dom RODRIGUEZ
@ 2024-09-01 21:54     ` James Thomas
  2024-09-01 22:58       ` Dom Rodriguez
  0 siblings, 1 reply; 10+ messages in thread
From: James Thomas @ 2024-09-01 21:54 UTC (permalink / raw)
  To: help-gnu-emacs

Dom RODRIGUEZ wrote:

> Hi James,

> I use `~/.authinfo.gpg`, which has three entries, all with the same
> hostname. The funny thing is, this setup did work some years back.

Did you fiddle with authentication in the meantime, even for any other
package? I'm asking because (info "(auth) Secret Service API") has
provisions for returning multiple matches, and from the error it's seems
like there're duplicate 'host's.

Do M-x toggle-debug-on-error and post your backtrace; along with the
authinfo file(s) if possible (w/o secrets, of course). Btw also try with
"127.0.0.1" instead of "localhost" (after modifying auth appropriately).

--



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Help with GNUS?
  2024-08-31 19:39 Help with GNUS? Dom (shymega) Rodriguez
  2024-08-31 21:45 ` James Thomas
  2024-08-31 21:54 ` Stefan Monnier via Users list for the GNU Emacs text editor
@ 2024-09-01 22:18 ` Dom Rodriguez
  2 siblings, 0 replies; 10+ messages in thread
From: Dom Rodriguez @ 2024-09-01 22:18 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all,

Fixed it!

There were a few issues. One was that I was passing a list to
`gnus-select-method`.

But the big issue was `auth-source`, which for some reason was
interfering with Gnus. So I specifed the dummy password for my local
IMAP server in `mail-sources`, and bypassed `auth-source. Seemed to
work.

The last thing I need to sort out is drafts. I don't want to store them
in `$HOME`. Does anyone know how to do that?

Got lots more tweaking to do, but ultimately, I'm back!

Best wishes,
--
Dom Rodriguez
GPG Fingerprint: EB0D 45E6 D0DC 1BA1 A2B5  FC24 72DC F123 1E54 BD43




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Help with GNUS?
  2024-09-01 21:54     ` James Thomas
@ 2024-09-01 22:58       ` Dom Rodriguez
  2024-09-03  2:23         ` James Thomas
  0 siblings, 1 reply; 10+ messages in thread
From: Dom Rodriguez @ 2024-09-01 22:58 UTC (permalink / raw)
  To: help-gnu-emacs

James Thomas <jimjoe@gmx.net> writes:

> Dom RODRIGUEZ wrote:
>
>> [ .. snip ..  ]
>
>> I use `~/.authinfo.gpg`, which has three entries, all with the same
>> hostname. The funny thing is, this setup did work some years back.
>
> Did you fiddle with authentication in the meantime, even for any other
> package? I'm asking because (info "(auth) Secret Service API") has
> provisions for returning multiple matches, and from the error it's seems
> like there're duplicate 'host's.

I think the issue was the 1Password package that hooked into
`auth-source`, and I don't think it worked very well. I've now disabled it.

> Do M-x toggle-debug-on-error and post your backtrace; along with the
> authinfo file(s) if possible (w/o secrets, of course). Btw also try with
> "127.0.0.1" instead of "localhost" (after
> modifying auth appropriately).

 I only just saw your email, but this seems to be resolved now. I did
try debugging GNUS, but it didn't produce a backtrace - just an entry in
`*Messages*`.

The working configuration is here[0]

I just need to figure out how to store drafts per-account, including
NNTP on an IMAP folder.

Other than that, all good! Thank you.

[0]: https://git.sr.ht/~shymega/nixfigs-doom-emacs

Best wishes,
--
Dom Rodriguez
GPG Fingerprint: EB0D 45E6 D0DC 1BA1 A2B5  FC24 72DC F123 1E54 BD43




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Help with GNUS?
  2024-09-01 22:58       ` Dom Rodriguez
@ 2024-09-03  2:23         ` James Thomas
  2024-09-04  2:00           ` James Thomas
  0 siblings, 1 reply; 10+ messages in thread
From: James Thomas @ 2024-09-03  2:23 UTC (permalink / raw)
  To: help-gnu-emacs

Dom Rodriguez wrote:

> I just need to figure out how to store drafts per-account, including
> NNTP on an IMAP folder.

One way I've done it (in the past):

- Create group directory, say 'altdrafts', in ~/News/drafts/
- G m altdrafts RET nndraft RET
- G p on nndraft:drafts and copy to the corresponding in the new folder.
- Update local variables (IIRC, default-directory buffer-file-name
  buffer-auto-save-file-name) in gnus-draft-setup-hook depending on when
  it is wanted.

I hadn't synced it to IMAP, but you should be able to do
gnus-move-article- after the above.

Regards,
James



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Help with GNUS?
  2024-09-03  2:23         ` James Thomas
@ 2024-09-04  2:00           ` James Thomas
  0 siblings, 0 replies; 10+ messages in thread
From: James Thomas @ 2024-09-04  2:00 UTC (permalink / raw)
  To: help-gnu-emacs

James Thomas wrote:

> Dom Rodriguez wrote:
>
>> I just need to figure out how to store drafts per-account, including
>> NNTP on an IMAP folder.
>
> One way I've done it (in the past):
>
> - Create group directory, say 'altdrafts', in ~/News/drafts/
> - G m altdrafts RET nndraft RET
> - G p on nndraft:drafts and copy to the corresponding in the new folder.
> - Update local variables (IIRC, default-directory buffer-file-name
>   buffer-auto-save-file-name) in gnus-draft-setup-hook depending on when
>   it is wanted.

Btw that should be possible with something like:
(nndraft-request-associate-buffer "altdrafts")
as in 'message-set-auto-save-file-name', but I haven't tried.

>
> I hadn't synced it to IMAP, but you should be able to do
> gnus-move-article- after the above.

--



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-09-04  2:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-31 19:39 Help with GNUS? Dom (shymega) Rodriguez
2024-08-31 21:45 ` James Thomas
2024-09-01 10:32   ` Dom RODRIGUEZ
2024-09-01 21:54     ` James Thomas
2024-09-01 22:58       ` Dom Rodriguez
2024-09-03  2:23         ` James Thomas
2024-09-04  2:00           ` James Thomas
2024-08-31 21:54 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-09-01 10:32   ` Dom RODRIGUEZ
2024-09-01 22:18 ` Dom Rodriguez

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.