Morgan Smith <[email protected]> writes: > See attached a new patch series
Thanks! > Things that are different: > > When installing packages I still override `package-user-dir' to install them > into "$(pkgdir)" but when doing other things, I simply add the directory to > `package-directory-list' so that users can still use `package-user-dir' if > they > so choose. However, this could have bad consequences for people using > multiple > emacs versions that only overwrite `EMACSLOADPATH` and not `package-user-dir'. > I'm not familiar with how most people do multiple Emacs versions so please let > me know if this is a concern. Hmm. I tried make repro, and now I get all the autoloads from all the packages in my elpa directory with make repro. That's not supposed to happen. We need to isolate the environment. > I added a simple override flag to skip cleanpkg when doing the repro target I tried make uppkg EMACS=emacs-29 make cleanpkg EMACS=emacs-29 I get make: Nothing to be done for 'cleanpkg'. >> Daniel also suggested another approach - ship compat together with Org >> mode, just as Emacs ships third-party libraries. Not for ELPA, just for >> git repository. >> >> The idea is to keep your code, but *commit* the compat to Git repo. >> Then, we can have a special make target to update compat in git. >> WDYT? > > I've spent a lot of time unvendoring code for the Guix project so asking me to > vendor code feels very wrong. I don't really have a good argument against > doing it other then that one though. Could you explain more about unvendoring? What exactly is problematic there? > Are git submodules any good these days? Last I tried they where terrible but > also getting regular improvements (this was like 4 years ago). Still annoying. > # start Emacs with no user and site configuration > # EMACSQ = -vanilla # XEmacs > -EMACSQ = $(EMACS) -Q > +EMACSQ = $(EMACS) -Q \ > + --eval '(setq vc-handled-backends nil org-startup-folded nil > org-element-cache-persistent nil)' \ > + --eval '(make-directory "$(pkgdir)" t)' \ > + --eval '(add-to-list `package-directory-list "$(pkgdir)")' \ > + -f package-initialize This will enable all the installed packages where the rest of Makefile expects emacs -Q. Basically, you made EMACSQ and equivalent of normal emacs command. > +(require 'package) > +(require 'lisp-mnt) > + > +(cl-macrolet > + ((static-when (condition &rest body) > + (when (eval condition lexical-binding) > + (cons 'progn body)))) > + (static-when (version< emacs-version "29.9999") Why not just (unless (fboundp ...))? -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
