all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Karl Otness <karl@karlotness.com>
Cc: 34114@debbugs.gnu.org, kaushal.modi@gmail.com
Subject: bug#34114: 27.0.50: pdumper and themes with Emacs daemon
Date: Sat, 19 Jan 2019 09:05:48 +0200	[thread overview]
Message-ID: <83va2lazzn.fsf@gnu.org> (raw)
In-Reply-To: <CAGk_8XLaZh3yrhAbo7Dojwoz+hniiB-i_1VZwCLnF8Y4t7W=sA@mail.gmail.com> (message from Karl Otness on Fri, 18 Jan 2019 23:02:14 +0000)

> From: Karl Otness <karl@karlotness.com>
> Date: Fri, 18 Jan 2019 23:02:14 +0000
> Cc: Kaushal Modi <kaushal.modi@gmail.com>
> 
> I think I have found a change that fixes this issue. I haven't tested
> it too thoroughly, but it seems to work for me. The change is to call
> init_faces_initial from init_display_interactive even when Emacs is
> running as daemon.
> 
> In init_display_interactive in dispnew.c moving the lines:
> 
> > /* Set up faces of the initial terminal frame.  */
> > if (!noninteractive && NILP (Vinitial_window_system))
> >   init_faces_initial ();
> 
> from the end of the function so that they occur before the early
> return in the IS_DAEMON check (around line 6039) seems to fix the
> theme loading problem.

Thanks for identifying the code that's involved in this.

However, I'm not yet sure the solution you propose is the correct
one.  The way the code is written, it relies on the faces of the
initial frame to be initialized when Emacs is built, and then recorded
in the dumped Emacs.  With the pdumper approach, the record should be
in the emacs.pdmp file, and I'd expect it to be restored from there.

Why isn't this working?

If we want to repeat this initialization in the daemon when it starts
up, I'd like first to better understand the considerations for this
kind of situations: when we should fix such problems by recording and
restoring them to/from the dump file, and when we should run the
initialization code anew in the dumped Emacs.  The latter might mean
we cause more trouble elsewhere, because a lot of the code that runs
during startup expects stuff done in temacs to be available and ready
to use, not recomputed anew.

Daniel, can you comment on this aspect of the problem, including on
the more general issue?

In any case, if the proposed change is installed, it should not affect
the unexeced Emacs, so it IMO should be conditioned on
dumped_with_pdumper_p.  Unexeced Emacs should continue behaving as it
did before.

Thanks.





  parent reply	other threads:[~2019-01-19  7:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-17 11:15 bug#34114: 27.0.50: pdumper and themes with Emacs daemon Karl Otness
2019-01-17 20:01 ` Kaushal Modi
2019-01-17 20:38   ` Kaushal Modi
2019-01-18 23:02     ` Karl Otness
2019-01-18 23:23       ` Daniel Colascione
2019-01-18 23:37         ` Karl Otness
2019-01-18 23:49           ` Daniel Colascione
2019-01-19  0:09             ` Karl Otness
2019-01-19  7:05       ` Eli Zaretskii [this message]
2019-01-21 22:59         ` Daniel Colascione
2019-01-22 16:28           ` Kaushal Modi
2019-01-22 16:45           ` Eli Zaretskii
2019-01-23  1:41             ` Daniel Colascione
2019-01-23  3:43               ` Eli Zaretskii
2019-01-23  4:05                 ` Daniel Colascione
2019-01-23  5:32                   ` Eli Zaretskii
2019-01-23  6:48                     ` Daniel Colascione
2019-01-24 15:11                       ` Eli Zaretskii
2019-01-24 19:22                         ` Karl Otness
2019-01-26 10:22                           ` Eli Zaretskii
2019-01-27 18:40                             ` Kaushal Modi

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=83va2lazzn.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=34114@debbugs.gnu.org \
    --cc=karl@karlotness.com \
    --cc=kaushal.modi@gmail.com \
    /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.