• (eepitch-shell) cd foo tar xvf testpackage-0-0.tar • (add-to-list 'load-path "~/foo/testpackage-0.0") • (load "testpackage") • (apropos "testpackage") => testpackage-func is an interactive Lisp function in ‘testpackage.el’.
Ah, yeah, I thought a little bit more and you weren't actually saying I-want-to-load-this-file. I guess the concept of a package in emacs lisp does not resemble common lisp at all. I.e. a symbol doesn't have a package like a lisp symbol does. Packaging refers to packaging e.g. a mode for distribution, right? At which point I think we would refer to e.g. melpa github.com/melpa/melpa?tab=rea… about what melpa wants you to do. That's my 25 cents anyway. @sacha
If we look at Xahlee's site here: xahlee.info/emacs/emacs/elisp_… he notes that "The terms “Package” and “Library” do not have technical meaning in elisp.
The term “module” is not used by emacs."
} really, we are concerned with writing modes for emacs. Packaging them for distribution means meeting the package-source's requirements for the mode to be built and then distributed from a git, e.g.. That is my other 25 cents ;p.
This is different to #commonLisp in which I might CL-USER> (uiop:define-package foo) #<"FOO" package> CL-USER> (in-package foo) #<"FOO" package> FOO> (defvar bar) BAR FOO> (export 'bar) T
} this is not an emacs idiom. Similarly, common lisp does not have a notion of interaction major and minor modes like emacs does. I guess package in emacs means something similar to system in the de facto asdf sense in common lisp. In my opinion this collision is confusing.
it feels like you're manually creating a .tar like what would be in an ELPA, but you can submit things to NonGNU ELPA or MELPA as a recipe, which can include your .texi manual if you want. github.com/melpa/melpa/blob/ma…emacsredux.com/blog/2021/08/11… . Before inclusion in one of those repos, people can also install it manually or with use-package :vc or package-vc-install: gnu.org/software/emacs/manual/…
Recently I wrote an article about NonGNU ELPA and I promised to check for myself how easy it is to submit a new package there. I made good on my promise and in this article I’ll briefly describe the process.
@Sacha Chua @screwlisp Yeah, that's essentially what I'm trying to do. My eventual goal is to create my own semi-private ELPA archive, mostly because I don't want to bother people with having to review my probably terrible novice code before including it in their archives. 🙃
None of this code is really ready for public consumption yet. It's more of a learning exercise.
I picked a trivial multifile package example, seq: Tree: gitweb.git.savannah.gnu.org/gi… A package of three files, seq.el, seq-24.el and seq-25.el, and if you are in emacs 25 or later, seq.el requires seq-25 or seq-24 otherwise. Presumably your multi-file elisp project should meaningfully resemble seq e.g. with the conventional package headers.
Yes, you don't write that stuff. []. You just write your major/minor modes as normal, and your headers provide metadata that is used by package sources to generate the package tars. @sacha
as we can see in > (directory "~/.emacs.d/elpa/seq-2.24/*.*") (#P"~/.emacs.d/elpa/seq-2.24/seq.elc" #P"~/.emacs.d/elpa/seq-2.24/seq-25.elc" #P"~/.emacs.d/elpa/seq-2.24/seq-24.elc" #P"~/.emacs.d/elpa/seq-2.24/seq-autoloads.el" #P"~/.emacs.d/elpa/seq-2.24/seq-25.el" #P"~/.emacs.d/elpa/seq-2.24/seq-pkg.el" #P"~/.emacs.d/elpa/seq-2.24/seq.el" #P"~/.emacs.d/elpa/seq-2.24/seq-24.el") if you will forgive some of the-other-lisp ;p @sacha
I thought maybe it needed to be in some GNU variant of the tar format for Emacs to be able to read it, but when I just open the tar file directly in Emacs I get a directory listing and can read all the files, so that's not it.
Jonathan Lamothe
in reply to Jonathan Lamothe • •cloud.jlamothe.net/index.php/s…
#AskFedi
reshared this
screwlisp and vejeta ☑️ reshared this.
Jonathan Lamothe
in reply to Jonathan Lamothe • •FWIW it seems to be complaining that the package description is
nil. Two things about this:define-packagelists this argument as optional.Jonathan Lamothe
in reply to Jonathan Lamothe • •screwlisp
in reply to Jonathan Lamothe • • •• (eepitch-shell)
cd foo
tar xvf testpackage-0-0.tar
• (add-to-list 'load-path "~/foo/testpackage-0.0")
• (load "testpackage")
• (apropos "testpackage")
=>
testpackage-func is an interactive Lisp function in ‘testpackage.el’.
(testpackage-func)
A test function
[back]works on my machine
@sacha
Jonathan Lamothe
in reply to screwlisp • •@screwlisp @Sacha Chua When I try to install it with
M-x package-install-fileit gives me:Wrong type argument: stringp, nilWhen I use the debugger it seems to be caused by it thinking the package description is
nil? I'll try to dig deeper.screwlisp
in reply to Jonathan Lamothe • • •@sacha
GitHub - melpa/melpa: Recipes and build machinery for the biggest Emacs package repo
GitHubscrewlisp
in reply to screwlisp • • •Jonathan Lamothe
in reply to screwlisp • •@screwlisp @Sacha Chua Yeah, I can build simple packages, but the description for how to build a multi-file package seems not to work.
Most packages are distributed in the simple format, but if you want to include a manual for instance, you need a multi-file package.
screwlisp
in reply to Jonathan Lamothe • • •If we look at Xahlee's site here: xahlee.info/emacs/emacs/elisp_… he notes that
"The terms “Package” and “Library” do not have technical meaning in elisp.
The term “module” is not used by emacs."
} really, we are concerned with writing modes for emacs. Packaging them for distribution means meeting the package-source's requirements for the mode to be built and then distributed from a git, e.g.. That is my other 25 cents ;p.
Elisp: load, load-file, autoload
xahlee.infoscrewlisp
in reply to screwlisp • • •This is different to #commonLisp in which I might
CL-USER> (uiop:define-package foo)
#<"FOO" package>
CL-USER> (in-package foo)
#<"FOO" package>
FOO> (defvar bar)
BAR
FOO> (export 'bar)
T
} this is not an emacs idiom. Similarly, common lisp does not have a notion of interaction major and minor modes like emacs does. I guess package in emacs means something similar to system in the de facto asdf sense in common lisp. In my opinion this collision is confusing.
Jonathan Lamothe
in reply to screwlisp • •gnu.org/software/emacs/manual/…
Sacha Chua
in reply to Jonathan Lamothe • • •Submitting a Package to NonGNU ELPA
Bozhidar Batsov (Emacs Redux)Jonathan Lamothe
in reply to Sacha Chua • •@Sacha Chua @screwlisp Yeah, that's essentially what I'm trying to do. My eventual goal is to create my own semi-private ELPA archive, mostly because I don't want to bother people with having to review my probably terrible novice code before including it in their archives. 🙃
None of this code is really ready for public consumption yet. It's more of a learning exercise.
screwlisp
in reply to Jonathan Lamothe • • •I picked a trivial multifile package example, seq:
Tree: gitweb.git.savannah.gnu.org/gi…
A package of three files, seq.el, seq-24.el and seq-25.el, and if you are in emacs 25 or later, seq.el requires seq-25 or seq-24 otherwise. Presumably your multi-file elisp project should meaningfully resemble seq e.g. with the conventional package headers.
Then, I think you are basically looking for quelpa: github.com/quelpa/quelpa
@sacha
GitHub - quelpa/quelpa: Build and install your Emacs Lisp packages on-the-fly directly from source
GitHubJonathan Lamothe
in reply to screwlisp • •@screwlisp @Sacha Chua What's interesting is that this package seems to be lacking a
seq-pkg.elfile. 🤔Edit: Wait, it's in
.gitignore?Is it being auto generated somehow?
screwlisp
in reply to Jonathan Lamothe • • •@sacha
screwlisp
in reply to screwlisp • • •> (directory "~/.emacs.d/elpa/seq-2.24/*.*")
(#P"~/.emacs.d/elpa/seq-2.24/seq.elc"
#P"~/.emacs.d/elpa/seq-2.24/seq-25.elc"
#P"~/.emacs.d/elpa/seq-2.24/seq-24.elc"
#P"~/.emacs.d/elpa/seq-2.24/seq-autoloads.el"
#P"~/.emacs.d/elpa/seq-2.24/seq-25.el"
#P"~/.emacs.d/elpa/seq-2.24/seq-pkg.el"
#P"~/.emacs.d/elpa/seq-2.24/seq.el"
#P"~/.emacs.d/elpa/seq-2.24/seq-24.el")
if you will forgive some of the-other-lisp ;p
@sacha
Jonathan Lamothe
in reply to Jonathan Lamothe • •Sacha Chua
in reply to Jonathan Lamothe • • •Jonathan Lamothe
in reply to Jonathan Lamothe • •testpackage.elfile?