From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Nathan Moreau Newsgroups: gmane.emacs.devel Subject: Re: Summary and next steps for (package-initialize) Date: Thu, 24 Aug 2017 00:30:23 +0200 Message-ID: References: <42c93165-2d85-8501-9cc8-99830b7b3646@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1503527451 8023 195.159.176.226 (23 Aug 2017 22:30:51 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 23 Aug 2017 22:30:51 +0000 (UTC) To: Nikolay Kudryavtsev , emacs-devel@gnu.org, Radon Rosborough Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 24 00:30:44 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkeAW-0001EB-4Q for ged-emacs-devel@m.gmane.org; Thu, 24 Aug 2017 00:30:36 +0200 Original-Received: from localhost ([::1]:45875 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkeAa-00030j-TO for ged-emacs-devel@m.gmane.org; Wed, 23 Aug 2017 18:30:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34009) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkeAO-00030c-3T for emacs-devel@gnu.org; Wed, 23 Aug 2017 18:30:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dkeAN-0006Ab-5p for emacs-devel@gnu.org; Wed, 23 Aug 2017 18:30:28 -0400 Original-Received: from mail-yw0-x235.google.com ([2607:f8b0:4002:c05::235]:34816) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dkeAN-00065n-0n for emacs-devel@gnu.org; Wed, 23 Aug 2017 18:30:27 -0400 Original-Received: by mail-yw0-x235.google.com with SMTP id s187so8970532ywf.2 for ; Wed, 23 Aug 2017 15:30:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=EM2KhMzRFmNfaLPxaxRlDKZm1g7xH4mXaopwsnesKs0=; b=uCFA7n4hXoXBf+wYNWwio70ZH02VymtpTWs61lFSWrYWTypuJvAM5KoSMdrhV6dwdn GPZAqPtohelYph3dHvs5fHhxkRRIOgKcgfPDgnzkV0wYPLlZ6q1cbwmtFwJtv+INAdDq zZ2q3a/JmMNf2kB83AUX/04T2Szuj7vhg0TqsDr3EoYcFR6bDhCsGyQ27jn20bxBonLn qowwJ9E3T2cCXZrwQg4oqoo8tWcexWJrbUC6nObKI52Qa4fmBuoAPIhxTVZMBSqw7j7a lbVHFzkVKsy9GVL0fPW5yT6fNFkTneiQGz4/I+H1vKgNdMf7l1kEJpyJ6LsV9mHTHCvj pzmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=EM2KhMzRFmNfaLPxaxRlDKZm1g7xH4mXaopwsnesKs0=; b=aRvkS2jLK9ZH58SXfMK61i97hu1Qal4v/x+/umvk5767dWqBIJOAswndOEP1mfIspC NxyiCoJiYWYY75tYU45drNQyDx+HY3W/MeDyf2Rc36zN454sEJeBWYag9Oyow6cF22ln wgIgjmEdFd00aidZnIwQlblwiDrT2TsUZzNHVtJ8p17aV4wwkkBVKWv8oforvVNKQXLa OmF7PX9i1/kh8jNFtsowSQxS2AVWJbCBnhng72pdnA2/vg2UAPLQpRinM+5HV/3PpSHj FQ5T3fvE+6pIr++fwbdgysy26PFDgN2+/opWUSeeyhlY1Da2KS16W1DhTTdJPGdNh+Vx MN8A== X-Gm-Message-State: AHYfb5iC1eimA20izssnEzp0jaX4MmDKf2zg4QK1kbBdBjXu6Rb1ndVN xpa1N7QHN4rPcZmeicxmyGJyMznk6S+J X-Received: by 10.37.38.142 with SMTP id m136mr3529829ybm.219.1503527424286; Wed, 23 Aug 2017 15:30:24 -0700 (PDT) Original-Received: by 10.37.31.195 with HTTP; Wed, 23 Aug 2017 15:30:23 -0700 (PDT) In-Reply-To: <42c93165-2d85-8501-9cc8-99830b7b3646@gmail.com> X-Google-Sender-Auth: Ci35X4jMhyDvJiJCiQOfcKsjtiA X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4002:c05::235 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:217743 Archived-At: Hello, > So I propose, I really like the proposal, except that I would prefer to force the call to package-initialize if something goes wrong (with a warning written in the *Messages* buffer) instead of a prompt. The idea being that - this seems like a reasonable (a setup with `(package-initialize)' as only package.el stuff is quite common) - while remaining backward compatible with existing configurations - and makes users that don't want package.el happy: they don't need to put anything related to it in their configuration code, and the its code is unloaded as long as their configuration loads cleanly. Nathan On 23 August 2017 at 17:57, Nikolay Kudryavtsev wrote: > Hello. > > I have another proposal that was not considered so far. > > The main problem we're trying to solve here is when a new user calls > something from package.el without having it initialized first. We also want > the solution to touch only that group of users and no one else. > > So I propose, we don't do anything until user either: > > 1. Requires something that's not available. > > 2. Calls a function that's not available. > > In either of those cases we check whether (package-initialize) was already > called. And, if not, we give user an interactive window along the lines of: > > "You tried to call X which is not available and Emacs package manager was > not initialized. Press: > > i to initialize and try again > > w to initialize, try again and don't ask again > > x to dismiss > > K to dissmiss and never ask again." > > w writes (package-initialize) to init) > > K would set variable > dear-emacs-i-totally-don-t-need-any-begginers-advice-thanks to t. > > We also don't show this window when kill-package-el-and-burn-its-body is t. > > I'm not entirely sure on the technical side of catching requires and > void-functions, but this seems to be the best solution when all other things > are considered. > > Also similar approach is already used in Emacs, there's some key binding > that's disabled until you confirm it in a similar way, sorry at the moment I > don't remember which one. > > -- > Best Regards, > Nikolay Kudryavtsev