all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Reitter <david.reitter@gmail.com>
Subject: gnus / message-send-mail-with-mailclient [patch]
Date: Thu, 9 Feb 2006 12:06:50 +0000	[thread overview]
Message-ID: <059BF802-B4EB-433E-AF78-024107CD7E16@gmail.com> (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

             reply	other threads:[~2006-02-09 12:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-09 12:06 David Reitter [this message]
2006-03-16 21:27 ` gnus / message-send-mail-with-mailclient [patch] 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=059BF802-B4EB-433E-AF78-024107CD7E16@gmail.com \
    --to=david.reitter@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.