unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* What exactly does "installing a package" mean?
@ 2015-10-26 20:32 Marcin Borkowski
  2015-10-26 21:31 ` Kevin W. van Rooijen
  2015-10-27  1:11 ` Stefan Monnier
  0 siblings, 2 replies; 8+ messages in thread
From: Marcin Borkowski @ 2015-10-26 20:32 UTC (permalink / raw)
  To: Help Gnu Emacs mailing list

Hi all,

do I get it correctly that "installing a package" means that Emacs
creates a certain subdirectory of `package-user-dir' and puts the
relevant file(s) there - and that's it?

In particular, is deleting a subdirectory of `package-user-dir' enough
to uninstall the package?  Is moving its subdirectory somewhere else,
restarting Emacs, then copying it back again and restarting again
equivalent to uninstalling and then installing again?

The reason I'm asking is that I'd like to get rid of the mess I managed
to introduce in `package-user-dir', but OTOH this mess is working, and
I don't want to break something accidentally, or rather, I want to have
a simple way to rollback any changes.

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



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

* Re: What exactly does "installing a package" mean?
  2015-10-26 20:32 What exactly does "installing a package" mean? Marcin Borkowski
@ 2015-10-26 21:31 ` Kevin W. van Rooijen
  2015-10-26 23:42   ` Marcin Borkowski
  2015-10-27  1:11 ` Stefan Monnier
  1 sibling, 1 reply; 8+ messages in thread
From: Kevin W. van Rooijen @ 2015-10-26 21:31 UTC (permalink / raw)
  To: Marcin Borkowski; +Cc: Help Gnu Emacs mailing list

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi Marcin,

Installing a package /usually/ refers to installing a package through
the Emacs built in package manager.
http://www.emacswiki.org/emacs/InstallingPackages

These packages get installed in the 'package-user-dir', you yourself
should not have to manually modify any contents in that directory.
If you want to try and clean up your package management I suggest
taking a look at
use-package https://github.com/jwiegley/use-package
and Melpa https://github.com/milkypostman/melpa

Installing a package manually would mean adding the path to your package
to our load-path, and then require it manually. Though looking into
Emacs' built-in package manager is worth the effort.

So instead of removing them from your package-user-dir manually, try adding the
packages you need through use-package and let your Emacs configurations
handle it for you.

Marcin Borkowski writes:

> Hi all,
>
> do I get it correctly that "installing a package" means that Emacs
> creates a certain subdirectory of `package-user-dir' and puts the
> relevant file(s) there - and that's it?
>
> In particular, is deleting a subdirectory of `package-user-dir' enough
> to uninstall the package?  Is moving its subdirectory somewhere else,
> restarting Emacs, then copying it back again and restarting again
> equivalent to uninstalling and then installing again?
>
> The reason I'm asking is that I'd like to get rid of the mess I managed
> to introduce in `package-user-dir', but OTOH this mess is working, and
> I don't want to break something accidentally, or rather, I want to have
> a simple way to rollback any changes.
>
> TIA,


- --

Kevin W. van Rooijen
@attichacker
PGP 4096R: A0A9 0D06 A754 6D4E EAD4  E6B8 A006 B0B1 CD62 28AB
-----BEGIN PGP SIGNATURE-----

iQEcBAEBCgAGBQJWLpvGAAoJEHBsdeXUwRWBrbkH/i+iDB+3LxiwPsFnO5Ist30u
CO7emNjxsAO+Txi/F578s5KBE9KKQ/bwXuHG6yk5BQFqlwBchPMg/3Iw+NxF24/2
SUU1xgpIdP9l8CB2zsP8Bs69SW+dzI3mtbe7GZAr/aa8xmO7IGTY9C1DZPQ80lcB
ay/rDwTT+ZMUFwb8TUA+BBj5xN9wx/KtarEGFrMju+MR2FhkaKwvLCOY6QDnuHzO
iw7BjaJh2KkxwWEKG5WOHFSkhm0zv+5wHR+1I6ZQgEautUjhSXK0mGO79PuFhvB1
cL3ezqZvGLilRs/jYiCIzKd/LDIIQ82HVz/aqgc32eAQSX6WUXvm+bB8kg96+1U=
=0tIe
-----END PGP SIGNATURE-----



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

* Re: What exactly does "installing a package" mean?
  2015-10-26 21:31 ` Kevin W. van Rooijen
