Gnus development mailing list
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: ding@gnus.org
Subject: Re: sending messages from script/command line
Date: Sat, 06 Jul 2013 11:22:50 +0800	[thread overview]
Message-ID: <87obagfk39.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <87txk8zmxy.fsf@yun.yagibdah.de>

lee <lee@yun.yagibdah.de> writes:

> Ted Zlatanov <tzz@lifelogs.com> writes:
>
>> On Tue, 02 Jul 2013 11:48:58 +0200 lee <lee@yun.yagibdah.de> wrote: 
>>
>> l> Ted Zlatanov <tzz@lifelogs.com> 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 ...

There's the function `gnus-alive-p' that does a bit of checking to see
if gnus is running, you could probably use that in your wrapper
function...

E




  reply	other threads:[~2013-07-06  3:22 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
2013-07-02 15:35     ` Ted Zlatanov
2013-07-05 22:00       ` lee
2013-07-06  3:22         ` Eric Abrahamsen [this message]
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=87obagfk39.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --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).