From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] Package proposal: gnus-mock Date: Fri, 12 Oct 2018 11:16:07 +0300 Message-ID: <83lg73wpfc.fsf@gnu.org> References: <87d0shr60b.fsf@ericabrahamsen.net> <83d0shy6bq.fsf@gnu.org> <87tvltmvcg.fsf@ericabrahamsen.net> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1539332101 15398 195.159.176.226 (12 Oct 2018 08:15:01 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 12 Oct 2018 08:15:01 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eric Abrahamsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 12 10:14:57 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gAsb3-0003su-25 for ged-emacs-devel@m.gmane.org; Fri, 12 Oct 2018 10:14:57 +0200 Original-Received: from localhost ([::1]:38894 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAsd9-0006vN-Gi for ged-emacs-devel@m.gmane.org; Fri, 12 Oct 2018 04:17:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51538) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAscN-0006sD-N1 for emacs-devel@gnu.org; Fri, 12 Oct 2018 04:16:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAscG-0006hM-SM for emacs-devel@gnu.org; Fri, 12 Oct 2018 04:16:17 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47900) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAsc9-0006fW-Ok; Fri, 12 Oct 2018 04:16:06 -0400 Original-Received: from [176.228.60.248] (port=4875 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gAsc9-0007uS-Au; Fri, 12 Oct 2018 04:16:05 -0400 In-reply-to: <87tvltmvcg.fsf@ericabrahamsen.net> (message from Eric Abrahamsen on Wed, 10 Oct 2018 12:53:51 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:230343 Archived-At: > From: Eric Abrahamsen > Date: Wed, 10 Oct 2018 12:53:51 -0700 > > >> 2. There's a small Python script in there that acts as a dummy sendmail > >> command: when you send an email from a Gnus mock installation, it > >> hands it off to the Python script, which boomerangs it back to a > >> folder in the local installation, so you can send yourself messages > >> and see what they look like. The script is called with > >> "#!/usr/bin/env python", which I assume will be fine for Unix-y > >> platforms, but maybe not work for Windows. I'd like it to work for > >> Windows -- does anyone have suggestions for a more portable way of > >> doing this? > > > > Issue a shell command "python SCRIPT"? > > That would work on Windows? (I know nothing about Windows.) Yes, it should. 'python' is a normal executable, so Windows should know how to run it. It's the assumption that the OS understands the hash-bang signature of a script that's unportable, it is Unix-specific. > The problem is that I'm injecting this program at the lowest level > possible, as the value of `sendmail-program', so that > `message-send-mail-with-sendmail' works correctly, and all aspects of > Gnus/message code can be tested. `sendmail-program' is called with > `call-process-region', so it needs to be an executable. python.exe is an executable. > Would there be some way to write an executable wrapper around the > python program? What would that look like on Windows? It's possible (with CPython, AFAIK), but why ask users to do something like that? Invoking the interpreter directly is much easier, IMO.