From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Edi Weitz Newsgroups: gmane.emacs.bugs Subject: [PATCH] Make feedmail usable for Cygwin Date: Fri, 08 Oct 2004 22:54:20 +0200 Organization: No organization Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: Reply-To: spamtrap@agharta.de NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1097281164 2526 80.91.229.6 (9 Oct 2004 00:19:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 9 Oct 2004 00:19:24 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 09 02:19:15 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CG4x9-00066u-00 for ; Sat, 09 Oct 2004 02:19:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CG53w-0000xi-SA for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Oct 2004 20:26:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CG51y-000823-2J for bug-gnu-emacs@gnu.org; Fri, 08 Oct 2004 20:24:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CG51x-00081L-2H for bug-gnu-emacs@gnu.org; Fri, 08 Oct 2004 20:24:13 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CG51w-00081G-Sd for bug-gnu-emacs@gnu.org; Fri, 08 Oct 2004 20:24:13 -0400 Original-Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CG4mR-0001T9-4F for bug-gnu-emacs@gnu.org; Fri, 08 Oct 2004 20:08:11 -0400 Original-Received: from [132.239.1.53] (helo=mailbox1.ucsd.edu) by mx20.gnu.org with esmtp (Exim 4.34) id 1CG1nn-0006NI-B9 for bug-gnu-emacs@gnu.org; Fri, 08 Oct 2004 16:57:23 -0400 Received-SPF: Received-SPF: none (mailbox1.ucsd.edu: domain of mod-submit@uni-berlin.de does not designate permitted sender hosts) Original-Received: from Mail.FU-Berlin.DE (mail.fu-berlin.de [130.133.1.2]) by mailbox1.ucsd.edu (8.13.1/8.13.1) with ESMTP id i98KsMOL000410 for ; Fri, 8 Oct 2004 13:54:23 -0700 (PDT) Original-Received: by Mail.FU-Berlin.DE (Exim 4.42) from curry.zedat.fu-berlin.de ([160.45.10.36]) for gnu-emacs-bug@moderators.isc.org with esmtp id <1CG1kr-0009QJ-Ts>; Fri, 08 Oct 2004 22:54:22 +0200 Original-Received: by Curry.ZEDAT.FU-Berlin.DE (Smail3.2.0.98) from news.uni-berlin.de with bsmtp id ; Fri, 8 Oct 2004 22:54:21 +0200 (MEST) Original-To: gnu-emacs-bug@moderators.isc.org Original-Path: not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 60 X-Orig-X-Trace: news.uni-berlin.de RGsW6nVww5S7UVIbPhBnuQykv2f7YsfdzJwN8m0LqOeTMO0MY= X-Home-Page: http://weitz.de/ Mail-Copies-To: never User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt) Cancel-Lock: sha1:iTQRqrXpmCVThL2Zlf/tehaDE5A= X-MailScanner: PASSED (v1.2.8 47824 i98KsMOL000410 mailbox1.ucsd.edu) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:9239 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:9239 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 * 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")