unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* package-autoremove ?
@ 2020-09-03  4:35 David Masterson
  2020-09-03  6:38 ` Pankaj Jangid
  0 siblings, 1 reply; 7+ messages in thread
From: David Masterson @ 2020-09-03  4:35 UTC (permalink / raw)
  To: help-gnu-emacs

The package-autoremove is giving a list of packages to be removed, but
many of the packages seem to be dependents of other packages, so I don't
want to remove them.  How does package-autoremove decide on which
packages can be removed?  Can I force it to keep some of the packages?
-- 
David Masterson



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

* Re: package-autoremove ?
  2020-09-03  4:35 package-autoremove ? David Masterson
@ 2020-09-03  6:38 ` Pankaj Jangid
  2020-09-03 21:02   ` package-autoremove ? Looking like a bug David Masterson
  0 siblings, 1 reply; 7+ messages in thread
From: Pankaj Jangid @ 2020-09-03  6:38 UTC (permalink / raw)
  To: David Masterson; +Cc: help-gnu-emacs

David Masterson <dsmasterson92630@outlook.com> writes:

> The package-autoremove is giving a list of packages to be removed, but
> many of the packages seem to be dependents of other packages, so I
> don't want to remove them.  How does package-autoremove decide on
> which packages can be removed?  Can I force it to keep some of the
> packages?

I have faced a similar issue when I was re-writing my init.el to
modularize using use-package. It split the big file into tiny little
files.

In my case, the problem was that the packages where installed as a
dependency and actual call (use-package package-name :ensure t) for
those packages were not encountered by the interpreter.

I debugged it using a very inefficient method. Commented out the
(require ...)  statements from the init.el and uncommented one-by-one to
find the problem.







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

* Re: package-autoremove ? Looking like a bug...
  2020-09-03  6:38 ` Pankaj Jangid
@ 2020-09-03 21:02   ` David Masterson
  2020-09-03 22:37     ` Stefan Kangas
  2020-09-05  3:39     ` Pankaj Jangid
  0 siblings, 2 replies; 7+ messages in thread
From: David Masterson @ 2020-09-03 21:02 UTC (permalink / raw)
  To: Pankaj Jangid; +Cc: help-gnu-emacs

Pankaj Jangid <p4j@j4d.net> writes:

> David Masterson <dsmasterson92630@outlook.com> writes:
>
>> The package-autoremove is giving a list of packages to be removed, but
>> many of the packages seem to be dependents of other packages, so I
>> don't want to remove them.  How does package-autoremove decide on
>> which packages can be removed?  Can I force it to keep some of the
>> packages?
>
> I have faced a similar issue when I was re-writing my init.el to
> modularize using use-package. It split the big file into tiny little
> files.
>
> In my case, the problem was that the packages where installed as a
> dependency and actual call (use-package package-name :ensure t) for
> those packages were not encountered by the interpreter.
>
> I debugged it using a very inefficient method. Commented out the
> (require ...)  statements from the init.el and uncommented one-by-one to
> find the problem.

Sounds like you're onto something.  I recently started using use-package
and the problem began after that.  What you're suggesting is that you
have to install packages with the package manager and then use
use-package to load them.

Anyone else seen this?

-- 
David Masterson



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

* Re: package-autoremove ? Looking like a bug...
  2020-09-03 21:02   ` package-autoremove ? Looking like a bug David Masterson
@ 2020-09-03 22:37     ` Stefan Kangas
  2020-09-12  4:43       ` David Masterson
  2020-09-05  3:39     ` Pankaj Jangid
  1 sibling, 1 reply; 7+ messages in thread
From: Stefan Kangas @ 2020-09-03 22:37 UTC (permalink / raw)
  To: David Masterson, Pankaj Jangid; +Cc: help-gnu-emacs

David Masterson <dsmasterson92630@outlook.com> writes:

> Sounds like you're onto something.  I recently started using use-package
> and the problem began after that.  What you're suggesting is that you
> have to install packages with the package manager and then use
> use-package to load them.
>
> Anyone else seen this?

Yes, the other day `package-autoremove' wanted to remove a ton of
packages for me.  So I took a closer look.

