From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kaushal Newsgroups: gmane.emacs.devel Subject: Re: package-autoremove (was: Package installation messages) Date: Thu, 21 May 2015 17:01:23 +0000 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e01184cb060789405169a7e0c X-Trace: ger.gmane.org 1432227703 4698 80.91.229.3 (21 May 2015 17:01:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 May 2015 17:01:43 +0000 (UTC) Cc: emacs-devel To: bruce.connor.am@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 21 19:01:34 2015 Return-path: Envelope-to: ged-emacs-devel@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 1YvTqf-0001G5-57 for ged-emacs-devel@m.gmane.org; Thu, 21 May 2015 19:01:33 +0200 Original-Received: from localhost ([::1]:58677 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvTqe-0007zI-C7 for ged-emacs-devel@m.gmane.org; Thu, 21 May 2015 13:01:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42135) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvTqZ-0007z1-4L for emacs-devel@gnu.org; Thu, 21 May 2015 13:01:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YvTqX-0002Qi-8R for emacs-devel@gnu.org; Thu, 21 May 2015 13:01:27 -0400 Original-Received: from mail-yh0-x22d.google.com ([2607:f8b0:4002:c01::22d]:32928) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvTqX-0002QZ-2b for emacs-devel@gnu.org; Thu, 21 May 2015 13:01:25 -0400 Original-Received: by yhcb70 with SMTP id b70so22703492yhc.0 for ; Thu, 21 May 2015 10:01:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-type; bh=nVxlpGPt2ZwEwMU/voDzy/kWAhsKuWdml57wKEE2eKU=; b=Oq+9BrJ24+92pyHaXriEZqq6TmDB6kIm8taf2teHkQ4mR+u78Y83dJcYqQTrUh4sYo pPOVi36ze2ubpUX5MGr0jupnxJLcc6eNFhCfnHxYj1xZrNPKMJUIyAf7yS028zYEtiBS G+BT07sUVTfMIUcLLfns+lYITxRz0mhHn3dGfcYHpjAt1fd5cGh8+gvSvYKB56R19wd7 /i9J5PuaMoSwWYrfV2i09hPtkhi8C+tDAzsUm1DjT++rpQt7qpS7XlUKKE1YiyV05nAd 1eN70VAGH21wMamGg1UgRmAjfQHZPa6r9j40wFWasEsRKPfa3JmPUH+GI1R3Ksc5RJIX wgAg== X-Received: by 10.236.202.72 with SMTP id c48mr3720887yho.57.1432227684577; Thu, 21 May 2015 10:01:24 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4002:c01::22d X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:186713 Archived-At: --089e01184cb060789405169a7e0c Content-Type: text/plain; charset=ISO-8859-1 I edited package.el as per the diff of that commit and eval'd the changed function. I can still recreate the problem. Here's what I did: 1. Uninstall git-timemachine using package manager. 2. See that the custom.el is updated (git-timemachine getting removed from package-selected-packages) 3. Re-install git-timemachine 4. Now the package-selected-packages var gets updated but does not get written to custom.el automatically. I believe this issue has been here for a while but I didn't get to chasing it; doesn't have to do with async install feature revert. It's just that now it matters more since we have the package-autoremove function. On Thu, May 21, 2015 at 12:11 PM Artur Malabarba wrote: > Then it sounds like we have a bug. I think I introduced it when > reverting the async stuff. > I just pushed a fix, could you try again with the latest master? > > 2015-05-21 16:06 GMT+01:00 Kaushal : > > About 2) the use-package forms happen after I load custom-file. > > > > I just manually deleted those 3 packages and reinstalled them from the > > package manager and then M-x package-autoremove displayed "Nothing to > > autoremove". But I noticed that that process did not update the > > package-selected-packages to the custom.el. I had to manually eval > > > > (package--save-selected-packages (package--find-non-dependencies)) > > > > in order to update the custom.el > > > > Before that, of course, after each emacs restart, package.el was trying > to > > autoremove those 3 packages. > > > > On Thu, May 21, 2015 at 10:58 AM Artur Malabarba < > bruce.connor.am@gmail.com> > > wrote: > >> > >> 2015-05-21 15:35 GMT+01:00 Kaushal : > >> > I just updated to the latest commit on emacs master and tried out > >> > package-autoremove. > >> > > >> > That suggested removing 3 packages (symon, minibuffer-line, > >> > git-timemachine), out of which I actually use 2: minibuffer-line, > >> > git-timemachine. > >> > > >> > For example, I have this in my init: > >> > > >> > ;; Display date+time in the minibuffer instead of in the mode-line > >> > (use-package minibuffer-line > >> > >> There are two possibilities for why this happened. > >> > >> 1. The first time you start Emacs after the commit that introduced > >> selected-packages, package.el will try to guess which of your packages > >> were explicitly installed by you, and which were pulled in as deps. > >> It's impossible to know for sure, so this guessing is bound to go > >> wrong on some instances. > >> > >> 2. The list of selected packages is stored with your > >> custom-set-variables. So, if your `use-package' form comes before your > >> `custom-set-variables', then that might cause it to not get stored > >> correctly. > >> > >> I'm not sure if there's a global fix we can do for case 2. Either way, > >> you (the user) can manually fix that by simply trying to install the > >> package you already have (`minibuffer-line', in this case). You can do > >> that from the package menu or with `M-x package-install'. You'll get a > >> message that "package already installed", and then package.el will > >> store this package in your list of `selected-packages'. > >> Another way to fix that is to `M-x customize-variable RET > >> package-selected-packages' and manually add `minibuffer-line' to it. > --089e01184cb060789405169a7e0c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I edited package.el as per the diff of that commit and eva= l'd the changed function.

I can still recreate the problem.= Here's what I did:
1. Uninstall git-timemachine using packag= e manager.
2. See that the custom.el is updated (git-timemachine = getting removed from package-selected-packages)
3. Re-install git= -timemachine
4. Now the package-selected-packages var gets update= d but does not get written to custom.el automatically.

=
I believe this issue has been here for a while but I didn't get to= chasing it; doesn't have to do with async install feature revert. It&#= 39;s just that now it matters more since we have the package-autoremove fun= ction.

On Thu, May 21, 2015 at 12= :11 PM Artur Malabarba <bru= ce.connor.am@gmail.com> wrote:
The= n it sounds like we have a bug. I think I introduced it when
reverting the async stuff.
I just pushed a fix, could you try again with the latest master?

2015-05-21 16:06 GMT+01:00 Kaushal <kaushal.modi@gmail.com>:
> About 2) the use-package forms happen after I load custom-file.
>
> I just manually deleted those 3 packages and reinstalled them from the=
> package manager and then M-x package-autoremove displayed "Nothin= g to
> autoremove". But I noticed that that process did not update the > package-selected-packages to the custom.el. I had to manually eval
>
> (package--save-selected-packages (package--find-non-dependencies))
>
> in order to update the custom.el
>
> Before that, of course, after each emacs restart, package.el was tryin= g to
> autoremove those 3 packages.
>
> On Thu, May 21, 2015 at 10:58 AM Artur Malabarba <bruce.connor.am@gmail.com= >
> wrote:
>>
>> 2015-05-21 15:35 GMT+01:00 Kaushal <kaushal.modi@gmail.com>:
>> > I just updated to the latest commit on emacs master and tried= out
>> > package-autoremove.
>> >
>> > That suggested removing 3 packages (symon, minibuffer-line, >> > git-timemachine), out of which I actually use 2: minibuffer-l= ine,
>> > git-timemachine.
>> >
>> > For example, I have this in my init:
>> >
>> > ;; Display date+time in the minibuffer instead of in the mode= -line
>> > (use-package minibuffer-line
>>
>> There are two possibilities for why this happened.
>>
>> 1. The first time you start Emacs after the commit that introduced=
>> selected-packages, package.el will try to guess which of your pack= ages
>> were explicitly installed by you, and which were pulled in as deps= .
>> It's impossible to know for sure, so this guessing is bound to= go
>> wrong on some instances.
>>
>> 2. The list of selected packages is stored with your
>> custom-set-variables. So, if your `use-package' form comes bef= ore your
>> `custom-set-variables', then that might cause it to not get st= ored
>> correctly.
>>
>> I'm not sure if there's a global fix we can do for case 2.= Either way,
>> you (the user) can manually fix that by simply trying to install t= he
>> package you already have (`minibuffer-line', in this case). Yo= u can do
>> that from the package menu or with `M-x package-install'. You&= #39;ll get a
>> message that "package already installed", and then packa= ge.el will
>> store this package in your list of `selected-packages'.
>> Another way to fix that is to `M-x customize-variable RET
>> package-selected-packages' and manually add `minibuffer-line&#= 39; to it.
--089e01184cb060789405169a7e0c--