@ 2015-10-26 23:42   ` Marcin Borkowski
  2015-10-27  0:11     ` Emanuel Berg
       [not found]     ` <mailman.1106.1445904123.7904.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 8+ messages in thread
From: Marcin Borkowski @ 2015-10-26 23:42 UTC (permalink / raw)
  To: Kevin W. van Rooijen; +Cc: Help Gnu Emacs mailing list


On 2015-10-26, at 22:31, Kevin W. van Rooijen <kevin.van.rooijen@attichacker.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
>
> Hi Marcin,
>
> Installing a package /usually/ refers to installing a package through
> the Emacs built in package manager.
> http://www.emacswiki.org/emacs/InstallingPackages
>
> These packages get installed in the 'package-user-dir', you yourself
> should not have to manually modify any contents in that directory.
> If you want to try and clean up your package management I suggest
> taking a look at
> use-package https://github.com/jwiegley/use-package
> and Melpa https://github.com/milkypostman/melpa
>
> Installing a package manually would mean adding the path to your package
> to our load-path, and then require it manually. Though looking into
> Emacs' built-in package manager is worth the effort.
>
> So instead of removing them from your package-user-dir manually, try adding the
> packages you need through use-package and let your Emacs configurations
> handle it for you.

Thanks, but you misunderstood me.  What I was asking about was
a particular /implementation detail/ of Emacs' package manager.

I've already added some packages - in fact, I'm afraid too many of them,
from too many repositories - and I want to clean the mess.  However,
that mess is currently working, and if something goes wrong with the
cleaning, I want to be able to quickly recover.  Doing manual
manipulations in `package-user-dir' seems the easiest way.

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



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

* Re: What exactly does "installing a package" mean?
  2015-10-26 23:42   ` Marcin Borkowski
@ 2015-10-27  0:11     ` Emanuel Berg
  2015-10-27  0:31       ` Kevin W. van Rooijen
       [not found]     ` <mailman.1106.1445904123.7904.help-gnu-emacs@gnu.org>
  1 sibling, 1 reply; 8+ messages in thread
From: Emanuel Berg @ 2015-10-27  0:11 UTC (permalink / raw)
  To: help-gnu-emacs

Marcin Borkowski <mbork@mbork.pl> writes:

> On 2015-10-26, at 22:31, Kevin W. van Rooijen
> <kevin.van.rooijen@attichacker.com> wrote:

OT: Did you get that as a private mail? I don't see it
in the gmane.emacs.help threads...

> Thanks, but you misunderstood me. What I was asking
> about was a particular /implementation detail/ of
> Emacs' package manager.
>
> I've already added some packages - in fact, I'm
> afraid too many of them, from too many repositories
> - and I want to clean the mess. However, that mess
> is currently working, and if something goes wrong
> with the cleaning, I want to be able to quickly
> recover. Doing manual manipulations in
> `package-user-dir' seems the easiest way.

As always: this "clean" and dirty and "mess" and
minimal and bloated etc. etc. is based on
a misconception that is derived from the physical
world. In the physical world, things that are
sometimes useful, but not often enough, or perhaps not
right now, such things may get in the way, and you
might consider putting other stuff there, instead.

OTOH, in a computer system, it doesn't work like that
at all. If the computer is well-organized, there is no
mess in having one zillion packages or binaries or
shell functions or scripts, or all of that at the same
time, as long as they all

    1) work, and

    2) serve a specific purpose

They don't get in the way; they don't interfere with
each other; and, you never know when you might need
them. So *keep* the "mess"!

That said, with Emacs you basically need a bunch of
.el files which you can just as well load manually.
They can be compiled if you wish.

If you use a package manager then the whole point of
having one of those is when you don't want to do stuff
manually. To install stuff with the package manager,
and then remove it manually or otherwise alter it
manually, I can't see that leading to anything but
inconsistency and confusion...

But, to answer your question, no, there is nothing to
it but files and directories, just like everything
else on a Unix system. So alter it all exactly like
you please. Only, especially since it works, I don't
see any gain in doing so - on the contrary it'll be
error-prone and time-consuming. Only if you enjoy it
you should do it.

-- 
underground experts united
http://user.it.uu.se/~embe8573




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

* Re: What exactly does "installing a package" mean?
  2015-10-27  0:11     ` Emanuel Berg
