From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.devel Subject: Re: PACKAGE-FEATURES, and hot update of Emacs packages Date: Sun, 28 Nov 2021 20:22:01 +1300 Message-ID: <1b4dbbf030bcb92ea47c46efa4c246f3@webmail.orcon.net.nz> References: <5C502136-57BD-40D4-A1E8-A4313AD7CDFC@stanford.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34873"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Orcon Webmail Cc: emacs-devel@gnu.org To: Qiantan Hong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 28 08:23:23 2021 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 1mrEWw-0008up-PP for ged-emacs-devel@m.gmane-mx.org; Sun, 28 Nov 2021 08:23:22 +0100 Original-Received: from localhost ([::1]:40468 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrEWu-0008G8-Vo for ged-emacs-devel@m.gmane-mx.org; Sun, 28 Nov 2021 02:23:20 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60528) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrEVj-0006sP-NX for emacs-devel@gnu.org; Sun, 28 Nov 2021 02:22:07 -0500 Original-Received: from smtp-1.orcon.net.nz ([60.234.4.34]:34105) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrEVh-0002Jx-N8 for emacs-devel@gnu.org; Sun, 28 Nov 2021 02:22:07 -0500 Original-Received: from [10.253.37.70] (port=46496 helo=webmail.orcon.net.nz) by smtp-1.orcon.net.nz with esmtpa (Exim 4.90_1) (envelope-from ) id 1mrEVd-000592-FB; Sun, 28 Nov 2021 20:22:01 +1300 Original-Received: from ip-115-69-175-77.kinect.net.nz ([115.69.175.77]) via [10.253.37.253] by webmail.orcon.net.nz with HTTP (HTTP/1.1 POST); Sun, 28 Nov 2021 20:22:01 +1300 In-Reply-To: X-Sender: psainty@orcon.net.nz X-GeoIP: -- Received-SPF: pass client-ip=60.234.4.34; envelope-from=psainty@orcon.net.nz; helo=smtp-1.orcon.net.nz X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:280373 Archived-At: On 2021-11-28 09:36, Qiantan Hong wrote: > This require the user to reload the file. Yes indeed. Or rather, it *supports* them reloading the file. > Currently if the old package is not unloaded, the feature is still > present and (require p) does nothing. Certainly `require' won't do anything, but nothing prevents you from using `load-library' for for the same list of libraries that you were planning to unload. You can't be certain that's going to be safe, though. Reloading a library is expected to be safe when the code is unchanged, but there's no requirement that I'm aware of to support loading new code over the old code -- that will often be fine in practice, but there's loads of scope for it not to be. And as before, I don't think it's valid to unload things (even if you could be confident that everything supported being unloaded) because you destroy the configuration. I can't think of a way to reliably do what you're suggesting in the general case. Each approach will work in certain circumstances, but I don't think any approach is *generally* reliable. Libraries could probably declare themselves as supporting reloading if the author believed that to be the case, and you could have an automated reload sequence if everything claimed to support it. -Phil