Status-Detective-783 · 2022-02-23 15:33
1. Should I regularly do a `U` command, which marks all packages with newer versions with `I` and all obsolete packages with `D`? Or is that kind of dangerous because it might delete something that I rely upon, even if it is obsolete? What are the pros/cons of using `U`?
2. I performed the `U` command just to see what it would mark, and it did not mark "org" with an `I`. But my current org version is 9.4.4, and the latest one is 9.5.2. Why didn't `U` mark my org for installation?
SlowValue · 2022-02-23 22:13
1. With current state of Information Technologie, it a good idea to proceed with caution (e.g. make backups before upgrading, upgrade only if you have spare time), as there is always something which could break. Other than that you may do what you want. Your config won't break, just because you didn't upgrade your packages.... Upgrading Emacs packages because of security fixes is imo seldom necessary.
2. [org after version 9.5 is not on MELPA, nor ELPA, you have to use the ORG package repository](https://orgmode.org/elpa.html) to get updates
vifon · 2022-02-23 23:18
> org after version 9.5 is not on MELPA, nor ELPA, you have to use the ORG package repository to get updates
It's exactly opposite: they stopped releasing org with their own repos and migrated to the "normal" ELPA.
Status-Detective-783 · 2022-02-23 23:19
Thanks! #1 that def makes sense. I'm reading about how it's best to version your installed packages, or be careful so you can revert everything if (and when!) needed.
For #2, I had to delete my /Archive directory so it would be rebuilt, then I could see my installed 9.5.2. I think it got corrupted.
I'm a little confused. What's the relationship/difference between `M-x list-packages` and the following:
(require 'package)
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t)
If I have the above `(require...) (add-to-list...)`, does that remove my need to install via `M-x list-packages`?
My impression is that the above init code will pull down the "latest" (in some sense) if I don't have that package, and will do so only once. If I then ever want to update a package, I need to do it manually via `M-x list-packages`. Is that right?
SlowValue · 2022-02-24 15:36
thanks!
SlowValue · 2022-02-24 15:56
(require 'package)
Loads the package named `package`, this package provides functionality of `list-packages` and installing from repositories.
`(require...)` can only load already installed packages.
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t)
Makes a new package repository (named "org") known to the `package` functionality. `package-archives` is just a variable, a simple list (of conses), with all package repositories you would like to utilize.
`M-x list-packages` opens a user interface for package installation/upgrade/uninstallation/etc. When called, Emacs asks every package repository listed in variable `package-archives` for its package list and then presents that joined list to the user.
> If I have the above (require...) (add-to-list...), does that remove my need to install via M-x list-packages?
no
> My impression is that the above init code will pull down the "latest" (in some sense) if I don't have that package, and will do so only once. If I then ever want to update a package, I need to do it manually via M-x list-packages. Is that right?
no, installation happens with `list-packages` (or other commands e.g. `package-install`). [`(require ...)`](https://emacs.stackexchange.com/questions/22717/what-does-require-package-mean-for-emacs-and-how-does-it-differ-from-load-fil/22718#22718) is not necessary, when packages support [`autoload`](https://www.gnu.org/software/emacs/manual/html_node/elisp/Autoload.html#Autoload), which most packages nowadays do.
Note that I was wrong regarding point 2. of my answer.
Status-Detective-783 · 2022-02-24 17:51
Thanks!