[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OT, meta] markup (Re: have emacs use SIGTERM to end a process inste

From: Emanuel Berg
Subject: Re: [OT, meta] markup (Re: have emacs use SIGTERM to end a process instead of SIGHUP)
Date: Sat, 20 Jul 2013 07:53:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Tassilo Horn <> writes:

> Hm, not sure what might be the culprit.  But what is
> `new-message' good for, i.e., what does it do that C-x m
> (`compose-mail') with `mail-user-agent' set to `gnus-user-agent'
> wouldn't also do?

OK, I looked into this.

`new-message' looks like the below code. I improved the docstring
a bit.

With `new-message', I can fill in the provided, blank headers like
this -

Newsgroups: alt.test
To: Emanuel Berg <embe8573@...>
Subject: test

- and then fire away: I'll get a mail, *and* alt.test will get a

This is just an example (and I don't use it regularly), but I
think it is kind of cool.

Anyway, it seems to work *both* with `message-user-agent' and
`gnus-user-agent' as `mail-user-agent' (both mail and post work,
for both).

`compose-mail' with `gnus-user-agent' worked for mail, but not for
posts, when I gave it a "Newsgroup:" header manually.

Just to have done something, I changed to `gnus-user-agent' (for
the old new-message). But I don't see how that would help, because
Gnus has always been the sender in my interaction with Usenet.

(defun new-message ()
  "Open a new, empty message,
be it a Usenet post or a mail (or both),
with `gnus-post-news'.
This requires Gnus to run:
that is, there must be a *Group* buffer.
If there isn't, then `gnus' is started;
after that, a second attempt is made.
Also, a \"To:\" header is added, and point is moved
so that any typing will go into that header field."
  (if (get-buffer "*Group*")
        (gnus-post-news 'post "")
        (insert "\nTo: ")
        (transpose-lines 1)
        (set-buffer-modified-p nil)
        (goto-char 1)
        (end-of-line) )
      (new-message) )))

Emanuel Berg - programmer (hire me! CV below)
computer projects:
internet activity:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]