From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.devel Subject: [ELPA] Package proposal: gnus-mock Date: Wed, 10 Oct 2018 11:49:56 -0700 Message-ID: <87d0shr60b.fsf@ericabrahamsen.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1539197291 26563 195.159.176.226 (10 Oct 2018 18:48:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 10 Oct 2018 18:48:11 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 10 20:48:07 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 1gAJWg-0006np-VZ for ged-emacs-devel@m.gmane.org; Wed, 10 Oct 2018 20:48:07 +0200 Original-Received: from localhost ([::1]:58671 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAJYn-0004Qi-7O for ged-emacs-devel@m.gmane.org; Wed, 10 Oct 2018 14:50:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAJYh-0004Pf-Bb for emacs-devel@gnu.org; Wed, 10 Oct 2018 14:50:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAJYd-00048i-MZ for emacs-devel@gnu.org; Wed, 10 Oct 2018 14:50:11 -0400 Original-Received: from [195.159.176.226] (port=56425 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gAJYd-00048W-Dj for emacs-devel@gnu.org; Wed, 10 Oct 2018 14:50:07 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1gAJWU-0006Vo-CX for emacs-devel@gnu.org; Wed, 10 Oct 2018 20:47:54 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 49 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:42S99tOJW4/9V1nMtdekZQr7HnY= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 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:230317 Archived-At: Hi, I've just pushed the branch scratch/gnus-mock to ELPA, containing a package I'd like to add there. It's called "Gnus Mock", and provides a dummy test installation for Gnus, which you can use for working on Gnus features and testing Gnus bugs without endangering your own Gnus setup. I'm hoping this makes it easier to do work on Gnus -- it's often hard to hack on without a full working installation, and no one wants to risk their own mail on that. In a nutshell, you run M-x gnus-mock-start, which first copies a dummy Gnus installation (including mails) into a temporary directory, boots up a new "emacs -Q", and points all Gnus-related variables at the temporary directory. You can start Gnus as usual, hack on whatever you like, accidentally delete data, and when it all gets too messy you can just kill the secondary Emacs, and start over afresh. Two questions: 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.") That seems to work fine, but I wanted to check there wasn't a better/safer way to do it. 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? Future plans include more different pre-installed servers, including checking for a "dovecot" executable and setting up an nnimap server if it's found. Comments very welcome! Eric