From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Suppressing native compilation (short and long term) Date: Thu, 06 Oct 2022 13:17:14 +0300 Message-ID: <831qrlqms5.fsf@gnu.org> References: <87bkqxf1ij.fsf@tethera.net> <8335c9dkyf.fsf@gnu.org> <83tu4odez7.fsf@gnu.org> <871qrrpkgx.fsf@trouble.defaultvalue.org> <834jwnbi6c.fsf@gnu.org> <87mtafnun5.fsf@trouble.defaultvalue.org> <83sfk6ahty.fsf@gnu.org> <87v8p1aiof.fsf@melete.silentflame.com> <87v8p01lbu.fsf@yahoo.com> <83lepwvzxq.fsf@gnu.org> <871qroyog9.fsf@yahoo.com> <837d1gvt35.fsf@gnu.org> <87sfk3yl10.fsf@yahoo.com> <87o7uqtlsl.fsf@yahoo.com> <83sfk2rzjs.fsf@gnu.org> <87k05du6x0.fsf@yahoo.com> <83tu4hqxp8.fsf@gnu.org> <87ilkxs9yg.fsf@yahoo.com> <83czb5qsyk.fsf@gnu.org> <87edvls2ho.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32969"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, akrl@sdf.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 06 12:49:09 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ogORA-0008P3-2s for ged-emacs-devel@m.gmane-mx.org; Thu, 06 Oct 2022 12:49:08 +0200 Original-Received: from localhost ([::1]:39186 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogOR8-0005HR-E7 for ged-emacs-devel@m.gmane-mx.org; Thu, 06 Oct 2022 06:49:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogNwK-0005Kw-8G for emacs-devel@gnu.org; Thu, 06 Oct 2022 06:17:16 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60740) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogNwI-0004Xj-BA; Thu, 06 Oct 2022 06:17:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=T08zesPBK3THeh34e97uS66xsF+ObtB2N05ssWIEOwQ=; b=obxs62JHpWt3 wPkCHfpPrfu2cQlk+cHrM7ZordGSXvfGLlAOMrIMHZKSvVeGFHfC7b9IMP70kQMCdNw+JLH78yZTs LLJNE/cHpoABp/S7gUCRT4WAqdpJItq6ev3Grh+eHT+dNy6+5jYpi4JF2x1ShbmWNETq9d98u7Y0H ELAH1rDg9IObUzbL7Q/Vqva5YO3RvGPMH4YHvYZ+W+DFN15nJHF0SurrbiQ9JXfk1LJfAWSRAl/1V 0U6Fy9BNcySlUX/MmVvI2PAKOfZg+Y+uXxrzzH2gP2zM3Oc9wAtHtrHlWa1X7cIXKqIA4vt0s9QRQ qG+q7uRjo5nLwcN9I5WScg==; Original-Received: from [87.69.77.57] (port=4460 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogNwH-00075U-A2; Thu, 06 Oct 2022 06:17:13 -0400 In-Reply-To: <87edvls2ho.fsf@yahoo.com> (message from Po Lu on Thu, 06 Oct 2022 17:52:35 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:297087 Archived-At: > From: Po Lu > Cc: emacs-devel@gnu.org, akrl@sdf.org > Date: Thu, 06 Oct 2022 17:52:35 +0800 > > Eli Zaretskii writes: > > > We could have such a feature, but how to implement it? If we use a > > timer for that, the timer itself will drain the battery. > > I think display-battery-mode users (I am one such user) will not agree > with that assessment. I didn't invent that, I've heard laptop users complain about timers. But okay, if it's acceptable to run a timer in order to re-enable compilation when AC power is plugged in, I'm okay with such an optional feature. Patches are welcome. > > And if defer it to the next invocation of the bytecode, we might never > > compile, because who can guarantee that the laptop is on AC when some > > arbitrary bytecode is executed? > > We could push it onto a list of files to native compile, the files in > which are then compiled once we detect the laptop starts to run on AC > power. You will see that comp.el already has a queue of files that await compilation. The new feature will newed to plug itself into that mechanism, I think. Unless Andrea has a better idea.