From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/62284 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: gnus / message-send-mail-with-mailclient [patch] Date: Thu, 16 Mar 2006 22:27:43 +0100 Message-ID: References: <059BF802-B4EB-433E-AF78-024107CD7E16@gmail.com> Reply-To: Reiner Steib NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1142544520 10868 80.91.229.2 (16 Mar 2006 21:28:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 16 Mar 2006 21:28:40 +0000 (UTC) Cc: ding@gnus.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 16 22:28:37 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FK013-0000dm-82 for ged-emacs-devel@m.gmane.org; Thu, 16 Mar 2006 22:28:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FK012-0008DE-LC for ged-emacs-devel@m.gmane.org; Thu, 16 Mar 2006 16:28:16 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FK00d-0008Bi-Qo for emacs-devel@gnu.org; Thu, 16 Mar 2006 16:27:51 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FK00c-0008Ao-2E for emacs-devel@gnu.org; Thu, 16 Mar 2006 16:27:50 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FK00b-0008Ae-OE for emacs-devel@gnu.org; Thu, 16 Mar 2006 16:27:49 -0500 Original-Received: from [134.60.1.1] (helo=mail.uni-ulm.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FK05K-0001cU-PL for emacs-devel@gnu.org; Thu, 16 Mar 2006 16:32:43 -0500 Original-Received: from bridgekeeper.physik.uni-ulm.de (bridgekeeper.physik.uni-ulm.de [134.60.10.123]) by mail.uni-ulm.de (8.13.4/8.13.4) with ESMTP id k2GLRibV014924; Thu, 16 Mar 2006 22:27:44 +0100 (MET) Original-Received: by bridgekeeper.physik.uni-ulm.de (Postfix, from userid 170) id 9B318114B9; Thu, 16 Mar 2006 22:27:43 +0100 (CET) Original-To: David Reitter Mail-Followup-To: David Reitter , , X-Face: /U7=m^"/-Dn61mAl{g9e3>\G5Tp,oEX|V)g2I1hBk\ML; )7A?6cmB-y7y?'NA^J<=oz7syB =(McAwIHgLX!.B?R3X}98d@?>CrT094KLWh]WU4gDpnL/")MS(XoQTv`Oq225uL>+; CpPXo$N5e>N> $tPd-gbB^F{gQS#1ase]XO~D4p4M"3+F-7~u]dy3I?Pb8RO*H-EFeWDUf?Rf, d]pv\Jvh2Cht!A=im yKAS2Z%Ao^;}W/qzMvMm In-Reply-To: <059BF802-B4EB-433E-AF78-024107CD7E16@gmail.com> (David Reitter's message of "Thu, 9 Feb 2006 12:06:50 +0000") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-DCC-WEiAPG-Metrics: gemini 1072; Body=3 Fuz1=3 Fuz2=3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:51716 gmane.emacs.gnus.general:62284 Archived-At: --=-=-= On Thu, Feb 09 2006, David Reitter wrote: > The send-mail-function defined specifically for the message package > doesn't work on systems where no sendmail is running. > That's why we added the `mailclient' package a while ago. `message.el' is supposed to work with Emacs 21 as well. Do you know whether `mailclient.el' works with Emacs 21? > The patch below fixes the problem analogous to what has been done in > the `sendmail' package. Your patch contains several unrelated changes (make-frame-visible), wrapped lines and mixed context/unified hunks which makes is hard to read and to apply. How about the attached patch. It includes some additional checks (partly taken from `message.el' in the development version of Gnus). I'm not sure (and I can't test) if (custom-reevaluate-setting 'message-send-mail-function) in `startup.el' is necessary. Bye, Reiner. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=rs-message-send-mail-function.patch Index: message.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/gnus/message.el,v retrieving revision 1.102 diff -u -r1.102 message.el --- message.el 24 Feb 2006 05:02:12 -0000 1.102 +++ message.el 16 Mar 2006 21:09:33 -0000 @@ -48,6 +48,7 @@ (require 'mml) (require 'rfc822) (eval-and-compile + (autoload 'mailclient-send-it "mailclient") ;; Emacs 22 or contrib/ (autoload 'gnus-find-method-for-group "gnus") (autoload 'nnvirtual-find-group-art "nnvirtual") (autoload 'gnus-group-decoded-name "gnus-group")) @@ -584,16 +585,37 @@ :link '(custom-manual "(message)Canceling News") :type 'string) +(defun message-send-mail-function () + "Return suitable value for the variable `message-send-mail-function'." + (cond ((and sendmail-program + (executable-find program)) + 'message-send-mail-with-sendmail) + ((and (locate-library "mailclient") + window-system + (memq system-type '(darwin windows-nt))) + 'message-send-mail-with-mailclient) + (t + 'message-smtpmail-send-it))) + +;; Prevent problems with `window-system' not having the correct value +;; when loaddefs.el is loaded. `custom-reevaluate-setting' needs the +;; standard value. +;;;###autoload +(put 'message-send-mail-function 'standard-value + '((message-send-mail-function))) + ;; Useful to set in site-init.el ;;;###autoload -(defcustom message-send-mail-function 'message-send-mail-with-sendmail +(defcustom message-send-mail-function (message-send-mail-function) "Function to call to send the current buffer as mail. The headers should be delimited by a line whose contents match the variable `mail-header-separator'. -Valid values include `message-send-mail-with-sendmail' (the default), +Valid values include `message-send-mail-with-sendmail', `message-send-mail-with-mh', `message-send-mail-with-qmail', -`message-smtpmail-send-it', `smtpmail-send-it' and `feedmail-send-it'. +`message-smtpmail-send-it', `smtpmail-send-it', +`feedmail-send-it' and `message-send-mail-with-mailclient'. The +default is system dependent. See also `send-mail-function'." :type '(radio (function-item message-send-mail-with-sendmail) @@ -602,8 +624,11 @@ (function-item message-smtpmail-send-it) (function-item smtpmail-send-it) (function-item feedmail-send-it) + (function-item message-send-mail-with-mailclient + :tag "Use Mailclient package") (function :tag "Other")) :group 'message-sending + :initialize 'custom-initialize-default :link '(custom-manual "(message)Mail Variables") :group 'message-mail) @@ -3982,6 +4007,13 @@ (run-hooks 'message-send-mail-hook) (smtpmail-send-it)) +(defun message-send-mail-with-mailclient () + "Send the prepared message buffer with `mailclient-send-it'. +This only differs from `smtpmail-send-it' that this command evaluates +`message-send-mail-hook' just before sending a message." + (run-hooks 'message-send-mail-hook) + (mailclient-send-it)) + (defun message-canlock-generate () "Return a string that is non-trivial to guess. Do not use this for anything important, it is cryptographically weak." --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --=-=-=--