From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Configuration helpers (wad: Adding use-package to core) Date: Tue, 15 Nov 2022 11:24:42 -0500 Message-ID: References: <87fsemjs7v.fsf@yahoo.com> <87edu5izi9.fsf@yahoo.com> <83cz9pk5fb.fsf@gnu.org> <83a64tjuz8.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23320"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 15 17:25:50 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 1ouykv-0005sA-RO for ged-emacs-devel@m.gmane-mx.org; Tue, 15 Nov 2022 17:25:49 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ouyk9-0003s6-Ey; Tue, 15 Nov 2022 11:25:01 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ouyk5-0003rl-Bu for emacs-devel@gnu.org; Tue, 15 Nov 2022 11:24:57 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ouyk3-0008VV-9U for emacs-devel@gnu.org; Tue, 15 Nov 2022 11:24:56 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id A1C2A100142; Tue, 15 Nov 2022 11:24:44 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 081101000F8; Tue, 15 Nov 2022 11:24:43 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1668529483; bh=n/5gixqFNUI5Ukc0Kig8A0sc7GO3/orLquISnVP7Smg=; h=From:To:Subject:In-Reply-To:References:Date:From; b=fe8+XHT6TyiTJQzQzVT4VxNjCfTEvZHavMhyZuXeJQ8FcjzDyZFHffXgzje2Mcc7p Rz1a7oas8yznxZCDtq9iFwF3J6P/sUTuq41Mk8O4m+4rzLPLV5fjgqCn/lYM9Affjl FtQxN27pUU01+EXvdhYFGUiaWReB4f2YJ6iwrOgg5W/QunTvxAoFmWTemZJpM+7G50 fWTPfQka3SCkzb/f42CzrrduH88gokjuFA7nMiWhGbJ5o+EMuv2ZRlWrVtWdHgZbVH Gr+2nhJ+gzHrg/+laxyNuOMXpirhp3WwCNzK8aY6n8W6f1H+6e1NEWoKTwjYcir0Ax ogN84w+p3fw1Q== Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id EF0E2120C8E; Tue, 15 Nov 2022 11:24:42 -0500 (EST) In-Reply-To: (xenodasein's message of "Tue, 15 Nov 2022 16:38:10 +0100 (CET)") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:299856 Archived-At: BTW, While I'm happy to see `use-package` just reached GNU ELPA and I'm sure even more people would be happy if it made it into Emacs itself, `use-package` is solving an old problem and I hope someone will improve it (or some replacement) to solve new problems. Some of the problems I think need solving in users's config files are: - flymake: currently, flymake tends to flag a lot of configuration code because that code will be riddled with `setq` on variables that don't exist (yet) and calls to functions that don't exist (yet) either. A configuration system like use-package/setup/leaf provides some of the info needed to resolve this problem, but those packages have yet to be tweaked to explain to flymake what's going on. - idempotent: a good configuration system should make it "hard" to write non-idempotent code, and should aim to make it so re-reading your init file will give you almost the same result as restarting Emacs. E.g. if you change a hook function, the result should not be to have both the old hook function and the new hook function on that hook. Or if you remove the "add-hook" code, re-reading the init file should end up removing the hook that was previously added. Stefan