From: Akib Azmain Turja <akib@disroot.org>
To: help-gnu-emacs@gnu.org
Subject: Re: How to develop a local fork of a package?
Date: Sun, 04 Sep 2022 08:43:44 +0600 [thread overview]
Message-ID: <87tu5nkgf3.fsf@disroot.org> (raw)
In-Reply-To: <87r10s8u79.fsf@dataswamp.org> (Emanuel Berg's message of "Sat, 03 Sep 2022 15:26:50 +0200")
[-- Attachment #1: Type: text/plain, Size: 2166 bytes --]
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2022-09-04 2:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-03 11:12 How to develop a local fork of a package? Alessandro Bertulli
2022-09-03 13:26 ` Emanuel Berg
2022-09-04 2:43 ` Akib Azmain Turja [this message]
2022-09-04 22:20 ` Alessandro Bertulli
2022-09-05 11:38 ` Akib Azmain Turja
[not found] ` <443fb46d2c9b2384869ade5fd0764611c0e0fe66bc5b546d7118a24832e90579@mu.id>
2022-09-04 22:40 ` Alessandro Bertulli
2022-09-05 11:40 ` Akib Azmain Turja
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://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tu5nkgf3.fsf@disroot.org \
--to=akib@disroot.org \
--cc=help-gnu-emacs@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).