@ 2015-10-27  0:31       ` Kevin W. van Rooijen
  0 siblings, 0 replies; 8+ messages in thread
From: Kevin W. van Rooijen @ 2015-10-27  0:31 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: help-gnu-emacs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512


Emanuel Berg writes:

> Marcin Borkowski <mbork@mbork.pl> writes:
>
>> On 2015-10-26, at 22:31, Kevin W. van Rooijen
>> <kevin.van.rooijen@attichacker.com> wrote:
>
> OT: Did you get that as a private mail? I don't see it
> in the gmane.emacs.help threads...

Strange, I CC'd the mailing list..

> But, to answer your question, no, there is nothing to
> it but files and directories, just like everything
> else on a Unix system. So alter it all exactly like
> you please. Only, especially since it works, I don't
> see any gain in doing so - on the contrary it'll be
> error-prone and time-consuming. Only if you enjoy it
> you should do it.

I agree with this, in the end having too many packages doesn't really
matter as long as it's managed by Emacs. But of course it's your choice :)

- --

Kevin W. van Rooijen
@attichacker
PGP 4096R: A0A9 0D06 A754 6D4E EAD4  E6B8 A006 B0B1 CD62 28AB
-----BEGIN PGP SIGNATURE-----

iQEcBAEBCgAGBQJWLsXhAAoJEHBsdeXUwRWB8wsIAKLKEDlEbUCX3eErRe+d5wtF
pk++vLgi7T7nA5tUL2dKE/vVFTu22hYAWZgWeAO0wS8maz/ZAvPg1qufgVNdiASd
1f7h5VeL/36XhgVA4ItRdb3utJ1YAPiW19MjAYsBYPLakpnptPybPKoB6TPNwnbF
VJ9Od+ROIhzw9yUlSStDedMjS38ldcb+XnVbPJ5u1YY/jBLoti/On7+JAdzZrtWn
FrRPa4cqN8oNKw72KPhkk55GW+0jl8G6P36Hw1MOrYg6tJ/PhbBCjBr4Z1to2e+E
J9RBTFmMF8/x8oQRLnzqLuy7mSLsS5jwkprzRgtImF7jlHoYt54AeKkBEGSC1pk=
=LZts
-----END PGP SIGNATURE-----



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

* Re: What exactly does "installing a package" mean?
  2015-10-26 20:32 What exactly does "installing a package" mean? Marcin Borkowski
  2015-10-26 21:31 ` Kevin W. van Rooijen
@ 2015-10-27  1:11 ` Stefan Monnier
  1 sibling, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2015-10-27  1:11 UTC (permalink / raw)
  To: help-gnu-emacs

> In particular, is deleting a subdirectory of `package-user-dir' enough
> to uninstall the package?

Yes.

> Is moving its subdirectory somewhere else, restarting Emacs, then
> copying it back again and restarting again equivalent to uninstalling
> and then installing again?

Yes.


        Stefan




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

