From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jorgen Schaefer Newsgroups: gmane.emacs.devel Subject: Re: Best practice for mocking functions/prompts/etc. Date: Sun, 9 Nov 2014 12:05:10 +0100 Message-ID: <20141109120510.2f5a099c@forcix> References: <20141108193423.4e021283@forcix> <87lhnlmgdd.fsf@ferrier.me.uk> <20141109095909.709d26ff@forcix> <87d28wmzi8.fsf@ferrier.me.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1415531246 7508 80.91.229.3 (9 Nov 2014 11:07:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Nov 2014 11:07:26 +0000 (UTC) Cc: emacs-devel@gnu.org To: Nic Ferrier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 09 12:07:19 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XnQL0-0007fy-Fo for ged-emacs-devel@m.gmane.org; Sun, 09 Nov 2014 12:07:18 +0100 Original-Received: from localhost ([::1]:38414 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XnQL0-0007FH-1V for ged-emacs-devel@m.gmane.org; Sun, 09 Nov 2014 06:07:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32830) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XnQJc-00054E-6d for emacs-devel@gnu.org; Sun, 09 Nov 2014 06:05:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XnQJU-0004qA-QN for emacs-devel@gnu.org; Sun, 09 Nov 2014 06:05:52 -0500 Original-Received: from loki.jorgenschaefer.de ([87.230.15.51]:55501) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XnQJU-0004q1-J3 for emacs-devel@gnu.org; Sun, 09 Nov 2014 06:05:44 -0500 Original-Received: by loki.jorgenschaefer.de (Postfix, from userid 998) id 9093B202F90; Sun, 9 Nov 2014 12:05:13 +0100 (CET) Original-Received: from forcix (port-4080.pppoe.wtnet.de [84.46.15.255]) by loki.jorgenschaefer.de (Postfix) with ESMTPSA id BB578202F8F; Sun, 9 Nov 2014 12:05:11 +0100 (CET) In-Reply-To: <87d28wmzi8.fsf@ferrier.me.uk> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; i586-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 87.230.15.51 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:176618 Archived-At: On Sun, 09 Nov 2014 10:36:47 +0000 Nic Ferrier wrote: > Jorgen Schaefer writes: > > >> There are elisp mocking libs. But with lisp you don't really need > >> them. > > > > Yep. I know how I would do this in my own package, and I know how I > > can do this with Emacs "on-board" libraries. The latter feels rather > > cumbersome to me, so I figured I'd ask if there are recommended > > ways / best practices for packages that are meant to go into the > > Emacs repository that I am missing. :-) > > And I don't think there are. The mocking stuff doesn't go anywhere > because we don't need it very often... except in your use case. > > Make something! I just had a quick talk off the list with Nic, because it seemed to me we were talking past each other, and indeed we were! :-) The question I had, which I seem to have not explained well, was: How do we mock this case in the Emacs "core" (i.e. the main Emacs repository), as we can not use existing mock libraries (that I know of) because they are not part of Emacs. I can obviously write my own, as Nic suggests above, or just use the default verbose options, as I have in the initial mail, but I figured I'd ask first if there was something I am missing before reinventing the wheel. :-) Regards, Jorgen