emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ELPA] Package proposal: gnus-mock


From: Eric Abrahamsen
Subject: Re: [ELPA] Package proposal: gnus-mock
Date: Wed, 10 Oct 2018 12:53:51 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> From: Eric Abrahamsen <address@hidden>
>> Date: Wed, 10 Oct 2018 11:49:56 -0700
>> 
>> 1. I find the data directory like so:
>> 
>> (defconst gnus-mock-data-dir
>> (file-name-as-directory (expand-file-name
>> "data"
>> (file-name-directory load-file-name)))
>>    "Source directory for Gnus mock data.")
>
> Why not use data-directory?

I think I was unclear -- this is the data directory that ships with the
package itself (and ends up installed in
$package-user-dir/gnus-mock-X/data), not Emacs' data directory.
Basically I need to build an absolute path starting from the place the
package is installed, and `load-file-name' seems like the only way to do
that.

>> 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.)

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.

Would there be some way to write an executable wrapper around the
python program? What would that look like on Windows?

Thanks,
Eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]