[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to develop a local fork of a package?
From: |
Akib Azmain Turja |
Subject: |
Re: How to develop a local fork of a package? |
Date: |
Sun, 04 Sep 2022 08:43:44 +0600 |
Emanuel Berg <incal@dataswamp.org> writes:
> Alessandro Bertulli wrote:
>
>> (add-to-list 'load-path (expand-file-name "git_packages/org-ref/"))
(expand-file-name "git_packages/org-ref/")? Relative to what? If the
directory is in your ".emacs.d", then it should be (add-to-list
'load-path (expand-file-name "git_packages/org-ref/"
user-emacs-directory)).
>> (delete "/home/alessandro/.emacs.d/elpa/org-ref-20220830.1210" load-path)
>> (package-initialize)
Why? This would break whenever package.el updates org-ref. And this
won't ever work because that directory is not in load-path before
(package-initialize), and after (package-initialize) org-ref will be on
load-path. Your best option is to delete the package with M-x
package-delete. And the "delete" call may not work. You set load-path
to the return value of "delete", for example:
--8<---------------cut here---------------start------------->8---
(setq load-path
(delete "/home/alessandro/.emacs.d/elpa/org-ref-20220830.1210"
load-path))
--8<---------------cut here---------------end--------------->8---
>>
>> But then, no matter which one of these I use
>>
>> (require 'org-ref)
Unless org-ref is in load-path, this will always error.
>> (load "~/.emacs.d/git_packages/org-ref/org-ref")
Where is the ".el" suffix? Did you mean (load
"~/.emacs.d/git_packages/org-ref/org-ref.el")? Loading directly will
probably work for single file packages, but you should always add the
package directory to load-path.
>> (use-package org-ref
>> :ensure nil
>> :load-path "~/.emacs.d/git_packages/org-ref/org-ref.el")
I think the error is because you specify a file as load-path instead of
a directory. I think the load-path should be probably
"~/.emacs.d/git_packages/org-ref/". However, I have never used
:load-path keyword of use-package, so my assumptions may be wrong.
>>
>> I always get errors
>
> What errors?
--
Akib Azmain Turja
Find me on Mastodon at @akib@hostux.social.
This message is signed by me with my GnuPG key. Its fingerprint is:
7001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5
signature.asc
Description: PGP signature