From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master cd06d17: Fix bug with face-id after restoring from pdump Date: Mon, 28 Jan 2019 22:19:55 +0200 Message-ID: <83pnsg3578.fsf@gnu.org> References: <20190128152540.6870.46132@vcs0.savannah.gnu.org> <20190128152541.12A4D20B50@vcs0.savannah.gnu.org> <83womo3b13.fsf@gnu.org> <0399e0969432494f47589251b26178da.squirrel@dancol.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="60653"; mail-complaints-to="usenet@blaine.gmane.org" Cc: dancol@dancol.org, emacs-devel@gnu.org To: "Daniel Colascione" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 28 21:20:19 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1goDOE-000FaI-I1 for ged-emacs-devel@m.gmane.org; Mon, 28 Jan 2019 21:20:18 +0100 Original-Received: from localhost ([127.0.0.1]:38208 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goDOD-00014e-8P for ged-emacs-devel@m.gmane.org; Mon, 28 Jan 2019 15:20:17 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:48984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goDO7-00014L-3S for emacs-devel@gnu.org; Mon, 28 Jan 2019 15:20:12 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58341) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goDO6-0004sO-RU; Mon, 28 Jan 2019 15:20:10 -0500 Original-Received: from [176.228.60.248] (port=2158 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1goDO5-000465-EW; Mon, 28 Jan 2019 15:20:10 -0500 In-reply-to: <0399e0969432494f47589251b26178da.squirrel@dancol.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:232779 Archived-At: > Date: Mon, 28 Jan 2019 11:37:07 -0800 > From: "Daniel Colascione" > Cc: "Daniel Colascione" , > emacs-devel@gnu.org > > > Based on previous discussion regarding frames and faces, I was under > > the impression that you prefer moving stuff to the startup of emacs. > > I'm not wed to my solution, feel free to change if you think it's > > better. > > The default approach to pretty much anything should be to use the first > entry in this implementation strategy that will work for a particular > problem. > > 1) Write it in Lisp > 2) Write it in C using Lisp data structures > 3) Use custom data structures in C, but allocated from the Lisp heap > 4) malloc some random stuff for a pure-C approach > > Right now, the face stuff is #3, but I think we could move it to #2 using > the approach in my previous message (just using an ordinary staticprod > Lisp_Object instead of a Lisp_Object* with a size field). Approaches #3 > and #4 need special code for pdumper to work, but #1 and #2 Just Work, and > to the greatest extent possible, we should use #1 or #2 for new feature > work too. It'll reduce the total amount of code we need. I wasn't talking about the implementation language and other details, I was talking about whether some initialization should be recorded in the pdump file or re-done anew in the emacs session. When something doesn't "just work" after restoring from pdump, the question is whether you add code to make it work as in unexec, or you just recompute the necessary variables in emacs.