Gnus development mailing list
 help / color / mirror / Atom feed
From: lee <lee@yun.yagibdah.de>
To: ding@gnus.org
Subject: Re: sending messages from script/command line
Date: Tue, 02 Jul 2013 11:48:58 +0200	[thread overview]
Message-ID: <87vc4u48j8.fsf@yun.yagibdah.de> (raw)
In-Reply-To: <87obamjvvx.fsf@lifelogs.com> (Ted Zlatanov's message of "Mon, 01 Jul 2013 08:40:50 -0400")

Ted Zlatanov <tzz@lifelogs.com> writes:

> On Fri, 28 Jun 2013 17:40:25 +0200 lee <lee@yun.yagibdah.de> 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.

Anyone else who might need it, feel free to use it :)

> 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 :)

Maybe I can make a wrapper function that checks the buffer list for a
buffer named "*Gnus*" and starts gnus when there's no such buffer ...


-- 
"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



  reply	other threads:[~2013-07-02  9:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-28 15:40 lee
2013-07-01 12:40 ` Ted Zlatanov
2013-07-02  9:48   ` lee [this message]
2013-07-02 15:35     ` Ted Zlatanov
2013-07-05 22:00       ` lee
2013-07-06  3:22         ` Eric Abrahamsen
2013-07-08 12:23           ` Ted Zlatanov
2013-07-08 14:08             ` Eric Abrahamsen
2013-07-08 12:32         ` Ted Zlatanov

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=87vc4u48j8.fsf@yun.yagibdah.de \
    --to=lee@yun.yagibdah.de \
    --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).