From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Phillip Lord" Newsgroups: gmane.emacs.help Subject: Re: using use-package Date: Tue, 28 Jun 2016 23:34:42 +0100 Message-ID: <4deb171d07e312f6e3cd3bae4317ac40.squirrel@cloud103.planethippo.com> References: <20150805055619.13567.17B26335@ahiker.mooo.com> <17131863-cbb8-4a85-8470-490fe9a0c0d4@googlegroups.com> <66dceb24-5fef-4316-8c8b-e9a3e62b0fb8@googlegroups.com> <3594e2c6-bd02-412f-98df-9dd0f145277a@googlegroups.com> <01b4d996-aad3-44ff-a580-7950b25b7dc8@googlegroups.com> <87r3nbh3n3.fsf@russet.org.uk> <0566e644-b87b-46f9-91a5-b9c38befd55e@googlegroups.com> <18cc3e7d62270dbe3e40bb2b73087b60.squirrel@cloud103.planethippo.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1467153387 19265 80.91.229.3 (28 Jun 2016 22:36:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Jun 2016 22:36:27 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "Stefan Monnier" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 29 00:36:13 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bI1c4-0001QK-J4 for geh-help-gnu-emacs@m.gmane.org; Wed, 29 Jun 2016 00:36:12 +0200 Original-Received: from localhost ([::1]:40224 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bI1c3-00056m-R0 for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Jun 2016 18:36:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36230) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bI1bS-0004vG-H1 for help-gnu-emacs@gnu.org; Tue, 28 Jun 2016 18:35:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bI1bO-00041h-7y for help-gnu-emacs@gnu.org; Tue, 28 Jun 2016 18:35:33 -0400 Original-Received: from cloud103.planethippo.com ([31.216.48.48]:57217) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bI1bN-0003sv-Tt for help-gnu-emacs@gnu.org; Tue, 28 Jun 2016 18:35:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Cc:To:From:Subject:Date:References:In-Reply-To:Message-ID; bh=WMyyTgeWF/1n8HBrceqJWvFCA1F8EU90DnQG5fspsc4=; b=NZTrnAK49UbDPqIDEyl715M56L euKUiYqw6qSJ6WQnyStT1xtgftw1UpuE2fl6okj9DvRs2HH7OuV2P9ACd0q/kh1XjiCjjvGHLkeVD nZWwfa/2xElcBzcJO0zGGqCl38fZFAUgoz2OYmsJSKjSjTXSkZVA8zJXjiljIYuqiE012gj8KwOft LDJlKHDVew7E0oiZEsgsm7vqNXTJjJEL1uMDfY3kt3PXkwT8m5HRkbx1C26ISVB1vwreU5YJZk6LL BlQQwJoeXE6phICquaHNAfAdNv5Xe1k5KoXg19CzNZhEo9fcHR114Bx5SrRihB6afjasnITSIa3XH pf+129Cg==; Original-Received: from [127.0.0.1] (port=50351 helo=cloud103.planethippo.com) by cloud103.planethippo.com with esmtpa (Exim 4.86_1) (envelope-from ) id 1bI1ac-002uny-D9; Tue, 28 Jun 2016 23:34:42 +0100 Original-Received: from 77.98.219.118 ([77.98.219.118]) (SquirrelMail authenticated user phillip.lord@russet.org.uk) by cloud103.planethippo.com with HTTP; Tue, 28 Jun 2016 23:34:42 +0100 In-Reply-To: User-Agent: SquirrelMail/1.5.2 [SVN] X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 31.216.48.48 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:110648 Archived-At: On Tue, June 28, 2016 11:05 pm, Stefan Monnier wrote: >>> Well I would have thought that needing eval-after-load and relatives >>> is evidence of a badly written (in Stefan's sense) package Yeah, I missed the "not" in this paragraph. > I do think it's a problem, but admittedly, the way keymaps are normally > setup there's no standard&easy way for the package to "do the right > thing". But not evidence of a badly written package:-) > IOW it's a failure of the general infrastructure offered by Emacs to > define and modify keymaps. I'd encourage anyone to try and come up with a > good solution to this problem (it'll probably require changing "all" > packages to use a new way to declare keymaps, but I think it's a price > worth paying). >>> For myself (as you seem to say) if use-package reduces all that >>> imperative gunk I guess I'll use it > > As for me, I don't think > > > (global-set-key (kbd "C-x C-b") 'electric-buffer-list) > (with-eval-after-load 'buff-menu > (define-key electric-buffer-menu-mode-map > (kbd "X") 'save-buffers-kill-emacs)) > > > is really worse than > > (use-package ebuff-menu > :bind (("C-x C-b" . electric-buffer-list) > :map electric-buffer-menu-mode-map > ("X" . save-buffers-kill-emacs))) > especially if you consider that the former uses functions and syntax which > is used throughout Emacs, whereas the latter uses a syntax that's defined > in an ad-hoc manner for use-package and isn't used elsewhere. use-package adds a bit of functionality (M-x describe-personal-keybindings). Of course, this only works because the latter is not used elsewhere. I agree it's marginal here. Phil