From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: phillip.lord@russet.org.uk (Phillip Lord) Newsgroups: gmane.emacs.bugs Subject: bug#25360: File mode specification errors during building Date: Thu, 19 Jan 2017 10:45:51 +0000 Message-ID: <8737gf8h0g.fsf@russet.org.uk> References: <8760lndxlz.fsf@russet.org.uk> <83bmvfdk2r.fsf@gnu.org> <8737gqsqqr.fsf@russet.org.uk> <83ziiyda4y.fsf@gnu.org> <87inpj1288.fsf@russet.org.uk> <834m13caay.fsf@gnu.org> <87k29ylk8h.fsf@russet.org.uk> <87mvest1vz.fsf@russet.org.uk> <87h94zyj5s.fsf@users.sourceforge.net> <1760ldfurw.fsf@fencepost.gnu.org> <87k29t4a3d.fsf@russet.org.uk> <8737ghxjce.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1484822845 21450 195.159.176.226 (19 Jan 2017 10:47:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 19 Jan 2017 10:47:25 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.91 (gnu/linux) Cc: 25360@debbugs.gnu.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 19 11:47:16 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1cUAFJ-0004OP-0t for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Jan 2017 11:47:09 +0100 Original-Received: from localhost ([::1]:47073 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cUAFN-000689-Oi for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Jan 2017 05:47:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55595) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cUAFF-00066u-4p for bug-gnu-emacs@gnu.org; Thu, 19 Jan 2017 05:47:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cUAFC-0002Ts-1l for bug-gnu-emacs@gnu.org; Thu, 19 Jan 2017 05:47:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37015) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cUAFB-0002Tm-U3 for bug-gnu-emacs@gnu.org; Thu, 19 Jan 2017 05:47:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cUAFB-0003gx-OG for bug-gnu-emacs@gnu.org; Thu, 19 Jan 2017 05:47:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: phillip.lord@russet.org.uk (Phillip Lord) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Jan 2017 10:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25360 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25360-submit@debbugs.gnu.org id=B25360.148482276514119 (code B ref 25360); Thu, 19 Jan 2017 10:47:01 +0000 Original-Received: (at 25360) by debbugs.gnu.org; 19 Jan 2017 10:46:05 +0000 Original-Received: from localhost ([127.0.0.1]:35214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUAEH-0003ff-0A for submit@debbugs.gnu.org; Thu, 19 Jan 2017 05:46:05 -0500 Original-Received: from mailgw.mycpanelcloud.co.uk ([185.116.214.205]:59889) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUAED-0003eu-T2 for 25360@debbugs.gnu.org; Thu, 19 Jan 2017 05:46:03 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by mailgw.mycpanelcloud.co.uk (Postfix) with ESMTP id C52D9C5F73 for <25360@debbugs.gnu.org>; Thu, 19 Jan 2017 10:45:32 +0000 (GMT) X-Virus-Scanned: by SpamTitan at mycpanelcloud.co.uk Original-Received: from mailgw.mycpanelcloud.co.uk (localhost [127.0.0.1]) by mailgw.mycpanelcloud.co.uk (Postfix) with ESMTP id D23FAC6067 for <25360@debbugs.gnu.org>; Thu, 19 Jan 2017 10:45:30 +0000 (GMT) Original-Received: from cloud103.planethippo.com (cloud103.planethippo.com [31.216.48.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailgw.mycpanelcloud.co.uk (Postfix) with ESMTPS id BB603C5FA3 for <25360@debbugs.gnu.org>; Thu, 19 Jan 2017 10:45:30 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=pBwck2LQnxOEI971ezs9gqwkCXwFec6TC7BiVnUfNx8=; b=A4V29vuKUwejO+OPIzyl5wx+Mz vdeWSMw4uB4tHpZV1oEHnwjqnc2jF2y0zaA5mTCyFzfTdHX0VkWbIw6c0guCXzpF++CVLx1BbTYbU Fpv6sTM0yHt7alubx82nO58ct6+JJlNR5BzCDH9pCXvVl11s/xdsBphCEAP5YV6F6I1q594jLdEY1 woOQswwZBUGrjsXFKKC+uphCoa7Nc6Ip1Qn69MK7hHLLUzEJe60ALCGOsKIefeiRpZzqdFYzft0MR avu11bD46U+IXOnJ5KRrGnYy3rjbXZ/jgJhjW7WJNBUNVKHCfyPoCu0fr0xGetHFEsJgbuLENc1/h IL1N6sUg==; Original-Received: from janus-nat-128-240-225-37.ncl.ac.uk ([128.240.225.37]:54321 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87) (envelope-from ) id 1cUAE5-0007Ft-CU; Thu, 19 Jan 2017 10:45:53 +0000 In-Reply-To: <8737ghxjce.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net's message of "Tue, 17 Jan 2017 20:11:45 -0500") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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" Xref: news.gmane.org gmane.emacs.bugs:128231 Archived-At: npostavs@users.sourceforge.net writes: > phillip.lord@russet.org.uk (Phillip Lord) writes: > >> Glenn Morris writes: >> >>> npostavs@users.sourceforge.net wrote: >>> >>>> Using insert-file-contents instead of file-file-noselect seems to fix = it >>>> for me: >>> >>> That sounds like a good change anyway. (I forget, does this respect >>> "coding:"? Does this even matter in this case?) >> >> I think, no, it doesn't respect coding, but that it doesn't matter. > > I believe it does respect "coding:" in general (at least it looks like > there are some comments to that effect in Finsert_file_contents), but > indeed it doesn't matter in this case because we're let-binding > `coding-system-for-read' which overrides that. I have checked this now with a full bootstrap and it appears not to work, unfortunately -- the .el files that are generated are broken (this isn't obvious until they fail to byte-compile -- you have let the build complete). So, find-file-noselect is doing something that insert-file-contents is not. >>> (But it still seems like a potential problem to me if functions that us= ed to >>> be available early in the build no longer are.) >> >> It shouldn't be, if they are not being called. >> >> Anyway, the cause of the error in this case is this line in files.el. >> >> (assoc-default nil magic-fallback-mode-alist >> (lambda (re _dummy) >> (if (functionp re) >> (funcall re) >> (looking-at re))))))) >> >> This is called when loading cangjie-table.b5 with >> 'image-type-auto-detected-p as the first parameter. Normally, the >> condition returns "t", but in this case it will return f, then >> the looking-at form fails with the error given. I don't understand which >> this process does not happen during the build which generates >> ldefs-boot-auto.el. > > Would it help to use a --without-x build to generate ldefs-boot-auto.el? I'm a little loath to do this, because if a developer wants to run this, it will reconfigure their build. I've tried instead disabling all the "optional" statements in loadup.el when building the bootstrap binary. bootstrap-emacs doesn't use images or toolbars anyway. Will work up a patch tonight. > >> + (t (error "Problem with `magic-mode-alist'.")) > > I'm not sure this improves the error message ("Problem" seems a bit > vague). Before: > > Converting cangjie-table.b5 to tsang-b5.el... > File mode specification error: (wrong-type-argument stringp > image-type-auto-detected-p) > Converting cangjie-table.b5 to tsang-b5.el...done > > After (applying only the lisp/files.el part of your patch): > > Converting cangjie-table.b5 to tsang-b5.el... > File mode specification error: (error Problem with > =C2=A5magic-fallback-mode-alist=C2=A6.) > Converting cangjie-table.b5 to tsang-b5.el...done > > Perhaps add in the problematic element to the message? Something along > the lines of (error "Bad `magic-mode-alist' element: %S" re). Yes, realised I can't use backquotes in error messages. Your change is reasonable. In practice, I think, only developers are likely to see this, and either of these messages is grepable, unlike the wrong-type-argument message. Phil