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: Sat, 06 Jul 2013 00:00:57 +0200	[thread overview]
Message-ID: <87txk8zmxy.fsf@yun.yagibdah.de> (raw)
In-Reply-To: <87y59p3rh3.fsf@lifelogs.com> (Ted Zlatanov's message of "Tue, 02 Jul 2013 11:35:04 -0400")

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


-- 
"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-05 22:00 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 [this message]
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=87txk8zmxy.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).