* Re: What exactly does "installing a package" mean?
       [not found]     ` <mailman.1106.1445904123.7904.help-gnu-emacs@gnu.org>
@ 2015-10-27 14:28       ` Joost Kremers
  2015-10-28  1:58         ` Emanuel Berg
  0 siblings, 1 reply; 8+ messages in thread
From: Joost Kremers @ 2015-10-27 14:28 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg wrote:
> But, to answer your question, no, there is nothing to
> it but files and directories, just like everything
> else on a Unix system.

Well, that's a bit of a naive statement. Of course it's all files and
directories, the question is, *which* files and directories. If Emacs
were to keep a list of installed packages and would save this list to,
say, `~/.emacs.d`, then it would still be "all files and directories",
but as an Emacs user, you might still run into trouble if you delete a
package from `package-user-dir` but do not update the file containing
the list of installed packages.

For example, if you remove the files of a package xyz on a
Debian(-based) system, dpkg will still think xyz installed, because its
own database still says it is.


-- 
Joost Kremers                                   joostkremers@fastmail.fm
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)


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

* Re: What exactly does "installing a package" mean?
  2015-10-27 14:28       ` Joost Kremers
@ 2015-10-28  1:58         ` Emanuel Berg
  0 siblings, 0 replies; 8+ messages in thread
From: Emanuel Berg @ 2015-10-28  1:58 UTC (permalink / raw)
  To: help-gnu-emacs

Joost Kremers <joost.m.kremers@gmail.com> writes:

> Well, that's a bit of a naive statement. Of course
> it's all files and directories, the question is,
> *which* files and directories. If Emacs were to keep
> a list of installed packages and would save this
> list to, say, `~/.emacs.d`, then it would still be
> "all files and directories", but as an Emacs user,
> you might still run into trouble if you delete
> a package from `package-user-dir` but do not update
> the file containing the list of installed packages.
>
> For example, if you remove the files of a package
> xyz on a Debian(-based) system, dpkg will still
> think xyz installed, because its own database still
> says it is.

In general, there are many reasons to use a package
manager, notably reduced complexity and convenience
(those two are perhaps the same thing).

In general, there are a couple of reasons *not* to use
a package manager, notably (eventually) better
understanding and control (those two are perhaps the
same thing).

Talking specifically, on a Debian system or fork, I'd
strongly advice against not using apt-get or aptitude,
because that works so well and the strength of Debian
is (except for its Unix architecture which it shares
with all Linux distros) - the strength of Debian is
the immense and well-maintained software repositories,
exactly those which you browse and extract software
from with aptitude!

Talking specifically, on an Emacs system, I mean in
Emacs, the package situation is much less complicated
than on a Debian system. There is inline documentation
instead of separate manpages and info-files. There is
a userspace directory instead of the plethora of
directories holding binaries on a Unix system. Also,
Emacs relies to a much lesser degree on package
software than does a Debian system, which would be
crippled without the dear repos next door.

As, in Emacs, the packages are just a bunch of Elisp
files, while using a package manager is as well, if
you want to do stuff manually with `provide',
`require', `load-path', `batch-byte-compile' - this is
fine as well! (You can even do both.)

Mixing it up (package manager and manual edits) for
the same package/source file(s) tho is the one thing
I wouldn't recommend.

-- 
underground experts united
http://user.it.uu.se/~embe8573




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

end of thread, other threads:[~2015-10-28  1:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-26 20:32 What exactly does "installing a package" mean? Marcin Borkowski
2015-10-26 21:31 ` Kevin W. van Rooijen
2015-10-26 23:42   ` Marcin Borkowski
2015-10-27  0:11     ` Emanuel Berg
2015-10-27  0:31       ` Kevin W. van Rooijen
     [not found]     ` <mailman.1106.1445904123.7904.help-gnu-emacs@gnu.org>
2015-10-27 14:28       ` Joost Kremers
2015-10-28  1:58         ` Emanuel Berg
2015-10-27  1:11 ` Stefan Monnier

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