* [Q] Programmatically remembering the backend to post with ?
@ 2015-11-19 10:49 Didier Verna
2016-02-06 7:07 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Didier Verna @ 2015-11-19 10:49 UTC (permalink / raw)
To: Gnus Beta Testers
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Q] Programmatically remembering the backend to post with ?
2015-11-19 10:49 [Q] Programmatically remembering the backend to post with ? Didier Verna
@ 2016-02-06 7:07 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-06 7:07 UTC (permalink / raw)
To: Gnus Beta Testers
Didier Verna <didier@xemacs.org> writes:
> 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)))
Do you include the full Gnus group name in your function? I think
that's all that Gnus does...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-06 7:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-19 10:49 [Q] Programmatically remembering the backend to post with ? Didier Verna
2016-02-06 7:07 ` Lars Ingebrigtsen
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).