From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/60902 Path: news.gmane.org!not-for-mail From: Sebastian Luque Newsgroups: gmane.emacs.gnus.general Subject: sending messages outside Gnus Date: Sun, 04 Sep 2005 13:43:11 -0500 Organization: Memorial University of Newfoundland Message-ID: <87slwjwppn.fsf@mun.ca> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1125931957 24032 80.91.229.2 (5 Sep 2005 14:52:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 5 Sep 2005 14:52:37 +0000 (UTC) Original-X-From: ding-owner+m9434=ding+2daccount=gmane.org@lists.math.uh.edu Mon Sep 05 16:52:31 2005 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1ECIJu-0002DA-7a for ding-account@gmane.org; Mon, 05 Sep 2005 16:51:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1ECIJt-0004dy-00 for ding-account@gmane.org; Mon, 05 Sep 2005 09:51:37 -0500 Original-Received: from nas01.math.uh.edu ([129.7.128.39]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1ECI4L-0004c9-00 for ding@lists.math.uh.edu; Mon, 05 Sep 2005 09:35:33 -0500 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas01.math.uh.edu with esmtp (Exim 4.52) id 1ECI4J-0007j5-Pm for ding@lists.math.uh.edu; Mon, 05 Sep 2005 09:35:33 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1ECI4I-0003TQ-00 for ; Mon, 05 Sep 2005 16:35:30 +0200 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1ECI2L-0006sR-BU for ding@gnus.org; Mon, 05 Sep 2005 16:33:29 +0200 Original-Received: from s0106001111ddbc6e.wp.shawcable.net ([24.77.74.208]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 05 Sep 2005 16:33:29 +0200 Original-Received: from spluque by s0106001111ddbc6e.wp.shawcable.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 05 Sep 2005 16:33:29 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Lines: 99 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: s0106001111ddbc6e.wp.shawcable.net User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) X-From-Line: nobody Sun Sep 4 13:43:27 2005 Cancel-Lock: sha1:4QQzc7j7awhQdUgJOn3jPcr9YeY= X-Spam-Score: -1.9 (-) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:60902 Archived-At: --=-=-= I'm resending the message below as it hasn't been posted after 24 h. --=-=-= Content-Type: multipart/mixed; boundary="==-=-=" --==-=-= Hi, I have mail-user-agent set to gnus-user-agent, but doing 'C-x m' before starting Gnus (No Gnus v0.4) gives: ,----- | Debugger entered--Lisp error: (void-function gnus-agent-possibly-save-gcc) | gnus-agent-possibly-save-gcc() | run-hooks(message-header-hook) | message-send-mail(nil) | message-send-via-mail(nil) | message-send(nil) | message-send-and-exit(nil) | call-interactively(message-send-and-exit) `----- although no problems occur if Gnus is running or was started once in the session. The issue came up in the past, and the best solution I found was: --8<---------------cut here---------------start------------->8--- --==-=-= Content-Type: application/emacs-lisp Content-Disposition: inline Content-Transfer-Encoding: quoted-printable (defvar started-gnus-by-send-mail nil "Non-nil means that gnus has been invoked by send-mail and can be closed after sending the mail message.") ;; Define a little function for C-x m be able to work without Gnus ;; being preloaded (defun send-mail () "Start Gnus if not already present and ensure that it is closed after sen= ding." (interactive) (if (and (functionp 'gnus-alive-p) (gnus-alive-p)) (setq started-gnus-by-send-mail nil) (setq started-gnus-by-send-mail t) (add-hook 'message-sent-hook 'check-message-and-exit-gnus) (gnus-no-server)) (gnus-group-mail)) ;; And assigns send-mail to C-x m (global-set-key (read-kbd-macro "C-x m") 'send-mail) (defun check-message-and-exit-gnus () "Closes gnus without any user interaction if it has been invoked by send-mail." (if started-gnus-by-send-mail (progn (let ((gnus-interactive-exit nil)) (gnus-group-exit)) (setq started-gnus-by-send-mail nil) (remove-hook 'message-sent-hook 'check-message-and-exit-gnus) ))) --8<---------------cut here---------------end--------------->8--- --==-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit but this uses gnus-no-server, which obviously starts Gnus. Is there a more efficient way to accomplish sending mails outside of Gnus, such that a) a copy of the message is sent to myself¹, or b) a Gcc header is used, causing the message to be stored in gnus-message-archive-group? Thanks in advance for any suggestions, Sebastian +---- *Footnotes* ----+ ¹ Using e.g. Bcc, being careful to add my address if such a header already exists with some entries, or the header is added with my address in it. -- Sebastian P. Luque --==-=-=-- --=-=-=--