From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Caio Henrique Newsgroups: gmane.emacs.devel Subject: Re: Include leaf in Emacs distribution Date: Tue, 13 Oct 2020 12:25:08 -0300 Message-ID: <87blh6cfmz.fsf@gmail.com> References: <20201008.103747.1339582189858984269.conao3@gmail.com> <20201012.103522.1802478978485184324.conao3@gmail.com> <87a6wrm5m0.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40128"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Caio Henrique , Naoya Yamashita , Stefan Kangas , johnw@gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 13 17:27:39 2020 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 1kSMDC-000AHW-VC for ged-emacs-devel@m.gmane-mx.org; Tue, 13 Oct 2020 17:27:38 +0200 Original-Received: from localhost ([::1]:58032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSMDC-0004Bn-1Q for ged-emacs-devel@m.gmane-mx.org; Tue, 13 Oct 2020 11:27:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55838) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSMB6-00035J-Hk for emacs-devel@gnu.org; Tue, 13 Oct 2020 11:25:29 -0400 Original-Received: from mail-qv1-xf41.google.com ([2607:f8b0:4864:20::f41]:42574) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kSMB0-0001aI-EC; Tue, 13 Oct 2020 11:25:28 -0400 Original-Received: by mail-qv1-xf41.google.com with SMTP id 13so156943qvc.9; Tue, 13 Oct 2020 08:25:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=sal7JMFv/27fEiA/uJ+kIs5EEc8rzJ9+MBdXKM5dfwY=; b=EZ59UnrR7W2RycSIzg9ko5aQIE8M1hxV76cGSRgySksE37PI1k+aFv/UMoROsnSMAd 99FERkC4HtAZiyDZcUqRA781eR+Abn1a7qdGNsu/RO62JP1nCMr5i4yrsL4fcteJopDT yJCo6gg1uysw4qpibkJPpP7U3j97W51v82eaE2pBPt9/f20Lx+Kp6STQK6zsHd1l23Tm zwK14zdfcv6vxwnx6CAJH0MdABV3J5+KLlZ627loGCsNRyyFKNA2BjRTtbRJ046VxeAP Y1Wgk76r5+2SSBNQciHDhERHbROXGTAI4qtRm1n+qLuU5NNwvPEKmAOy23hOVB08v7es DjpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=sal7JMFv/27fEiA/uJ+kIs5EEc8rzJ9+MBdXKM5dfwY=; b=tU5dhIpVDfftW28PoBVacCJ1Nw8jKZfVfyaIoXdunOuJ1uACl8M65So+Q6l6dG/4ec +WDjDm0RcoVjO7zOLym4IwdnYZIzKF2UXQiRKB2WpgMsht9CwsWjsAn+bKteGzvibB6R sTfe/T9v212pOHzFW3TG7MpQswCFfIai/khek58pxc/lilVYnFy1VQMPHMXv3mkpkXN1 tsQosaqLLExAn930Gck+ajV5GYQSCSW2sgn+kEM+wTcL4uPJxyve6JaU2jJJyWqXUgZg SCk6fLgqZIYeZbSumrMupmexRrVmDAjF9NGT5VnjgFbcYOwVtmUZH+xj8dHqsTcL+MBK zXIQ== X-Gm-Message-State: AOAM531zlYgHM4+44xn28V1yiazxeGNAvKWf9e2pLptygcni4PNR1HL1 ka951ZtVsiHiWrGsKij4pBcNAUIj4ZA= X-Google-Smtp-Source: ABdhPJyLkTM30c2OrOD+o/D8opq7MvuAz9e3o82iKPvx9vEFcEW4JavQLnpZ6/Fp8orX2snz18PRKA== X-Received: by 2002:ad4:40c6:: with SMTP id x6mr315431qvp.20.1602602720765; Tue, 13 Oct 2020 08:25:20 -0700 (PDT) Original-Received: from localhost.localdomain ([181.223.151.236]) by smtp.gmail.com with ESMTPSA id p136sm75295qke.25.2020.10.13.08.25.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Oct 2020 08:25:19 -0700 (PDT) X-Google-Original-From: Caio Henrique In-Reply-To: (Stefan Monnier's message of "Tue, 13 Oct 2020 09:23:28 -0400") Received-SPF: pass client-ip=2607:f8b0:4864:20::f41; envelope-from=caiohcs0@gmail.com; helo=mail-qv1-xf41.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, 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.23 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:257540 Archived-At: Stefan Monnier writes: >> IMO it would help with the "emacs wizard" proposal. For instance, if >> there is a "install undo-tree and enable it globally" option on the >> wizard, it could generate something like this on the emacs init file: >> >> (use-package undo-tree >> :ensure t >> :diminish undo-tree-mode >> :config (global-undo-tree-mode)) > > Why not just use > > (global-undo-tree-mode 1) > > ? > > Assuming the `gnu-elpa` package is installed (which I'd hope we could > bundle with Emacs-28), then it should do pretty much the same as your > `use-package` code above, except for the `diminish` which seems > orthogonal (if we think it should be diminished by default, then we > should change undo-tree accordingly). > > > Stefan That was just a simple example from my init file to try to show that use-package or leaf could help to keep package configurations more consistent and that it could be used by the code generated by the "emacs wizard", thus we have reasons to include use-package or leaf on the Emacs core. So I was not suggesting to add undo-tree or diminish on the "emacs wizard". Imagine that we have a lot of recipes on the "emacs wizard" for several different packages with more complex declarations, in this case use-package or leaf can keep things more organized and consistent. (I know that this is subjective.) Here are some more examples from my init file: (use-package ivy :straight t :diminish ivy-mode :defer 0.9 :config (use-package swiper :straight t :bind (("C-s" . swiper) ("C-M-s" . swiper-thing-at-point))) (use-package counsel :straight t :diminish counsel-mode :config (counsel-mode)) (use-package ivy-avy :straight t) (ivy-mode)) (use-package company :straight t :commands company-mode :bind (:map company-active-map ("C-n" . 'company-select-next) ("C-p" . 'company-select-previous)) :config (use-package company-quickhelp :straight t :hook (company-mode . company-quickhelp-local-mode))) (use-package lsp-mode :straight t :hook ((c++-mode . lsp) (c-mode . lsp) (js-mode . lsp) (python-mode . lsp)))