unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* gnus / message-send-mail-with-mailclient [patch]
@ 2006-02-09 12:06 David Reitter
  2006-03-16 21:27 ` Reiner Steib
  0 siblings, 1 reply; 13+ messages in thread
From: David Reitter @ 2006-02-09 12:06 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 5327 bytes --]

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. The patch  
below fixes the problem analogous to what has been done in the  
`sendmail' package.

I noticed this when `reporter' didn't successfully send off e-mails.

Are there any other places where sendmail functionality is assumed,  
but `send-mail-function' is not respected?



*** lisp/gnus/message.el	04 Feb 2006 18:25:51 +0000	1.101
--- lisp/gnus/message.el	09 Feb 2006 12:01:32 +0000	
***************
*** 584,599 ****
     :link '(custom-manual "(message)Canceling News")
     :type 'string)

   ;; Useful to set in site-init.el
   ;;;###autoload
   (defcustom message-send-mail-function 'message-send-mail-with- 
sendmail
     "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),
   `message-send-mail-with-mh', `message-send-mail-with-qmail',
! `message-smtpmail-send-it', `smtpmail-send-it' and `feedmail-send-it'.

   See also `send-mail-function'."
     :type '(radio (function-item message-send-mail-with-sendmail)
--- 584,609 ----
     :link '(custom-manual "(message)Canceling News")
     :type 'string)

+ ;; 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
+      '((if (and window-system (memq system-type '(darwin windows-nt)))
+ 	   'message-send-mail-with-mailclient
+ 	 'message-send-mail-with-sendmail)))
+
   ;; Useful to set in site-init.el
   ;;;###autoload
   (defcustom message-send-mail-function 'message-send-mail-with- 
sendmail
     "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),
   `message-send-mail-with-mh', `message-send-mail-with-qmail',
! `message-smtpmail-send-it', `smtpmail-send-it', `feedmail-send-it'
! and `message-send-mail-with-mailclient'.

   See also `send-mail-function'."
     :type '(radio (function-item message-send-mail-with-sendmail)
***************
*** 3982,3987 ****
--- 3992,4005 ----
     (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."
Index: startup.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/startup.el,v
retrieving revision 1.397
diff -c -r1.397 startup.el
*** lisp/startup.el	22 Jan 2006 23:14:25 -0000	1.397
--- lisp/startup.el	9 Feb 2006 12:02:12 -0000
***************
*** 463,469 ****
   		  (if (string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)"
   				    term)
   		      (setq default-frame-background-mode 'light)))
! 		(frame-set-background-mode (selected-frame)))))

   	;; Now we know the user's default font, so add it to the menu.
   	(if (fboundp 'font-menu-add-default)
--- 463,472 ----
   		  (if (string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)"
   				    term)
   		      (setq default-frame-background-mode 'light)))
! 		(frame-set-background-mode (selected-frame))))
!
! 	  ;; time to make the frame visible (Aquamacs)
! 	  (make-frame-visible))

   	;; Now we know the user's default font, so add it to the menu.
   	(if (fboundp 'font-menu-add-default)
***************
*** 741,746 ****
--- 744,752 ----

     (run-hooks 'before-init-hook)

+   ;; the initial frame is hidden in Aquamacs
+   (setq initial-frame-alist (cons '(visibility . nil) initial-frame- 
alist))
+
     ;; Under X Window, this creates the X frame and deletes the  
terminal frame.
     (when (fboundp 'frame-initialize)
       (frame-initialize))
***************
*** 778,783 ****
--- 784,790 ----
     (custom-reevaluate-setting 'mouse-wheel-up-event)
     (custom-reevaluate-setting 'file-name-shadow-mode)
     (custom-reevaluate-setting 'send-mail-function)
+   (custom-reevaluate-setting 'message-send-mail-function)

     ;; Register default TTY colors for the case the terminal hasn't a
     ;; terminal init file.
***************
*** 1828,1833 ****
--- 1835,1843 ----
       (when (fboundp 'frame-notice-user-settings)
         (frame-notice-user-settings))

+     ;; time to make the frame visible (Aquamacs)
+     (make-frame-visible)
+
       ;; If there are no switches to process, we might as well
       ;; run this hook now, and there may be some need to do it
       ;; before doing any output.



--
http://aquamacs.org -- Aquamacs: Emacs on Mac OS X
http://aquamacs.org/donate -- Could we help you? Return the favor and  
support the Aquamacs Project!





[-- Attachment #1.2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 2454 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2006-03-26  9:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-09 12:06 gnus / message-send-mail-with-mailclient [patch] David Reitter
2006-03-16 21:27 ` Reiner Steib
2006-03-17  7:39   ` David Reitter
2006-03-17 11:33   ` Eli Zaretskii
2006-03-17 12:37     ` David Reitter
2006-03-17 17:10       ` Reiner Steib
2006-03-18 10:36         ` Eli Zaretskii
2006-03-18 11:44           ` Reiner Steib
2006-03-22 10:36             ` David Reitter
2006-03-24 14:29               ` Reiner Steib
2006-03-24 17:15                 ` David Reitter
2006-03-24 20:29                   ` Kevin Rodgers
2006-03-26  9:35                     ` David Reitter

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).