From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Date: Thu, 18 Jun 2020 01:23:25 +0300 Message-ID: <783b3a39-62ca-46b5-83a4-1989e8ec2062@yandex.ru> References: <87blljbarq.fsf@thornhill.no> <83pn9z13xq.fsf@gnu.org> <87lfknklj8.fsf@thornhill.no> <83h7vb0w3u.fsf@gnu.org> <83968f43-1298-6c5a-b4fa-ba68b7a8042e@yandex.ru> <838sgl22f2.fsf@gnu.org> <87489b66-81f2-311d-cd81-9d344731577f@yandex.ru> <835zbp1wlf.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="73146"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 Cc: 41890@debbugs.gnu.org, theo@thornhill.no To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 18 00:24:11 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 1jlgTa-000ItY-SU for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 18 Jun 2020 00:24:10 +0200 Original-Received: from localhost ([::1]:57888 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jlgTZ-0001a5-Rd for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 17 Jun 2020 18:24:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60234) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jlgTS-0001Zt-El for bug-gnu-emacs@gnu.org; Wed, 17 Jun 2020 18:24:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40808) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jlgTS-0005iv-57 for bug-gnu-emacs@gnu.org; Wed, 17 Jun 2020 18:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jlgTS-0000Gz-05 for bug-gnu-emacs@gnu.org; Wed, 17 Jun 2020 18:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 17 Jun 2020 22:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41890 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 41890-submit@debbugs.gnu.org id=B41890.15924326151015 (code B ref 41890); Wed, 17 Jun 2020 22:24:01 +0000 Original-Received: (at 41890) by debbugs.gnu.org; 17 Jun 2020 22:23:35 +0000 Original-Received: from localhost ([127.0.0.1]:52354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlgT1-0000GJ-0Y for submit@debbugs.gnu.org; Wed, 17 Jun 2020 18:23:35 -0400 Original-Received: from mail-wr1-f49.google.com ([209.85.221.49]:36089) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlgSy-0000G5-Th for 41890@debbugs.gnu.org; Wed, 17 Jun 2020 18:23:33 -0400 Original-Received: by mail-wr1-f49.google.com with SMTP id q11so4031051wrp.3 for <41890@debbugs.gnu.org>; Wed, 17 Jun 2020 15:23:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=y6IHkoIH9TNHeuXnji8uuvWCKKYP/99c3KansyNdxa0=; b=uASy6i8Jk4LLV4BfpF7wU1eKFJFYBYo6QTdfYn7Kfd2LQZ7zbbw5Mom4NBqWhji1HQ penPm7J+EiY6pFkyg+9KuRdqTN/zPawBuQH/4ayf9IZAuAn3m8IHBiemfvOnCrlwuHu+ rJsvrI1Ma+eHszO9dt1ouKecwXTjQcxsC1y1Uzvuuvw9uBdUxzZgSeK/H97Ju2xC+NmA KHt0T8TyfbdvfyiYD8WpvufCj68JHfrz9MI0CIexgPBepw1/CDC1jtg+GUDToVCElfAE szBoq76x/gfyYGvEhbFmUirS3YX8nKp0YO3mlSmirjhme7HLoDxZgglKPJotOwoiveQ5 5HTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=y6IHkoIH9TNHeuXnji8uuvWCKKYP/99c3KansyNdxa0=; b=MrxDwRPTS6l0GNhvmE2hzwUdoFU/9CivfdzmqYPh8tQk+tWfMh9OHVQOj3JD8UvJNs X+X76iw+WvfyNN+eqJvj2fDkwIsPsR0n8KZJQti1WPQ32OZKydO7rvP7qWSKlEH8AnDv 02stK8bd3RwUMLOlGxT1guKf79K55QKOY5Fk23A9EbvaUKRB7BiWIYZ0gH9P2VtKm85F 3aC+yL8q5S6Ur4pe6Ls1ZOOuL0hNOpjhC0UwSTpRZWEcf7GuAfzkzt9CIQZxAu4fDoUg gce/8eynyelsHp0Bu/3VCNTaGEye4trQxZuV3y891h91Qo5sNaR7bHkxn6R4kjGl/aHZ g6VA== X-Gm-Message-State: AOAM532VGmnsrA9qFEMiO10whzuA0ofLuh6XW/Ur/BAmTdthBY6Rpui6 2OMnFSjvvPFi5Kgs5Qpb+zY= X-Google-Smtp-Source: ABdhPJz8BT3v+pu6Q7J0MhITTYfr1zdiqLSyI/09GNm1EyMaZkDJVXBn82To6YmshfqCKVKXD6GWAg== X-Received: by 2002:adf:dd46:: with SMTP id u6mr1300623wrm.44.1592432607142; Wed, 17 Jun 2020 15:23:27 -0700 (PDT) Original-Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id 4sm1083364wrf.74.2020.06.17.15.23.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Jun 2020 15:23:26 -0700 (PDT) In-Reply-To: <835zbp1wlf.fsf@gnu.org> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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:182084 Archived-At: On 17.06.2020 19:33, Eli Zaretskii wrote: >> On 17.06.2020 17:27, Eli Zaretskii wrote: >>> I mean it isn't preloaded, but is loaded on demand. >> >> Okay, but... the commands in the keymap will all be autoloaded. So >> whenever somebody calls them, the aforementioned optional package will >> get loaded. I'm not sure what the practical issue with that is. > > I don't see how this is related to the issue at hand. All I'm saying > is that a package, including its key bindings, shouldn't be loaded > until some of its feature is invoked. But if we autoload the bindings definition forms, wouldn't that have essentially the same effect? > Therefore, the best place for a > package's keybindings is in the package itself. What you describe > seems to fit this principle. Okay. >> The issue on the other side (keeping the keymap definition in >> project.el) is that it's an ELPA package as well. And so far we've said >> that ELPA packages shouldn't significantly modify a user's Emacs just by >> the virtue of being installed. > > We could make the keybindings autoloaded without having them defined > them when the package loads, couldn't we? By having the define-key on > the same line as the autoload cookie, like bookmark.el does. That would generally be considered problematic because the keymap would take effect right after the user updates to the newest version of project.el. Because package.el also compiles and evaluates autoloads. Anyway, I'll apply this patch now, but we can continue this discussion.