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 18:47:37 +0300 Message-ID: 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> <783b3a39-62ca-46b5-83a4-1989e8ec2062@yandex.ru> <83sgesze6x.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="92705"; 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, Stefan Monnier To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 18 17:48:17 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 1jlwm1-000O0j-Nv for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 18 Jun 2020 17:48:17 +0200 Original-Received: from localhost ([::1]:42458 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jlwm0-0005Lp-PO for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 18 Jun 2020 11:48:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35732) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jlwlm-0005Is-My for bug-gnu-emacs@gnu.org; Thu, 18 Jun 2020 11:48:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42610) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jlwlm-00020I-Cf for bug-gnu-emacs@gnu.org; Thu, 18 Jun 2020 11:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jlwlm-0007JF-8t for bug-gnu-emacs@gnu.org; Thu, 18 Jun 2020 11:48: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: Thu, 18 Jun 2020 15:48:02 +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.159249526828076 (code B ref 41890); Thu, 18 Jun 2020 15:48:02 +0000 Original-Received: (at 41890) by debbugs.gnu.org; 18 Jun 2020 15:47:48 +0000 Original-Received: from localhost ([127.0.0.1]:54156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlwlX-0007Il-Rn for submit@debbugs.gnu.org; Thu, 18 Jun 2020 11:47:48 -0400 Original-Received: from mail-wr1-f48.google.com ([209.85.221.48]:42959) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlwlW-0007IX-6i for 41890@debbugs.gnu.org; Thu, 18 Jun 2020 11:47:47 -0400 Original-Received: by mail-wr1-f48.google.com with SMTP id p5so6547068wrw.9 for <41890@debbugs.gnu.org>; Thu, 18 Jun 2020 08:47:46 -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=4Y6b6xwPq4Bg1BJtXXKv2jyAymmHPzGpD+3uOdfO4so=; b=J//t+xq5COWYmcE4iOkvodjaUxXniiwCCTGWjcY77Ovlb0y3UwYYkBrS9zIDV1tbrp XYAwlUsgLm9d38vIDkZ49xP+CuA6Mml/qxUEo5cSoJW4hE8Yqg0Qfm89jv9A+Qiod+Dr rYDW3O9hzNdouEipZ6vG6agatDKrB0Ad4HDtN/+s2+RKxGsJ2bXC5LBbbSXLwjUIkAI7 l4Hs3woe+beTecJOzPzUCLj0SGt0Tkgc31pYfnyHB9uYMwe4udIVmyhatGxxUFICK2PN OOKKnUmxhQA2ZgIv65GuoTkyy59zBD20+g+2En5JHUoTZUMmBl+BDoKEwrIQcNG/K87N 72BA== 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=4Y6b6xwPq4Bg1BJtXXKv2jyAymmHPzGpD+3uOdfO4so=; b=nMezdF3R25nbT3EAlo57fvSvHoz4hqbjHs4rlg2Njc0x3NWVWEXzxhJRKOUgoRzCrv vZmD3UdYaDdH5tZiOGZ2I291pPB5RwriRSSw2KdplRFsDaIE8o/vDdWGLk6xX3O09Jic sJaTquHEWS4mYG1SzkqZXfHXt0PEeVRGoRdOUztVjhTn9dbQzs8r6eKn0C0wIGx78rQa FczN30d+UAnFfuJTIpuYXXqAH/XI99TTBcnJKmpfypVg9s6hiAejSoHXK3OLziurl69w VYJ+Gqbq/Xl5zi92k70byvgye9vdiDuRJS3sSMnxmYh3suLyqd1s1PSwEZn8yrf6gA06 AdbA== X-Gm-Message-State: AOAM532iMxpSmKhx/3F/TnJ9d8+3ZxGo6VZ3NPKWoJEA92YV4zO5M2bB xwfu4HMMj6x0IfNnSuvMW6w= X-Google-Smtp-Source: ABdhPJwOZAXMEmiS9ZnodL3oyZ5j4micpZ/RScqJRJ2b43/+qIY2P7ZrG6JDVjGFlO5ayUgAk8s/Kw== X-Received: by 2002:adf:f4c1:: with SMTP id h1mr2794019wrp.328.1592495260225; Thu, 18 Jun 2020 08:47:40 -0700 (PDT) Original-Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id 67sm4235280wrk.49.2020.06.18.08.47.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Jun 2020 08:47:39 -0700 (PDT) In-Reply-To: <83sgesze6x.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:182116 Archived-At: On 18.06.2020 16:38, Eli Zaretskii wrote: >> Cc: 41890@debbugs.gnu.org, theo@thornhill.no >> From: Dmitry Gutov >> Date: Thu, 18 Jun 2020 01:23:25 +0300 >> >>> 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? > > How is this different from bookmark.el? I don't really know much about bookmark.el, or the way it was written and why. > And if we don't want these key bindings to be available always, we > could have a separate autoloads file for project.el. Some packages do > that already. We might not want them when the package is simply installed through ELPA. But we'll probably always want them on by default in Emacs 28 and newer. I'm curious what Stefan thinks about it. >>> 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. > > Why is that a problem? A user who updates project.el is most > probably going to use it, right? Probably. But it's also a dependency of certain packages like eglot or xref, so it's not a given that the user chose to update it intentionally. > And if we do care about this, we could use a separate autoloads file. Which the users would have to (require '...)?