From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#21816: elisp-mode-tests fails on a case-preserving filesystem Date: Tue, 03 Nov 2015 17:40:34 +0200 Message-ID: <83d1vrw0p9.fsf@gnu.org> References: <86mvuv30i1.fsf@stephe-leake.org> <86y4ef16ha.fsf@stephe-leake.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1446565286 25957 80.91.229.3 (3 Nov 2015 15:41:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 Nov 2015 15:41:26 +0000 (UTC) Cc: lekktu@gmail.com, 21816@debbugs.gnu.org To: Stephen Leake Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 03 16:41:15 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1Ztdhx-0002mg-7Q for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Nov 2015 16:41:13 +0100 Original-Received: from localhost ([::1]:49453 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ztdhw-0001zt-Jm for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Nov 2015 10:41:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35825) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ztdhr-0001wh-6Q for bug-gnu-emacs@gnu.org; Tue, 03 Nov 2015 10:41:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ztdhn-0002ER-Uq for bug-gnu-emacs@gnu.org; Tue, 03 Nov 2015 10:41:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60913) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ztdhn-0002EF-Ry for bug-gnu-emacs@gnu.org; Tue, 03 Nov 2015 10:41:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Ztdhn-0002Dk-Im for bug-gnu-emacs@gnu.org; Tue, 03 Nov 2015 10:41:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Nov 2015 15:41:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21816 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21816-submit@debbugs.gnu.org id=B21816.14465652408489 (code B ref 21816); Tue, 03 Nov 2015 15:41:03 +0000 Original-Received: (at 21816) by debbugs.gnu.org; 3 Nov 2015 15:40:40 +0000 Original-Received: from localhost ([127.0.0.1]:51620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZtdhP-0002Cq-Ba for submit@debbugs.gnu.org; Tue, 03 Nov 2015 10:40:39 -0500 Original-Received: from mtaout29.012.net.il ([80.179.55.185]:33739) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZtdhL-0002Cf-7C for 21816@debbugs.gnu.org; Tue, 03 Nov 2015 10:40:37 -0500 Original-Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NX800N00WNS5K00@mtaout29.012.net.il> for 21816@debbugs.gnu.org; Tue, 03 Nov 2015 17:39:40 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NX800KXUWU4CM30@mtaout29.012.net.il>; Tue, 03 Nov 2015 17:39:40 +0200 (IST) In-reply-to: <86y4ef16ha.fsf@stephe-leake.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:108351 Archived-At: > From: Stephen Leake > Date: Tue, 03 Nov 2015 08:51:29 -0600 > Cc: 21816@debbugs.gnu.org > > >> The canonical solution for case-insensitive string comparisons is to use > >> `downcase' on both values before using `equal'. This works for me: > > > > It works for me too, though I get a whole bunch of warnings running the > > test: > > > > c:/devel/emacs/repo/trunk/test/automated/elisp-mode-tests.el and > > c:/Devel/emacs/repo/trunk/test/automated/elisp-mode-tests.el are the same > > file > > Which is why I always put the right case in `load-path' :). You cannot rely on that, in general. File names don't have to come from load-path, and load-path is not entirely under your control. > There's probably a way (other than fixing your load-path) to suppress > those warnings; ert can redirect errors in general. I did not look into > it. > > More worrisome is this from the byte compiler: > > In xref-elisp-test-run: > ../../../master/test/automated/elisp-mode-tests.el:185:57:Warning: Unknown > slot `:location' > ../../../master/test/automated/elisp-mode-tests.el:189:60:Warning: Unknown > slot `:location' > > yet the code runs and the tests pass. Changing ":location" to "location" > fixes the warning. > > There are also several "unused lexical arg" warnings; see the WORKAROUND > comment. > > >> If no one objects to this, I'll commit it. > > > > Please do, thanks. > > Done. Sorry to bust this party, guys, but I don't think this solution is "good enough". First, it won't DTRT with Windows file names that have backslashes (yes, they happen in Emacs). Second, 'downcase' has a known gotcha of using the current buffer's case tables, which is something you definitely don't want here. Bottom line, doing this "right" is not so trivial, and a dedicated function is a better solution, IMO. If you put it in files-x.el, it could be reused by other Lisp programs in the need of this. IME, it doesn't pay off to use such incomplete solutions, the result is an annoying, albeit minor, maintenance burden. It's much better IMO to fix this once and for all, then we could just forget about this issue. Thanks.