Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to reload an updated library?

185 views
Skip to first unread message

Tory S. Anderson

unread,
Mar 1, 2015, 6:22:29 PM3/1/15
to Emacs Help List
In this case, I'm talking about the Helm package. I follow it on git and sometimes will `git pull` to update it, then can make it. But the only way I know to implement the new changes in emacs is to restart emacs. I tried evaluate-buffer on one of the main library files, but it didn't seem to do the trick. Restarting emacs is a pain if I have many ongoing projects; how can I implement the updates to the package without restarting emacs?

Emanuel Berg

unread,
Mar 1, 2015, 6:40:39 PM3/1/15
to
With "library", do you mean something more advanced
than just an Elisp (.el) file which is usually what is
meant?

Such are loaded with <drumroll> `load' - either
`load-file' (input the library file) or `load-library'
(ditto name). With `load-library' you will get the
.elc compiled version rather than the .el source if
both are available.

--
underground experts united

bernardo

unread,
Mar 1, 2015, 8:39:24 PM3/1/15
to Emacs Help List

> In this case, I'm talking about the Helm package. I follow it on git and
> sometimes will `git pull` to update it, then can make it. But the only way
> I know to implement the new changes in emacs is to restart emacs. I tried
> evaluate-buffer on one of the main library files, but it didn't seem to do
> the trick. Restarting emacs is a pain if I have many ongoing projects; how
> can I implement the updates to the package without restarting emacs?
>
>

haven't tried it, but (unload-feature '....) followed by (require '....)
might be worth a shot


Tory S. Anderson

unread,
Mar 1, 2015, 8:50:35 PM3/1/15
to Emacs Help List, Emanuel Berg
I've never been quite clear in emacs on the meanings of library, package, extension... I think I mean package, such as what you download from `m-x list-packages`: in this case, a whole program like Helm which includes many .el files.

Alexis

unread,
Mar 1, 2015, 9:09:05 PM3/1/15
to help-gn...@gnu.org

On 2015-03-02T12:50:28+1100, Tory S. Anderson said:

TSA> I've never been quite clear in emacs on the meanings of
library, TSA> package, extension... I think I mean package, such
as what you TSA> download from `m-x list-packages`: in this case,
a whole program TSA> like Helm which includes many .el files.

In my experience, in the context of Emacs, a 'package' is
something that is downloaded from one of the ELPAs (Emacs Lisp
Package Archives) - GNU ELPA, MELPA, MELPA-Stable, Marmalade
etc. If you're installing Helm by cloning the Git repo and loading
it manually, you're actually not making use of the Emacs package
system. i would recommend installing Helm from one of the ELPAs,
and then using the upgrade functionality of Emacs' package
system[1] - when you upgrade a package, it will usually (again, in
my experience) get reloaded once the local package has been
updated.

Things that aren't actually available for processing by
`package.el` i would refer to as 'extensions' or 'libraries',
regardless of how many ELisp source files they include.


Alexis.

[1] E.g. by doing M-x package-list-packages, then typing U to mark
all upgradeable packages, then typing x to start the upgrade
process.

Joost Kremers

unread,
Mar 1, 2015, 9:18:38 PM3/1/15
to
Alexis wrote:
> [1] E.g. by doing M-x package-list-packages, then typing U to mark
> all upgradeable packages, then typing x to start the upgrade
> process.

Actually, this doesn't guarantee that the upgraded packages are loaded
properly. I've found that there are cases where restarting Emacs is an
unfortunate necessity.

Helm is in fact one of these cases:

https://github.com/emacs-helm/helm#install-from-emacs-packaging-system


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

Tory S. Anderson

unread,
Mar 1, 2015, 9:22:10 PM3/1/15
to Alexis, help-gn...@gnu.org
You're right; usually I rely on Elpa/MELPA, but I believe (correct me if I'm wrong) that even MELPA takes a day to update, hence my use of the git repo.

Alexis <flexi...@gmail.com> writes:

> On 2015-03-02T12:50:28+1100, Tory S. Anderson said:
>
> TSA> I've never been quite clear in emacs on the meanings of library, TSA> package, extension... I think I mean package, such as what you TSA> download from `m-x list-packages`: in this case, a whole program TSA> like Helm which includes many .el files.
>
> In my experience, in the context of Emacs, a 'package' is something that is downloaded from one of the ELPAs (Emacs Lisp Package Archives) - GNU ELPA, MELPA, MELPA-Stable, Marmalade etc. If you're installing Helm by cloning the Git repo and loading it manually, you're actually not making use of the Emacs package system. i would recommend installing Helm from one of the ELPAs, and then using the upgrade functionality of Emacs' package system[1] - when you upgrade a package, it will usually (again, in my experience) get reloaded once the local package has been updated.
>
> Things that aren't actually available for processing by `package.el` i would refer to as 'extensions' or 'libraries', regardless of how many ELisp source files they include.
>
>
> Alexis.
>

Alexis

unread,
Mar 1, 2015, 9:35:17 PM3/1/15
to help-gnu-emacs

On 2015-03-02T13:22:02+1100, Tory S. Anderson said:

TSA> You're right; usually I rely on Elpa/MELPA, but I believe
TSA> (correct me if I'm wrong) that even MELPA takes a day to
update, TSA> hence my use of the git repo.

No, MELPA rebuilds modified packages roughly every hour (or two at
most). So when i push changes to the GitHub repo for any one of
the Emacs packages i maintain, a new version of the relevant
package is usually available for download within 1-2 hours
(sometimes much less, if i've pushed the changes minutes before a
scheduled MELPA build).


Alexis.

Alexis

unread,
Mar 1, 2015, 9:40:18 PM3/1/15
to help-gn...@gnu.org

On 2015-03-02T13:18:36+1100, Joost Kremers said:

JK> Alexis wrote:

>> [1] E.g. by doing M-x package-list-packages, then typing U to
>> mark all upgradeable packages, then typing x to start the
>> upgrade process.

JK> Actually, this doesn't guarantee that the upgraded packages
are JK> loaded properly. I've found that there are cases where
restarting JK> Emacs is an unfortunate necessity.

JK> Helm is in fact one of these cases:

JK>
https://github.com/emacs-helm/helm#install-from-emacs-packaging-system

True! i typically don't need Helm updates that urgently, and
restart either Emacs or my system on a regular basis, so i don't
particular notice this issue.

Nevertheless, i would still suggest that people try to use the
package system as much as possible, and only work around it when
absolutely necessary (such as needing Helm updates as rapidly as
possible).


Alexis.

Vaidheeswaran C

unread,
Mar 3, 2015, 3:40:49 PM3/3/15
to help-gn...@gnu.org
On Monday 02 March 2015 04:52 AM, Tory S. Anderson wrote:

> In this case, I'm talking about the Helm package. I follow it on git
> and sometimes will `git pull` to update it, then can make it. But
> the only way I know to implement the new changes in emacs is to
> restart emacs. I tried evaluate-buffer on one of the main library
> files, but it didn't seem to do the trick. Restarting emacs is a
> pain if I have many ongoing projects; how can I implement the
> updates to the package without restarting emacs?

For single file libraries use,

M-x load-library file.el

M-x load-library file.elc



0 new messages