From: Eli Zaretskii <eliz@gnu.org>
To: martin rudalics <rudalics@gmx.at>
Cc: lekktu@gmail.com, 37415@debbugs.gnu.org
Subject: bug#37415: Asserting failure setting frame parameters to non-fixnum values in early-init.el
Date: Sat, 21 Sep 2019 12:14:16 +0300 [thread overview]
Message-ID: <83r24aqadz.fsf@gnu.org> (raw)
In-Reply-To: <7b896377-d546-b428-adba-797ec988c4fa@gmx.at> (message from martin rudalics on Sat, 21 Sep 2019 10:51:49 +0200)
> Cc: lekktu@gmail.com, 37415@debbugs.gnu.org
> From: martin rudalics <rudalics@gmx.at>
> Date: Sat, 21 Sep 2019 10:51:49 +0200
>
> I get a similar backtrace when I try the more reasonable
>
> (setq default-frame-alist '((left . (- 100))))
>
> in my early-init.el (more reasonable because, after all,
>
> (setq default-frame-alist '((left . (+ 0))))
>
> is equivalent to
>
> (setq default-frame-alist '((left . 0)))
>
> which _can_ be handled from within early-init.el). Do we agree so
> far? If so, then obviously
>
> if (EQ (left, Qunbound))
> coords[0] = CW_USEDEFAULT;
> else
> coords[0] = XFIXNUM (left);
>
> will choke when 'left' is something like '(+ 0)' or '(- 100)' since
> neither of these pass the
>
> eassert (FIXNUMP (a))
>
> check we have in XFIXNUM. Still agreed? Then doing something like
>
> if (FIXNUMP (left))
> coords[0] = XFIXNUM (left);
> else
> coords[0] = CW_USEDEFAULT;
>
> should fix the assertion failure if my poor understanding of C doesn't
> let me down completely (the 'top' parameter needing a similar fix).
> Does that reasoning still make sense to you?
>
> And finally, with the sole evidence of my poor eyesight,
>
> (setq default-frame-alist '((left . (- 100))))
>
> seems to work here too, despite of the fact that for the first frame
> the defaults are used. Maybe you can try to verify (I attach the
> patch for easier use this time).
Thanks, but I probably should have explain the nature of my confusion
better (and would have done that, should I know you will act upon it
so seriously). Sorry about that.
Here's what confused me in this problem:
. the FIXNUMP assertion is probably there for a reason; what is that
reason?
. how come we don't hit this assertion when the same expression is
in the init file, only in the early-init file?
. why doesn't the X build hit the same assertion in the same
scenario?
I'm probably missing something because I don't find answers to these
questions anywhere in what you wrote. I do understand the "mechanics"
of the patch, I just cannot convince myself it's the right fix,
without being able to answer these questions, and then assess the fix
with that knowledge in hand. Which shouldn't prevent you from
installing it, of course: I don't have to understand everything in
what's going on in Emacs development.
> So do you still think that we should signal an error?
A red herring: I only proposed to signal an error if we cannot find a
better solution for this use case.
next prev parent reply other threads:[~2019-09-21 9:14 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-15 22:34 bug#37415: Asserting failure setting frame parameters to non-fixnum values in early-init.el Juanma Barranquero
2019-09-17 16:01 ` Eli Zaretskii
2019-09-17 17:04 ` Juanma Barranquero
2019-09-18 7:45 ` martin rudalics
2019-09-18 12:31 ` Eli Zaretskii
2019-09-19 8:17 ` martin rudalics
2019-09-19 14:13 ` Eli Zaretskii
2019-09-20 8:13 ` martin rudalics
2019-09-20 19:08 ` Eli Zaretskii
2019-09-21 8:51 ` martin rudalics
2019-09-21 9:14 ` Eli Zaretskii [this message]
2019-09-21 10:02 ` Juanma Barranquero
2019-09-21 12:27 ` Eli Zaretskii
2019-09-22 5:54 ` Juanma Barranquero
2019-09-22 8:09 ` martin rudalics
2019-09-22 16:26 ` Eli Zaretskii
2019-09-22 8:08 ` martin rudalics
2019-09-22 16:43 ` Eli Zaretskii
2019-09-22 17:54 ` martin rudalics
2019-09-22 18:19 ` Eli Zaretskii
2019-09-23 7:32 ` martin rudalics
2019-09-23 16:35 ` Eli Zaretskii
2019-09-24 6:45 ` martin rudalics
2019-09-24 7:41 ` Eli Zaretskii
2019-09-22 8:08 ` martin rudalics
2019-09-22 16:27 ` Eli Zaretskii
2019-09-22 17:53 ` martin rudalics
2019-09-22 18:16 ` Eli Zaretskii
2019-09-23 7:32 ` martin rudalics
2019-09-23 16:08 ` Eli Zaretskii
2019-09-21 4:25 ` Juanma Barranquero
2019-09-18 2:30 ` Paul Eggert
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83r24aqadz.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=37415@debbugs.gnu.org \
--cc=lekktu@gmail.com \
--cc=rudalics@gmx.at \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).