all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* package-autoremove (was: Package installation messages)
@ 2015-05-21 14:58 Artur Malabarba
  2015-05-21 15:06 ` Kaushal
  0 siblings, 1 reply; 11+ messages in thread
From: Artur Malabarba @ 2015-05-21 14:58 UTC (permalink / raw)
  To: Kaushal; +Cc: emacs-devel

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-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.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: package-autoremove (was: Package installation messages)
  2015-05-21 14:58 package-autoremove (was: Package installation messages) Artur Malabarba
@ 2015-05-21 15:06 ` Kaushal
  2015-05-21 16:11   ` Artur Malabarba
  0 siblings, 1 reply; 11+ messages in thread
From: Kaushal @ 2015-05-21 15:06 UTC (permalink / raw)
  To: bruce.connor.am; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 2227 bytes --]

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 <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-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.
>

[-- Attachment #2: Type: text/html, Size: 2824 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: package-autoremove (was: Package installation messages)
  2015-05-21 15:06 ` Kaushal
@ 2015-05-21 16:11   ` Artur Malabarba
  2015-05-21 17:01     ` Kaushal
  0 siblings, 1 reply; 11+ messages in thread
From: Artur Malabarba @ 2015-05-21 16:11 UTC (permalink / raw)
  To: Kaushal; +Cc: emacs-devel

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 <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 "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 <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-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.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: package-autoremove (was: Package installation messages)
  2015-05-21 16:11   ` Artur Malabarba
@ 2015-05-21 17:01     ` Kaushal
  2015-05-21 18:05       ` Artur Malabarba
  0 siblings, 1 reply; 11+ messages in thread
From: Kaushal @ 2015-05-21 17:01 UTC (permalink / raw)
  To: bruce.connor.am; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 3355 bytes --]

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 <bruce.connor.am@gmail.com>
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 <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 "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 <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-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.
>

[-- Attachment #2: Type: text/html, Size: 4400 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: package-autoremove (was: Package installation messages)
  2015-05-21 17:01     ` Kaushal
@ 2015-05-21 18:05       ` Artur Malabarba
  2015-05-21 18:18         ` Kaushal
  0 siblings, 1 reply; 11+ messages in thread
From: Artur Malabarba @ 2015-05-21 18:05 UTC (permalink / raw)
  To: Kaushal; +Cc: emacs-devel

> I edited package.el as per the diff of that commit and eval'd the changed function.

You mean "functions", plural, right? There are two changed functions
in that commit.

Here's something to try. After you verify that the value of the var
was updated but wasn't saved to custom.el, what happens if you
evaluate the following?

     (package--save-selected-packages package-selected-packages)

Does the value then get saved properly?



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: package-autoremove (was: Package installation messages)
  2015-05-21 18:05       ` Artur Malabarba
@ 2015-05-21 18:18         ` Kaushal
  2015-05-21 19:23           ` Artur Malabarba
  0 siblings, 1 reply; 11+ messages in thread
From: Kaushal @ 2015-05-21 18:18 UTC (permalink / raw)
  To: bruce.connor.am; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 728 bytes --]

Sorry, yes, I meant function*s*.
Yes, evaluating that updates the custom.el fine.
I will edebug (probably later) to see why that is not getting executed from
within `package-install`.

On Thu, May 21, 2015 at 2:05 PM Artur Malabarba <bruce.connor.am@gmail.com>
wrote:

> > I edited package.el as per the diff of that commit and eval'd the
> changed function.
>
> You mean "functions", plural, right? There are two changed functions
> in that commit.
>
> Here's something to try. After you verify that the value of the var
> was updated but wasn't saved to custom.el, what happens if you
> evaluate the following?
>
>      (package--save-selected-packages package-selected-packages)
>
> Does the value then get saved properly?
>

[-- Attachment #2: Type: text/html, Size: 1028 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: package-autoremove (was: Package installation messages)
  2015-05-21 18:18         ` Kaushal
@ 2015-05-21 19:23           ` Artur Malabarba
  2015-05-21 20:18             ` Kaushal
  0 siblings, 1 reply; 11+ messages in thread
From: Artur Malabarba @ 2015-05-21 19:23 UTC (permalink / raw)
  To: Kaushal; +Cc: emacs-devel

2015-05-21 19:18 GMT+01:00 Kaushal <kaushal.modi@gmail.com>:
> Sorry, yes, I meant function*s*.
> Yes, evaluating that updates the custom.el fine.
> I will edebug (probably later) to see why that is not getting executed from
> within `package-install`.