`package-autoremove' uses `package-selected-packages' to know which
packages to remove.  More specifically, it calls
`package--removable-packages', where the doc string explains:

      "Return a list of names of packages no longer needed.
    These are packages which are neither contained in
    `package-selected-packages' nor a dependency of one that is."

In my case, some packages that I have (most likely) installed via
use-package are _not_ in `package-selected-packages'.  This seems like a
bug.  I'm not sure if it's in use-package or package.el, however.

With a bit of luck, John Wiegley is reading this list, and could
comment on this.

Best regards,
Stefan Kangas



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

* Re: package-autoremove ? Looking like a bug...
  2020-09-03 21:02   ` package-autoremove ? Looking like a bug David Masterson
  2020-09-03 22:37     ` Stefan Kangas
@ 2020-09-05  3:39     ` Pankaj Jangid
  1 sibling, 0 replies; 7+ messages in thread
From: Pankaj Jangid @ 2020-09-05  3:39 UTC (permalink / raw)
  To: David Masterson; +Cc: help-gnu-emacs

David Masterson <dsmasterson92630@outlook.com> writes:

>> In my case, the problem was that the packages where installed as a
>> dependency and actual call (use-package package-name :ensure t) for
>> those packages were not encountered by the interpreter.
>>
>> I debugged it using a very inefficient method. Commented out the
>> (require ...)  statements from the init.el and uncommented one-by-one to
>> find the problem.
>
> Sounds like you're onto something.  I recently started using use-package
> and the problem began after that.  What you're suggesting is that you
> have to install packages with the package manager and then use
> use-package to load them.

I removed all packages and installed using my new configuration which is
using use-package. It still gave me this problem.

But it got solved, after some tweaks. I don't exactly remember what I
did.



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

* Re: package-autoremove ? Looking like a bug...
  2020-09-03 22:37     ` Stefan Kangas
@ 2020-09-12  4:43       ` David Masterson
  2020-09-12  5:33         ` Stefan Kangas
  0 siblings, 1 reply; 7+ messages in thread
From: David Masterson @ 2020-09-12  4:43 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: help-gnu-emacs

Stefan Kangas <stefankangas@gmail.com> writes:

> Yes, the other day `package-autoremove' wanted to remove a ton of
> packages for me.  So I took a closer look.
>
> `package-autoremove' uses `package-selected-packages' to know which
> packages to remove.  More specifically, it calls
> `package--removable-packages', where the doc string explains:
>
>       "Return a list of names of packages no longer needed.
>     These are packages which are neither contained in
>     `package-selected-packages' nor a dependency of one that is."
>
> In my case, some packages that I have (most likely) installed via
> use-package are _not_ in `package-selected-packages'.  This seems like a
> bug.  I'm not sure if it's in use-package or package.el, however.
>
> With a bit of luck, John Wiegley is reading this list, and could
> comment on this.

No response from John Wiegley.

What do you think of 'straight.el'?
-- 
David Masterson



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

* Re: package-autoremove ? Looking like a bug...
  2020-09-12  4:43       ` David Masterson
@ 2020-09-12  5:33         ` Stefan Kangas
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Kangas @ 2020-09-12  5:33 UTC (permalink / raw)
  To: David Masterson; +Cc: help-gnu-emacs

David Masterson <dsmasterson92630@outlook.com> writes:

> No response from John Wiegley.

I would therefore propose to report this as a bug at the use-package
issue tracker.

> What do you think of 'straight.el'?

I haven't had the chance to use it, so I can only judge on having
studied the authors own description.  I don't think it would make a good
replacement for package.el in general, but it has some good ideas that
package.el could certainly learn from.

The main benefit with straight.el seems to be that it clones git
repositories for all your packages.  Personally, I don't mind visiting a
website to get the clone url and pasting that into a terminal when I
need to.

Best regards,
Stefan Kangas



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

end of thread, other threads:[~2020-09-12  5:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-03  4:35 package-autoremove ? David Masterson
2020-09-03  6:38 ` Pankaj Jangid
2020-09-03 21:02   ` package-autoremove ? Looking like a bug David Masterson
2020-09-03 22:37     ` Stefan Kangas
2020-09-12  4:43       ` David Masterson
2020-09-12  5:33         ` Stefan Kangas
2020-09-05  3:39     ` Pankaj Jangid

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).