From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/83443 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: Re: sending messages from script/command line Date: Mon, 01 Jul 2013 08:40:50 -0400 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87obamjvvx.fsf@lifelogs.com> References: <87zjua8edq.fsf@yun.yagibdah.de> Reply-To: ding@gnus.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1372684279 5180 80.91.229.3 (1 Jul 2013 13:11:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Jul 2013 13:11:19 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M31703@lists.math.uh.edu Mon Jul 01 15:11:18 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 1Utdsy-0001z9-09 for ding-account@gmane.org; Mon, 01 Jul 2013 15:11:16 +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 1Utdrt-0002Gr-FK; Mon, 01 Jul 2013 08:10:09 -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 1Utdrr-0002GU-Gr for ding@lists.math.uh.edu; Mon, 01 Jul 2013 08:10:07 -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 1Utdrp-0003Oe-NH for ding@lists.math.uh.edu; Mon, 01 Jul 2013 08:10:07 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1Utdro-000065-Bn for ding@gnus.org; Mon, 01 Jul 2013 15:10:04 +0200 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Utdrn-0000wA-S7 for ding@gnus.org; Mon, 01 Jul 2013 15:10:03 +0200 Original-Received: from pool-72-93-34-251.bstnma.east.verizon.net ([72.93.34.251]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 01 Jul 2013 15:10:03 +0200 Original-Received: from tzz by pool-72-93-34-251.bstnma.east.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 01 Jul 2013 15:10:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 33 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: pool-72-93-34-251.bstnma.east.verizon.net X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:Sdbhu83BJN5fQ8vbHxqwWbW5DHM= X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:83443 Archived-At: On Fri, 28 Jun 2013 17:40:25 +0200 lee wrote: l> is there a way to send messages from a script using the posting style of l> a particular group? Like l> emacsclient -e "(gnus-group-mail 1)" l> works fine, only it doesn't let me specify which group to use and emacs l> asks me. ... l> This might not be as it should be, but it seems to work: l> emacsclient -e '(my-gnus-group-mail "particular.group.name")' l> Maybe there's a better (already built-in) way to do this? There's no built-in way to do what you describe, so your function is probably the best solution. 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 :) So the simplest way, probably, is to give some advice to the `gnus' function and to the `q' keybinding in the Group buffer. You can also look at the `gnus-slave' stuff but that's opportunistic and not stateful. Ted