* Install and load new emacs package without restarting it
@ 2023-05-04 9:38 André A. Gomes
2023-05-04 22:09 ` Mekeor Melire
0 siblings, 1 reply; 5+ messages in thread
From: André A. Gomes @ 2023-05-04 9:38 UTC (permalink / raw)
To: help-guix
Hi Guix,
I'm wondering whether it's possible to install an emacs package and
enable it without restarting emacs.
What I've tried:
- $ guix install emacs-nix-mode
- Locate /gnu/store/...emacs-nix-mode/share/emacs/site-lisp/nix-mode
- Run command dired-do-load from the directory above
Unfortunately it doesn't quite work. It did load the package, but it
prints the following error when trying to enable the mode.
--8<---------------cut here---------------start------------->8---
execute-extended-command: Cannot open load file: No such file or directory, nix-mode
--8<---------------cut here---------------end--------------->8---
Thanks!
--
André A. Gomes
"You cannot even find the ruins..."
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Install and load new emacs package without restarting it
2023-05-04 9:38 Install and load new emacs package without restarting it André A. Gomes
@ 2023-05-04 22:09 ` Mekeor Melire
2023-05-08 1:15 ` Maxim Cournoyer
0 siblings, 1 reply; 5+ messages in thread
From: Mekeor Melire @ 2023-05-04 22:09 UTC (permalink / raw)
To: André A. Gomes; +Cc: help-guix
2023-05-04 12:38 andremegafone@gmail.com:
> Hi Guix,
Hello!
> I'm wondering whether it's possible to install an emacs package
> and
> enable it without restarting emacs.
>
> What I've tried:
>
> - $ guix install emacs-nix-mode
> - Locate
> /gnu/store/...emacs-nix-mode/share/emacs/site-lisp/nix-mode
> - Run command dired-do-load from the directory above
>
> Unfortunately it doesn't quite work. It did load the package,
> but it
> prints the following error when trying to enable the mode.
>
> execute-extended-command: Cannot open load file: No such file or
> directory, nix-mode
I'm not very familiar with dired-do-load, but I guess, it loads
the elisp-files sequentially or so. So, one of those files tries
to load/require "nix-mode" but that file/feature has not been
loaded yet.
Instead, you can try one of these approaches: After installing
emacs-nix-mode, type either:
M-: (load
"~/.guix-profile/share/emacs/site-lisp/nix-mode.../nix-mode.el")
RET
Or:
M-: (add-to-list 'load-path
"~/.guix-profile/share/emacs/site-lisp/nix-mode.../nix-mode.el")
RET
M-: (require 'nix-mode) RET
Or, if you have emacs-guix installed, you could try:
M-x guix-emacs-autoload-packages RET
Good luck!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Install and load new emacs package without restarting it
2023-05-04 22:09 ` Mekeor Melire
@ 2023-05-08 1:15 ` Maxim Cournoyer
2023-05-08 8:11 ` Mekeor Melire
0 siblings, 1 reply; 5+ messages in thread
From: Maxim Cournoyer @ 2023-05-08 1:15 UTC (permalink / raw)
To: Mekeor Melire; +Cc: André A. Gomes, help-guix
Hi,
Mekeor Melire <mekeor@posteo.de> writes:
> 2023-05-04 12:38 andremegafone@gmail.com:
>
>> Hi Guix,
>
> Hello!
>
>> I'm wondering whether it's possible to install an emacs package and
>> enable it without restarting emacs.
>>
[...]
> Or, if you have emacs-guix installed, you could try:
>
> M-x guix-emacs-autoload-packages RET
It should be the above (note that it ships with Guix itself, not with
emacs-guix) as the glue used to load the autoload packages.
It used to work prior to reinstating elisp package installation to their
own unique directory. I think it'd be worth it to open a bug for it and
try to make it work again; it shouldn't be too difficult.
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Install and load new emacs package without restarting it
2023-05-08 1:15 ` Maxim Cournoyer
@ 2023-05-08 8:11 ` Mekeor Melire
2023-05-08 12:18 ` Maxim Cournoyer
0 siblings, 1 reply; 5+ messages in thread
From: Mekeor Melire @ 2023-05-08 8:11 UTC (permalink / raw)
To: Maxim Cournoyer; +Cc: André A. Gomes, help-guix
On May 8, 2023 3:15:55 AM GMT+02:00, Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:
>Hi,
>
>Mekeor Melire <mekeor@posteo.de> writes:
>
>> 2023-05-04 12:38 andremegafone@gmail.com:
>>
>>> Hi Guix,
>>
>> Hello!
>>
>>> I'm wondering whether it's possible to install an emacs package and
>>> enable it without restarting emacs.
>>>
>
>[...]
>
>> Or, if you have emacs-guix installed, you could try:
>>
>> M-x guix-emacs-autoload-packages RET
>
>It should be the above (note that it ships with Guix itself, not with
>emacs-guix) as the glue used to load the autoload packages.
>
>It used to work prior to reinstating elisp package installation to their
>own unique directory. I think it'd be worth it to open a bug for it and
>try to make it work again; it shouldn't be too difficult.
>
>--
>Thanks,
>Maxim
Thanks for clarification.
So, you are suggesting that guix-emacs-autoload-packages currently does not work? I just tested it on my machine and it works just fine.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Install and load new emacs package without restarting it
2023-05-08 8:11 ` Mekeor Melire
@ 2023-05-08 12:18 ` Maxim Cournoyer
0 siblings, 0 replies; 5+ messages in thread
From: Maxim Cournoyer @ 2023-05-08 12:18 UTC (permalink / raw)
To: Mekeor Melire; +Cc: André A. Gomes, help-guix
Hi,
Mekeor Melire <mekeor@posteo.de> writes:
> On May 8, 2023 3:15:55 AM GMT+02:00, Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:
>>Hi,
>>
>>Mekeor Melire <mekeor@posteo.de> writes:
>>
>>> 2023-05-04 12:38 andremegafone@gmail.com:
>>>
>>>> Hi Guix,
>>>
>>> Hello!
>>>
>>>> I'm wondering whether it's possible to install an emacs package and
>>>> enable it without restarting emacs.
>>>>
>>
>>[...]
>>
>>> Or, if you have emacs-guix installed, you could try:
>>>
>>> M-x guix-emacs-autoload-packages RET
>>
>>It should be the above (note that it ships with Guix itself, not with
>>emacs-guix) as the glue used to load the autoload packages.
>>
>>It used to work prior to reinstating elisp package installation to their
>>own unique directory. I think it'd be worth it to open a bug for it and
>>try to make it work again; it shouldn't be too difficult.
>>
>>--
>>Thanks,
>>Maxim
>
> Thanks for clarification.
>
> So, you are suggesting that guix-emacs-autoload-packages currently
> does not work? I just tested it on my machine and it works just fine.
I think it would work only for "legacy" Elisp packages that still
install directly to the EMACSLOADPATH (site-lisp) directory, but not
those who install to their own sub-directory, basically those with
directories listed in your $EMACSLOADPATH/subdirs.el file.
One example in my profile is emacs-cmake-mode, which installs its files
to:
--8<---------------cut here---------------start------------->8---
/gnu/store/...-emacs-cmake-mode-3.25.1/share/emacs/site-lisp/cmake-mode-3.25.1
--8<---------------cut here---------------end--------------->8---
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-05-08 12:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-04 9:38 Install and load new emacs package without restarting it André A. Gomes
2023-05-04 22:09 ` Mekeor Melire
2023-05-08 1:15 ` Maxim Cournoyer
2023-05-08 8:11 ` Mekeor Melire
2023-05-08 12:18 ` Maxim Cournoyer
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).