* [PATCH] Make feedmail usable for Cygwin
@ 2004-10-08 20:54 Edi Weitz
0 siblings, 0 replies; 2+ messages in thread
From: Edi Weitz @ 2004-10-08 20:54 UTC (permalink / raw)
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 " "))))))
--
Lisp is not dead, it just smells funny.
Real email: (replace (subseq "spamtrap@agharta.de" 5) "edi")
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] Make feedmail usable for Cygwin
@ 2004-10-08 21:16 Edi Weitz
0 siblings, 0 replies; 2+ messages in thread
From: Edi Weitz @ 2004-10-08 21:16 UTC (permalink / raw)
[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 " "))))))
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-10-08 21:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-08 20:54 [PATCH] Make feedmail usable for Cygwin Edi Weitz
-- strict thread matches above, loose matches on Subject: below --
2004-10-08 21:16 Edi Weitz
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).