From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#21563: 24.5; discourage load-hook variables Date: Thu, 16 Jan 2020 08:15:58 -0800 (PST) Message-ID: References: <39185.7955.374134.22021@gargle.gargle.HOWL> <87tv4w1poj.fsf@marxist.se> <87muaoz2qu.fsf@marxist.se> <320a9fa6-6419-420e-ac97-9dcbe54a04a6@default> <87h80wz0dm.fsf@marxist.se> <80b979c0-0fdf-4b84-bf1b-cde0a596f8bb@default> <87tv4vy19c.fsf@marxist.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="52252"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Roland Winkler , 21563@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 16 17:18:16 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1is7qa-000DPG-NB for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Jan 2020 17:18:16 +0100 Original-Received: from localhost ([::1]:44496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1is7qZ-0006z5-KE for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Jan 2020 11:18:15 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39700) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1is7pP-0005or-Cu for bug-gnu-emacs@gnu.org; Thu, 16 Jan 2020 11:17:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1is7pO-0007aI-BP for bug-gnu-emacs@gnu.org; Thu, 16 Jan 2020 11:17:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60550) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1is7pO-0007a9-8C for bug-gnu-emacs@gnu.org; Thu, 16 Jan 2020 11:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1is7pO-00019b-4V for bug-gnu-emacs@gnu.org; Thu, 16 Jan 2020 11:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Jan 2020 16:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21563 X-GNU-PR-Package: emacs Original-Received: via spool by 21563-submit@debbugs.gnu.org id=B21563.15791913704372 (code B ref 21563); Thu, 16 Jan 2020 16:17:02 +0000 Original-Received: (at 21563) by debbugs.gnu.org; 16 Jan 2020 16:16:10 +0000 Original-Received: from localhost ([127.0.0.1]:38290 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1is7oY-00018S-Fe for submit@debbugs.gnu.org; Thu, 16 Jan 2020 11:16:10 -0500 Original-Received: from userp2120.oracle.com ([156.151.31.85]:33502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1is7oW-000187-Ef for 21563@debbugs.gnu.org; Thu, 16 Jan 2020 11:16:08 -0500 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 00GGCSMp127917; Thu, 16 Jan 2020 16:16:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=svoMmCqgwI6mYoql6c4aguA2OHFtsZ8j8luFXhjnqkw=; b=mG+0ycoyhGWi7FjW+XdgVaudVB1e5dHD7Ib/HB3gF1ZPo+2vsmTDKoKnG/gbESL0E7Xk hn6c3/2g9a6z1Dfzo2GIGuRJEm4JvDrmc+/0bNJIP7Yi008X7y18PesNxffa2RCwdEL7 Z1eceU5eM4IdPoB94gcn2UXWxt6DnTpWusJ5OhhP6bO77of07KmFgyYD/7W5phdwLiPE ojNbS7gJIaWPcUOGZomKZ+vJI9xFV8wex0DvE4O1rlWyLB5ABrIe9vSZDSpSBnWxNjmT 3AjwRQMcd/gOp5s+B6kt9/NxXyUb3yR90FdVqBZfmZi12c2o8RitfLWJ8prz09Bg5n5l rQ== Original-Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 2xf73yuh28-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 Jan 2020 16:16:02 +0000 Original-Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 00GG4Hro168442; Thu, 16 Jan 2020 16:16:02 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3020.oracle.com with ESMTP id 2xj1ptbpxq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 Jan 2020 16:16:01 +0000 Original-Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 00GGFxic003617; Thu, 16 Jan 2020 16:16:00 GMT In-Reply-To: <87tv4vy19c.fsf@marxist.se> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4939.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9502 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2001160133 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9502 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2001160133 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:174730 Archived-At: > To summarize what has come up in this thread so far, the load-hook > convention has the following problems: >=20 > 1. They are never called if set by a user after a library is loaded. > 2. They can lead to issues like Bug#24491. > 3. They require every package (that wants to use them) to add boiler > plate code. >=20 > They are also redundant since we have eval-after-load and > with-eval-after-load, which do not have any of the above problems. Here's what I'd suggest, if you are bent on removing all load hooks and deprecating them: 1. Try removing all of them from the vanilla (distributed) Elisp code. 2. Run with that for a major release or two. If no problems, then deprecate (declare obsolete). Doing the second first (at the outset) makes no sense to me. Try it first. Those hooks were added, over time, at specific spots in the Emacs code for a reason, presumably - at least some of them were deliberate, we can suppose. (Load hooks were never added to "every package". And I doubt that, at least in some cases, they were just added as "boiler plate code". Please try to find out why given a package "wants to use them" before removing.) I don't see why it would make sense to just suppose that this is all unnecessary cruft, and tell users to start removing their own such, without any trial of removing it from the Emacs code first.