[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Make feedmail usable for Cygwin
From: |
Edi Weitz |
Subject: |
[PATCH] Make feedmail usable for Cygwin |
Date: |
Fri, 08 Oct 2004 23:16:16 +0200 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt) |
[I first posted to gnu.emacs.bug but that doesn't seem to work. Sorry
if you see this twice.]
In the current version of feedmail you can't use its binmail template
facility with Cygwin's bash because "/bin/sh" is hard-coded. This tiny
patch changes that.
Cheers,
Edi.
2004-10-08 Edi Weitz <edi@agharta.de>
* mail/feedmail.el (feedmail-binmail-template)
(feedmail-buffer-to-binmail): Make usable for Cygwin
--- feedmail.el~ 2004-10-08 22:41:10.022078400 +0200
+++ feedmail.el 2004-10-08 22:43:26.958984000 +0200
@@ -1302,17 +1302,18 @@
(defcustom feedmail-binmail-template (if mail-interactive "/bin/mail %s"
"/bin/rmail %s")
- "*Command template for the subprocess which will get rid of the mail.
-It can result in any command understandable by /bin/sh. Might not
-work at all in non-Unix environments. The single '%s', if present,
-gets replaced by the space-separated, simplified list of addressees.
-Used in feedmail-buffer-to-binmail to form the shell command which
-will receive the contents of the prepped buffer as stdin. If you'd
-like your errors to come back as mail instead of immediately in a
-buffer, try /bin/rmail instead of /bin/mail (this can be accomplished
-by keeping the default nil setting of `mail-interactive'). You might
-also like to consult local mail experts for any other interesting
-command line possibilities."
+ "*Command template for the subprocess which will get rid of the
+mail. It can result in any command understandable by the shell named
+by `shell-file-name'. Might not work at all in non-Unix
+environments. \(Note that on Cygwin you can use the value \"sh\".) The
+single '%s', if present, gets replaced by the space-separated,
+simplified list of addressees. Used in feedmail-buffer-to-binmail to
+form the shell command which will receive the contents of the prepped
+buffer as stdin. If you'd like your errors to come back as mail
+instead of immediately in a buffer, try /bin/rmail instead of
+/bin/mail (this can be accomplished by keeping the default nil setting
+of `mail-interactive'). You might also like to consult local mail
+experts for any other interesting command line possibilities."
:group 'feedmail-misc
:type 'string
)
@@ -1328,7 +1329,8 @@
(set-buffer prepped)
(apply
'call-process-region
- (append (list (point-min) (point-max) "/bin/sh" nil errors-to nil "-c"
+ (append (list (point-min) (point-max) shell-file-name
+ nil errors-to nil shell-command-switch
(format feedmail-binmail-template
(mapconcat 'identity addr-listoid " "))))))
- [PATCH] Make feedmail usable for Cygwin,
Edi Weitz <=