From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/86730 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.gnus.general Subject: Re: [Q] Programmatically remembering the backend to post with ? Date: Sat, 06 Feb 2016 18:07:28 +1100 Message-ID: <871t8qnwpb.fsf@gnus.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1454742514 20782 80.91.229.3 (6 Feb 2016 07:08:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Feb 2016 07:08:34 +0000 (UTC) To: Gnus Beta Testers Original-X-From: ding-owner+M34956@lists.math.uh.edu Sat Feb 06 08:08:21 2016 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from lists1.math.uh.edu ([129.7.128.208]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aRwyi-00054E-Ro for ding-account@gmane.org; Sat, 06 Feb 2016 08:08:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.85) (envelope-from ) id 1aRwyR-0003Vh-ES; Sat, 06 Feb 2016 01:08:03 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.85) (envelope-from ) id 1aRwyN-0003V2-Rh for ding@lists.math.uh.edu; Sat, 06 Feb 2016 01:07:59 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85) (envelope-from ) id 1aRwyM-0003BF-QG for ding@lists.math.uh.edu; Sat, 06 Feb 2016 01:07:59 -0600 Original-Received: from hermes.netfonds.no ([80.91.224.195]) by quimby.gnus.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1aRwyL-0004Fr-Dm for ding@gnus.org; Sat, 06 Feb 2016 08:07:57 +0100 Original-Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aRwxw-0007xi-K3 for ding@gnus.org; Sat, 06 Feb 2016 08:07:33 +0100 In-Reply-To: (Didier Verna's message of "Thu, 19 Nov 2015 11:49:14 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.90 (gnu/linux) X-MailScanner-ID: 1aRwxw-0007xi-K3 MailScanner-NULL-Check: 1455347255.59705@rYodZWgOEAPMIuhb6ciyIg X-Spam-Status: No X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:86730 Archived-At: Didier Verna 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