all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: phillip.lord@russet.org.uk (Phillip Lord)
To: npostavs@users.sourceforge.net
Cc: 25360@debbugs.gnu.org
Subject: bug#25360: File mode specification errors during building
Date: Thu, 19 Jan 2017 10:45:51 +0000	[thread overview]
Message-ID: <8737gf8h0g.fsf@russet.org.uk> (raw)
In-Reply-To: <8737ghxjce.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net's message of "Tue, 17 Jan 2017 20:11:45 -0500")

npostavs@users.sourceforge.net writes:

> phillip.lord@russet.org.uk (Phillip Lord) writes:
>
>> Glenn Morris <rgm@gnu.org> 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 used 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
> ¥magic-fallback-mode-alist¦.)
>     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





  reply	other threads:[~2017-01-19 10:45 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-04 20:28 bug#25360: File mode specification errors during building Glenn Morris
2017-01-07  8:03 ` Eli Zaretskii
2017-01-09 13:06   ` Phillip Lord
2017-01-10 10:21 ` Phillip Lord
2017-01-10 15:13   ` Eli Zaretskii
2017-01-10 18:40     ` Phillip Lord
2017-01-10 18:48       ` Eli Zaretskii
2017-01-13 14:08         ` Phillip Lord
2017-01-13 14:19           ` Eli Zaretskii
2017-01-13 21:31             ` Phillip Lord
2017-01-14 19:09               ` Glenn Morris
2017-01-15 22:05                 ` Phillip Lord
2017-01-15 23:53                   ` npostavs
2017-01-16  0:07                     ` Phillip Lord
2017-01-16  0:27                       ` npostavs
2017-01-17 17:38                       ` Glenn Morris
2017-01-17 21:49                         ` Phillip Lord
2017-01-17 17:42                     ` Glenn Morris
2017-01-17 22:04                       ` Phillip Lord
2017-01-18  1:11                         ` npostavs
2017-01-19 10:45                           ` Phillip Lord [this message]
2017-01-19 16:05                             ` Eli Zaretskii
2017-01-19 17:06                               ` Noam Postavsky
2017-01-20 13:43                                 ` Phillip Lord
2017-01-21 21:11                                 ` Phillip Lord
2017-01-23 12:44                                   ` Phillip Lord
2017-01-23 14:16                                     ` npostavs
2017-01-24 12:42                                       ` Phillip Lord
2017-01-24 13:12                                         ` npostavs
2017-01-23 15:38                                     ` Eli Zaretskii
2017-01-24 12:51                                       ` Phillip Lord
2017-01-24 15:52                                         ` Eli Zaretskii
2017-02-06 10:31                                           ` Phillip Lord
2017-02-06 15:41                                             ` Eli Zaretskii
2017-02-13  2:06                                               ` Glenn Morris
2017-02-13  2:15                                                 ` Glenn Morris
2017-02-13  2:22                                                   ` Glenn Morris
2017-02-14 13:46                                                   ` Phillip Lord
2017-02-19  0:36                                                     ` Glenn Morris
2017-02-19 21:40                                                       ` Phillip Lord
2017-02-22 19:08                                                         ` Glenn Morris
2017-03-01 16:55                                                         ` Phillip Lord
2017-03-02 15:20                                                           ` Eli Zaretskii
2017-03-02 17:57                                                             ` martin rudalics
2017-03-02 20:12                                                               ` Eli Zaretskii
2017-03-04 10:02                                                             ` Eli Zaretskii
2017-03-04 10:32                                                               ` Phillip Lord
2017-03-04 11:11                                                                 ` Eli Zaretskii
2017-03-04 11:28                                                                   ` Eli Zaretskii
2017-03-06 15:33                                                                     ` Phillip Lord
2017-03-06 19:56                                                                       ` Noam Postavsky
2017-03-06 20:53                                                                         ` Eli Zaretskii
2017-03-06 21:10                                                                           ` Noam Postavsky
2017-03-06 21:25                                                                           ` Phillip Lord
2017-03-07  3:31                                                                             ` Eli Zaretskii
2017-03-07 12:26                                                                               ` Phillip Lord
2017-03-07 15:28                                                                                 ` Phillip Lord
2017-03-07 16:01                                                                                   ` Eli Zaretskii
2017-03-07 18:25                                                                                     ` Noam Postavsky
2017-03-07 19:35                                                                                       ` Phillip Lord
2017-03-08 12:31                                                                                     ` Phillip Lord
2017-03-07 15:51                                                                                 ` Eli Zaretskii
2017-03-05 18:26                                                                 ` Andy Moreton
2017-03-05 18:58                                                                   ` Phillip Lord
2017-03-05 20:08                                                                     ` Eli Zaretskii
2017-03-06 12:07                                                                       ` Andy Moreton
2017-03-06 16:31                                                                         ` Phillip Lord
2017-03-06 23:26                                                                           ` Andy Moreton
2017-03-06 16:30                                                                       ` Phillip Lord
2017-03-06 18:38                                                                         ` Eli Zaretskii
2017-01-25 22:46                                     ` Glenn Morris
2017-01-27 16:25                                       ` Phillip Lord
2017-02-13  2:07                                         ` Glenn Morris
2017-01-13 14:22           ` Eli Zaretskii
2017-01-13 16:47             ` Phillip Lord
2017-01-10 17:47   ` Glenn Morris
2017-01-10 18:50     ` Phillip Lord
2017-01-11 16:36     ` Richard Stallman
2017-01-13 14:05       ` Phillip Lord

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8737gf8h0g.fsf@russet.org.uk \
    --to=phillip.lord@russet.org.uk \
    --cc=25360@debbugs.gnu.org \
    --cc=npostavs@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.