-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't find information on using a local version of a package #4979
Comments
I'm curious about this also and the recommended ways to load packages locally. I have a custom layer and it works fine when I pull everything down from melpa. But, when I put the same packages I want to work on in private//local to try work on them, those packages never get loaded. I found two ways that work. Either explicitly So, basically I'm curious I guess what is it that is different between local packages and melpa packages that causes this loading behavior. |
One thing that could go wrong if you have a local checkout of the repository as opposed to the elpa directory generated by package.el is that the autoloads aren't properly configured. In package.el these are generated from |
Use |
Ah, that makes sense now, I was unaware of how the autoload cookies actually worked. Thanks! |
Would love to see a correct doc on this point. The For instance in
So if you just want to take an elpa package, make some local changes to it (without renaming it), what's the best way to do so ? |
You should be able to override a location with To see the value of location you can try the new function The documentation needs improvement in this area, I believe that a tutorial is the best format to grok the layer advanced stuff. |
@syl20bnr I have investigated a bit more. |
This is indeed expected, A configuration layer does this |
I ran into the exact same issue as @dalaing. Using The only way I managed to load my package was to add the following to
My setup:
|
Additionally, the first thing I tried was to add the package on my load-path in
But note that does not work, because the package has already been required by a layer previously, so further Hence, you have to use Finally, as noted by @deb0ch on Gitter, the |
I am not sure how
In the (cond
((eq 'dotfile (car (oref pkg :owners)))
(spacemacs-buffer/message
(format "%S is configured in the dotfile." pkg-name)))
(t
(configuration-layer//configure-package pkg))) It even prints a message that you can observer in messages buffer. But if you wish to overload package location to local in |
@d12frosted Correct me if I'm wrong, but setting (setq dotspacemacs-additional-packages (some-package :location "/some/path/to/package")) used to work, right ? Because it doesn't work now. At some point I didn't have to use the file fetcher recipe (and I haven't seen it documented either). |
Never used |
I have tried according to the docs, but still no success. dotspacemacs-additional-packages
'(dtrt-indent
(spaceline :location (recipe :fetcher file
:repo "/home/chauvo_t/.emacs.d/private/local/spaceline/"))) does not install Spaceline correctly:
EDIT: In the code I pasted it is my second try, using the keyword |
@d12frosted I mentionned that I tried to set I just tried |
@d12frosted should we open a separate issue ? |
So, is there any solution a year and a half later? |
I haven't had to use a local only package yet, but for repos you can fork or for using a specific branch of a package, edit
|
Well, as a maintainer of zephir-mode I have managed to enable this as follows: $ mkdir -p $HOME/.emacs.d/private/local/zephir-mode
$ ln -s <PROJECT_HOME>/zephir-mode.el $HOME/.emacs.d/private/local/zephir-mode/zephir-mode.el Then added ;; ...
dotspacemacs-additional-packages
'((zephir-mode :location
(recipe :fetcher file
:path "~/.emacs.d/private/local/zephir-mode/zephir-mode.el"))) Note: After each file change I have to:
A bit weird for me or at least terribly uncomfortable |
what about using it from a layer? layers can have local packages and hopefully the layer packages should not get cached like it would for an additional-package. |
Seems like the
|
I have a similar issue, but related to cc-mode, that comes with emacs itself. It looks like there's no way to make it work, while other packages (coming from MELPA, or new ones) seem to work. I opened #9929, so it's a bit more specific. |
@fmdkdd , I think it is better to use |
This should be closed since #9861 has been merged 👀 |
Thank you for the heads up ! 👍 |
I'm trying to add something to
flycheck
, which in my setup is used by thesyntax-checking
and+lang/haskell
layers.It is unclear how to get spacemacs to use
flycheck
from a local checkout of the code.I've tried modifying the relevant packages.el files to contain
(flycheck :location local)
, with flycheck in<layer>/local/flycheck
, but it's not picking up on any of the changes.I've also tried adding it in via
dotspacemacs-additional-packages
, both withlocal
and paths to the package as the location.This seems similar to these two issues, and all I can find in gitter is other people unable to do the same kind of thing.
I don't think I can just copy the code into a private layer, since it's coming from two different existing layers.
Am I missing something obvious?
The text was updated successfully, but these errors were encountered: