* Setting to-list group parameter automatically manually
@ 2025-07-05 12:31 Tim Landscheidt
0 siblings, 0 replies; only message in thread
From: Tim Landscheidt @ 2025-07-05 12:31 UTC (permalink / raw)
To: ding
Hi,
as having Gmane send mails on my behalf may fail and going
through relevant groups and setting the to-list group para-
meter manually prior to posting/replying collides with my
laziness, I have the following code (GPL3) in my ~/.emacs:
| (defcustom tl-check-to-list-setting-groups "gmane" "Regular expression to match on." :type 'regexp)
| (defun tl-check-to-list-setting nil
| (if (and
| (string-match tl-check-to-list-setting-groups gnus-newsgroup-name)
| (not (gnus-group-get-parameter gnus-newsgroup-name 'to-list)))
| (let
| ((list-post-in-article (with-current-buffer gnus-original-article-buffer
| (gnus-fetch-field "list-post"))))
| (if list-post-in-article
| (ignore-error minibuffer-quit
| (let ((new-to-list (replace-regexp-in-string "<mailto:\\([^>]*\\)>" "\\1" (read-string "to-list value: "
| list-post-in-article) t)))
| (gnus-group-set-parameter gnus-newsgroup-name 'to-list new-to-list)
| (gnus-mailing-list-mode 1)))))))
| (add-hook 'gnus-select-article-hook 'tl-check-to-list-setting)
This will prompt me, if I'm in a Gmane group, the to-list
group parameter is not set, and the selected article has a
"List-Post" header, with a suggested to-list setting and
either set it, or, if I quit with C-g, not set it. This
will trigger repeatedly for every article, which is fine for
me. (The "List-Post" header needs to be manually checked as
it can be Gmane-encrypted or refer to another mailing list
in case of crossposts.)
I intend to rewrite the code and put it into a package pri-
marily for my local use (I have grown fond of them), but on
the other hand, this may be interesting for all Gnus users,
perhaps with a default of disabled.
Any opinions?
Tim
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-07-08 18:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-05 12:31 Setting to-list group parameter automatically manually Tim Landscheidt
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).