branch: elpa/casual
commit 77b2caa4fbd20d0847ba2b58745b30146fc750d1
Author: Stefan Monnier <[email protected]>
Commit: Charles Choi <[email protected]>
Request to distribute Casual packages on NonGNU ELPA
> OK, happy to hear that. I just tried to build the package locally, and
> ran into an issue when compiling the manual. Apparently
>
> #+TEXINFO_CLASS: casual
>
> in casual.org causes an error:
>
> user-error("Unknown Texinfo class: %S" "casual")
>
> Then there remains the question about the image sizes, that as I have
> mentioned vastly increase the size of the tarball. Another thing that
> would be useful here would be to track the files you wish to exclude
> from the distributed tarball in an .elpaignore file.
The Texinfo class issue is solved by loading `casualdocs.el` before
exporting the Texinfo. That just means we can't use our own code to
generate the Texi.
We can workaround the problem within the "spec" file with something like
:shell-command "emacs ..."
but I hope Charles can install something like the patch below so that
the exact Emacs incantation is moved to its Makefile(s). That patch
also adjusts the `.gitignore` to skip more generated files and
`.elpaignore` to avoid stuffing the images into the tarball where they
presumably won't be used (reduces the size of the tarball by a factor
~5x).
With the patch below, I can successfully build the tarball, including
its doc, with the following spec:
(casual :url "https://github.com/kickingvegas/casual"
;; The docs are in Org but require additional ELisp settings.
:make "docs/casual.texi"
:doc "docs/casual.texi"
:lisp-dir "lisp")
Charles, WDYT about the patch below?
One more thing: I see you store the generated `casual.info` in Git.
It's not the end of the world if you do, but NonGNU ELPA doesn't need it
(it builds the Info on its own) and having those generated files in Git
has caused problems in the past (I have added various hacks to the build
procedure to try and avoid those problems, and lately they seem to work
well enough).
=== Stefan
commit 51fcb45cb3c6d8850ec0c1d82ab01ca21a3f2e48
Author: Stefan Monnier <[email protected]>
Date: Tue Feb 24 19:44:55 2026 -0500
-
---
.elpaignore | 1 +
.gitignore | 9 +++++++++
Makefile | 3 +++
docs/Makefile | 8 +++++++-
4 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/.elpaignore b/.elpaignore
new file mode 100644
index 0000000000..26ca40cfaf
--- /dev/null
+++ b/.elpaignore
@@ -0,0 +1 @@
+docs/images
diff --git a/.gitignore b/.gitignore
index 206569dc66..98843d98b7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,12 @@
# Undo-tree save-files
*.~undo-tree
+
+# Generated docs.
+*.texi
+*.info
+
+# ELPA-generated files
+/casual-pkg.el
+/casual-autoloads.el
+/lisp/casual-autoloads.el
diff --git a/Makefile b/Makefile
index e8d0fe8ea9..d873e91f07 100644
--- a/Makefile
+++ b/Makefile
@@ -131,6 +131,9 @@ create-gh-release: create-release-tag
status:
git status
+docs/%:
+ $(MAKE) -C docs $*
+
.PHONY: user-guide
user-guide:
$(MAKE) -C docs gen-html
diff --git a/docs/Makefile b/docs/Makefile
index 73eba78d11..7caec55b50 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -33,6 +33,12 @@ run: $(PKG_NAME).info
clean: clean-html
- rm $(PKG_NAME).texi $(PKG_NAME).info
+# FIXME: Add all the `*.org` files as dependencies.
+${PKG_NAME}.texi:
+ $(EXEC_NAME) -Q --batch -l casualdocs.el ${PKG_NAME}.org \
+ --eval "(org-texinfo-export-to-texinfo)"
+
+# FIXME: Use ${PKG_NAME}.texi?
.PHONY: gen-info
gen-info:
$(EXEC_NAME) -Q --batch
\
@@ -44,7 +50,7 @@ html:
mkdir html
.PHONY: gen-html
-gen-html: gen-info html html/images html/main.css sync-images
+gen-html: ${PKG_NAME}.texi html html/images html/main.css sync-images
makeinfo \
--html \
--css-ref=main.css \