From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Tests, Emacs-25 and Conditional Features Date: Fri, 18 Mar 2016 13:07:18 +0200 Message-ID: <831t789h95.fsf@gnu.org> References: <87k2l2zgre.fsf@russet.org.uk> <87h9g6xzrb.fsf@gmx.de> <87shzpxvfv.fsf@russet.org.uk> <83bn6d9iml.fsf@gnu.org> <87zitwf4pz.fsf@russet.org.uk> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1458299274 11564 80.91.229.3 (18 Mar 2016 11:07:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Mar 2016 11:07:54 +0000 (UTC) Cc: michael.albinus@gmx.de, emacs-devel@gnu.org To: phillip.lord@russet.org.uk (Phillip Lord) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 18 12:07:53 2016 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 1agsFz-0005la-M9 for ged-emacs-devel@m.gmane.org; Fri, 18 Mar 2016 12:07:51 +0100 Original-Received: from localhost ([::1]:42904 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agsFv-0004Oc-KN for ged-emacs-devel@m.gmane.org; Fri, 18 Mar 2016 07:07:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37883) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agsFh-0004Lo-6l for emacs-devel@gnu.org; Fri, 18 Mar 2016 07:07:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agsFc-00014S-T2 for emacs-devel@gnu.org; Fri, 18 Mar 2016 07:07:33 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34776) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agsFc-00014O-Ph; Fri, 18 Mar 2016 07:07:28 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1209 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1agsFb-0005kt-W5; Fri, 18 Mar 2016 07:07:28 -0400 In-reply-to: <87zitwf4pz.fsf@russet.org.uk> (phillip.lord@russet.org.uk) 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.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:201822 Archived-At: > From: phillip.lord@russet.org.uk (Phillip Lord) > Cc: michael.albinus@gmx.de, emacs-devel@gnu.org > Date: Fri, 18 Mar 2016 10:41:28 +0000 > > > More generally, I don't see how Emacs could know what you believe. We > > need to define the meaning of that first, and then find a way to > > communicate that to Emacs. > > Something like > > (skip-unless (or (gnutls-available-p) conditional-feature-force)) > > So, we pick have a standard test selector which means "all the > conditional features should be expected to be on". Probably, you would > want "all the conditional features that are supposed to be on by > default, should be expected to be on" That won't be useful at all: many such features are platform-dependent, for example. It makes very little sense to try invoking w32notify or w32-shell-execute on GNU/Linux. Likewise with features that depend on specific GUI toolkits. > > Then there's the issue of how do you test this. An API that was not > > compiled into Emacs cannot be invoked, so what do we want to show the > > user? a "void function" error? ert error messages are not so easy to > > interpret. > > It would be nice if there were a standard way of detecting this. As > Michael's example shows, we have a gnutls-available-p function which > is defined if gnutls is not available, but for libxml, we check for > non-definition of functions. It would be trivial to add a libxml2-available-p function, but I fail to see how is this different from using fboundp. And AFAIU, in the context of this discussion, you don't want to trust the likes of gnutls-available-p, either.