emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Summary and next steps for (package-initialize)


From: Nikolay Kudryavtsev
Subject: Re: Summary and next steps for (package-initialize)
Date: Wed, 23 Aug 2017 18:57:30 +0300
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]