Gnus development mailing list
 help / color / mirror / Atom feed
From: Didier Verna <didier@xemacs.org>
To: Gnus Beta Testers <ding@gnus.org>
Subject: [Q] Programmatically remembering the backend to post with ?
Date: Thu, 19 Nov 2015 11:49:14 +0100	[thread overview]
Message-ID: <m1bnaq2rit.fsf@xemacs.org> (raw)


  Hi,

when I C-u a on a group, Gnus somehow remembers which backend to post
with when I have several (secondary) select methods.

When I programmatically post, however, it doesn't so I must be missing
something. Here's a skeleton of a posting function that I use.

(defmacro* post-message
    ((group subject message &optional (to-group group)) &body body)
  ;; Post a Gnus MESSAGE about SUBJECT, from GROUP.
  ;; Destination group will be the same unless TO-GROUP is provided.
  ;; Execute BODY in the message buffer.

  ;; #### WARNING: SAVE-EXCURSION is important to avoid local-variable value
  ;; leaking. See some similar tricks in gnus-group-mail and such. I can't
  ;; remember the exact problem though.
  `(save-excursion
     (let ((gnus-newsgroup-name ,group)
	   gnus-article-copy)
       (gnus-post-news 'post ,to-group)
       (gmm-fill ,subject ,message)
       ,@body)))


Any help appreciated, thanks !

-- 
My new Jazz CD entitled "Roots and Leaves" is out!
Check it out: http://didierverna.com/records/roots-and-leaves.php

Lisp, Jazz, Aïkido: http://www.didierverna.info



             reply	other threads:[~2015-11-19 10:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-19 10:49 Didier Verna [this message]
2016-02-06  7:07 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1bnaq2rit.fsf@xemacs.org \
    --to=didier@xemacs.org \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).