From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help 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 Organization: Aioe.org NNTP Server Message-ID: <87a9lhg4lf.fsf@VLAN-3434.student.uu.se> References: <51DB3A43.4090909@johnleach.co.uk> <87txk4c55k.fsf@thinkpad.tsdh.de> <51DFE1EE.2000805@johnleach.co.uk> <87li57dici.fsf_-_@VLAN-3434.student.uu.se> <87vc4aksea.fsf@VLAN-3434.student.uu.se> <87vc46q22w.fsf@VLAN-3434.student.uu.se> <878v12ptx9.fsf@VLAN-3434.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1374299714 24690 80.91.229.3 (20 Jul 2013 05:55:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Jul 2013 05:55:14 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jul 20 07:55:16 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V0Q8S-000825-Dz for geh-help-gnu-emacs@m.gmane.org; Sat, 20 Jul 2013 07:55:16 +0200 Original-Received: from localhost ([::1]:47711 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0Q8S-0001aG-1b for geh-help-gnu-emacs@m.gmane.org; Sat, 20 Jul 2013 01:55:16 -0400 Original-Path: usenet.stanford.edu!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 63 Original-NNTP-Posting-Host: SWN/nubmpQxYKwY7hPy4YA.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:98XFMwBpbZfHFMTzujsAuwnQf0I= Original-Xref: usenet.stanford.edu gnu.emacs.help:199999 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:92265 Archived-At: 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 Subject: test - and then fire away: I'll get a mail, *and* alt.test will get a post. 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." (interactive) (if (get-buffer "*Group*") (progn (gnus-post-news 'post "") (insert "\nTo: ") (transpose-lines 1) (set-buffer-modified-p nil) (goto-char 1) (end-of-line) ) (progn (gnus) (new-message) ))) -- Emanuel Berg - programmer (hire me! CV below) computer projects: http://user.it.uu.se/~embe8573 internet activity: http://home.student.uu.se/embe8573