Thanks, that would be helpful. But it's not inside package-install,
it's inside `package-menu-execute' (so this is the function you'll
have to edebug). Specifically, this form:

          (package--save-selected-packages
           (remove-dups (append (mapcar #'package-desc-name .install)
                                package-selected-packages)))



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: package-autoremove (was: Package installation messages)
  2015-05-21 19:23           ` Artur Malabarba
@ 2015-05-21 20:18             ` Kaushal
  2015-05-21 20:24               ` Artur Malabarba
  0 siblings, 1 reply; 11+ messages in thread
From: Kaushal @ 2015-05-21 20:18 UTC (permalink / raw)
  To: bruce.connor.am; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 797 bytes --]

I might be missing something.. but I can't find where remove-dups is
defined.

On Thu, May 21, 2015 at 3:23 PM Artur Malabarba <bruce.connor.am@gmail.com>
wrote:

> 2015-05-21 19:18 GMT+01:00 Kaushal <kaushal.modi@gmail.com>:
> > Sorry, yes, I meant function*s*.
> > Yes, evaluating that updates the custom.el fine.
> > I will edebug (probably later) to see why that is not getting executed
> from
> > within `package-install`.
>
> Thanks, that would be helpful. But it's not inside package-install,
> it's inside `package-menu-execute' (so this is the function you'll
> have to edebug). Specifically, this form:
>
>           (package--save-selected-packages
>            (remove-dups (append (mapcar #'package-desc-name .install)
>                                 package-selected-packages)))
>

[-- Attachment #2: Type: text/html, Size: 1166 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: package-autoremove (was: Package installation messages)
  2015-05-21 20:18             ` Kaushal
@ 2015-05-21 20:24               ` Artur Malabarba
  2015-05-21 20:30                 ` Artur Malabarba
  0 siblings, 1 reply; 11+ messages in thread
From: Artur Malabarba @ 2015-05-21 20:24 UTC (permalink / raw)
  To: Kaushal; +Cc: emacs-devel

Oh damn, that was stupid. Sorry about that Kaushal, I'll fix it in a moment.

2015-05-21 21:18 GMT+01:00 Kaushal <kaushal.modi@gmail.com>:
> I might be missing something.. but I can't find where remove-dups is
> defined.
>
> On Thu, May 21, 2015 at 3:23 PM Artur Malabarba <bruce.connor.am@gmail.com>
> wrote:
>>
>> 2015-05-21 19:18 GMT+01:00 Kaushal <kaushal.modi@gmail.com>:
>> > Sorry, yes, I meant function*s*.
>> > Yes, evaluating that updates the custom.el fine.
>> > I will edebug (probably later) to see why that is not getting executed
>> > from
>> > within `package-install`.
>>
>> Thanks, that would be helpful. But it's not inside package-install,
>> it's inside `package-menu-execute' (so this is the function you'll
>> have to edebug). Specifically, this form:
>>
>>           (package--save-selected-packages
>>            (remove-dups (append (mapcar #'package-desc-name .install)
>>                                 package-selected-packages)))



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: package-autoremove (was: Package installation messages)
  2015-05-21 20:24               ` Artur Malabarba
@ 2015-05-21 20:30                 ` Artur Malabarba
  2015-05-21 20:39                   ` Kaushal
  0 siblings, 1 reply; 11+ messages in thread
From: Artur Malabarba @ 2015-05-21 20:30 UTC (permalink / raw)
  To: Kaushal; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 62 bytes --]

Should be fixed now, and this time I promise I tested it. :-)

[-- Attachment #2: Type: text/html, Size: 79 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: package-autoremove (was: Package installation messages)
  2015-05-21 20:30                 ` Artur Malabarba
@ 2015-05-21 20:39                   ` Kaushal
  0 siblings, 0 replies; 11+ messages in thread
From: Kaushal @ 2015-05-21 20:39 UTC (permalink / raw)
  To: bruce.connor.am; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 190 bytes --]

Thanks! I confirm that to be fixed. :)

On Thu, May 21, 2015 at 4:30 PM Artur Malabarba <bruce.connor.am@gmail.com>
wrote:

> Should be fixed now, and this time I promise I tested it. :-)
>

[-- Attachment #2: Type: text/html, Size: 434 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-05-21 20:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-21 14:58 package-autoremove (was: Package installation messages) Artur Malabarba
2015-05-21 15:06 ` Kaushal
2015-05-21 16:11   ` Artur Malabarba
2015-05-21 17:01     ` Kaushal
2015-05-21 18:05       ` Artur Malabarba
2015-05-21 18:18         ` Kaushal
2015-05-21 19:23           ` Artur Malabarba
2015-05-21 20:18             ` Kaushal
2015-05-21 20:24               ` Artur Malabarba
2015-05-21 20:30                 ` Artur Malabarba
2015-05-21 20:39                   ` Kaushal

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.