unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Mekeor Melire <mekeor@posteo.de>
To: "André A. Gomes" <andremegafone@gmail.com>
Cc: help-guix@gnu.org
Subject: Re: Install and load new emacs package without restarting it
Date: Thu, 04 May 2023 22:09:58 +0000	[thread overview]
Message-ID: <871qjveo6r.fsf@posteo.de> (raw)
In-Reply-To: <87ednw4etd.fsf@gmail.com>

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!


  reply	other threads:[~2023-05-04 22:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-04  9:38 Install and load new emacs package without restarting it André A. Gomes
2023-05-04 22:09 ` Mekeor Melire [this message]
2023-05-08  1:15   ` Maxim Cournoyer
2023-05-08  8:11     ` Mekeor Melire
2023-05-08 12:18       ` Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871qjveo6r.fsf@posteo.de \
    --to=mekeor@posteo.de \
    --cc=andremegafone@gmail.com \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).