From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/83483 Path: news.gmane.org!not-for-mail From: lee Newsgroups: gmane.emacs.gnus.general Subject: Re: sending messages from script/command line Date: Sat, 06 Jul 2013 00:00:57 +0200 Organization: my virtual residence Message-ID: <87txk8zmxy.fsf@yun.yagibdah.de> References: <87zjua8edq.fsf@yun.yagibdah.de> <87obamjvvx.fsf@lifelogs.com> <87vc4u48j8.fsf@yun.yagibdah.de> <87y59p3rh3.fsf@lifelogs.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1373062067 1801 80.91.229.3 (5 Jul 2013 22:07:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Jul 2013 22:07:47 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M31743@lists.math.uh.edu Sat Jul 06 00:07:48 2013 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UvEAN-0000L2-Qh for ding-account@gmane.org; Sat, 06 Jul 2013 00:07:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1UvE8G-0004ds-GE; Fri, 05 Jul 2013 17:05:36 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1UvE8D-0004dc-GA for ding@lists.math.uh.edu; Fri, 05 Jul 2013 17:05:33 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1UvE8B-0008AF-RO for ding@lists.math.uh.edu; Fri, 05 Jul 2013 17:05:33 -0500 Original-Received: from client-194-42-186-216.muenet.net ([194.42.186.216] helo=yun.yagibdah.de) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1UvE89-0005I5-1q for ding@gnus.org; Sat, 06 Jul 2013 00:05:29 +0200 Original-Received: from lee by yun.yagibdah.de with local (Exim 4.80.1) (envelope-from ) id 1UvE87-00071O-7X for ding@gnus.org; Sat, 06 Jul 2013 00:05:27 +0200 In-Reply-To: <87y59p3rh3.fsf@lifelogs.com> (Ted Zlatanov's message of "Tue, 02 Jul 2013 11:35:04 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Mail-Followup-To: ding@gnus.org X-Spam-Score: -0.9 (/) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:83483 Archived-At: Ted Zlatanov writes: > On Tue, 02 Jul 2013 11:48:58 +0200 lee wrote: > > l> Ted Zlatanov writes: >>> >>> There's no built-in way to do what you describe, so your function is >>> probably the best solution. > > l> Anyone else who might need it, feel free to use it :) > > I would be OK with putting it under contrib/ at least, if you want to > make it a patch submission. Sure, why not --- I don't know how to do that, though. And I would really like to come up with something better: "better" meaning something that optionally includes posting styles. I'd like to be able to specify headers and the body and give it a flag telling gnus whether I want to edit the mail before sending it or not. A tool like mailx would do, and I could send a Bcc to myself and use some splitting rules to put the messages into the right groups ... but isn't that something that gnus should be able to do? > l> Since I am at this: This only works when gnus has already been started. > l> What would I do to make sure that it's started if it isn't? Is there a > l> way to check whether gnus is running from the command line/script, or > l> could/should I write a wrapper around 'my-gnus-group-mail that starts > l> gnus in case it's not started already? >>> >>> Since Gnus is not a daemon, it's hard to do what you describe. Gnus is >>> more like a set of functions that agree upon the same buffer formats :) > > l> Maybe I can make a wrapper function that checks the buffer list for a > l> buffer named "*Gnus*" and starts gnus when there's no such buffer ... > > That may work. It's probably more robust if Gnus does something on > startup to indicate that it's been started, and something else when it > quits. But I'll leave it to Lars, I don't have a strong opinion. Let's see what he says --- perhaps this is even easy to do. Before I could come up with something better, I'd have to try to figure out how gnus works. Maybe it's not possible to change the posting style on the fly ... and if it's changed, it would have to be restored ... -- "Object-oriented programming languages aren't completely convinced that you should be allowed to do anything with functions." http://www.joelonsoftware.com/items/2006/08/01.html