Hi Maxim! Am Sonntag, den 04.04.2021, 00:35 -0400 schrieb Maxim Cournoyer: > Hi Leo! > > Leo Prikler <leo.prik...@student.tugraz.at> writes: > > > With this, the search path specification of EMACSLOADPATH does no > > longer > > depend on the version of Emacs, which should make upgrading major > > versions > > less painful. See also: > > - <https://bugs.gnu.org/43627> > > - <https://bugs.gnu.org/47458> > > > > * gnu/packages/emacs.scm (emacs)[#:phases]: Add ‘wrap-load-path’. > > [native-search-path]<EMACSLOADPATH>: Do not search for builtin > > libraries. > > (emacs-next)[native-search-path]: Inherit from emacs. > > --- > > gnu/packages/emacs.scm | 31 ++++++++++++++++--------------- > > 1 file changed, 16 insertions(+), 15 deletions(-) > > > > diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm > > index 7447cfe33a..e12c489f8d 100644 > > --- a/gnu/packages/emacs.scm > > +++ b/gnu/packages/emacs.scm > > @@ -201,6 +201,20 @@ > > (car (find-files "bin" "^emacs-([0-9]+\\.)+[0- > > 9]+$")) > > "bin/emacs") > > #t))) > > + (add-after 'strip-double-wrap 'wrap-load-path > > + (lambda* (#:key outputs #:allow-other-keys) > > + (let* ((out (assoc-ref outputs "out")) > > + (lisp-dirs (find-files (string-append out > > "/share/emacs") > > + "^lisp$" > > + #:directories? #t))) > > + (for-each > > + (lambda (prog) > > + (wrap-program prog > > + `("EMACSLOADPATH" suffix ,lisp-dirs))) > > + (find-files (string-append out "/bin") > > + ;; versioned and unversioned emacs > > binaries > > + "^emacs(-[0-9]+(\\.[0-9]+)*)?$")) > > + #t))) > > Shouldn't we wrap all the binaries to be on the safe side? Things > such > as emacsclient probably ought to have EMACSLOADPATH set correctly, > no? The remaining binaries are - emacsclient, which inherits its EMACSLOADPATH from the server it connects to - ctags, ebrowse and etags, which are helper binaries, that don't seem to rely on EMACSLOADPATH at all. (Or is there an indicator, that they do?) - .-real binaries, that should only be wrapped once. We could relax the regex to include the upper two, but I don't think it's necessary to do so.
> > (add-before 'reset-gzip-timestamps 'make-compressed- > > files-writable > > ;; The 'reset-gzip-timestamps phase will throw a > > permission error > > ;; if gzip files aren't writable then. This phase is > > needed when > > @@ -255,9 +269,7 @@ > > (native-search-paths > > (list (search-path-specification > > (variable "EMACSLOADPATH") > > - ;; The versioned entry is for the Emacs' builtin > > libraries. > > - (files (list "share/emacs/site-lisp" > > - (string-append "share/emacs/" version > > "/lisp")))) > > + (files '("share/emacs/site-lisp"))) > > (search-path-specification > > (variable "INFOPATH") > > (files '("share/info"))))) > > @@ -294,18 +306,7 @@ languages.") > > "0igjm9kwiswn2dpiy2k9xikbdfc7njs07ry48fqz70anljj8y7y3") > > ))) > > (native-inputs > > `(("autoconf" ,autoconf) > > - ,@(package-native-inputs emacs))) > > - (native-search-paths > > - (list (search-path-specification > > - (variable "EMACSLOADPATH") > > - ;; The versioned entry is for the Emacs' builtin > > libraries. > > - (files (list "share/emacs/site-lisp" > > - (string-append "share/emacs/" > > - (version- > > major+minor+point version) > > - "/lisp")))) > > - (search-path-specification > > - (variable "INFOPATH") > > - (files '("share/info")))))))) > > + ,@(package-native-inputs emacs)))))) > > > > (define-public emacs-next-pgtk > > (let ((commit "ae18c8ec4f0ef37c8c9cda473770ff47e41291e2") > > This makes sense, and can make it to master rather than core-updates, > which is neat. I'd like to avoid pushing this to master just yet, because we also have changes in the Emacs build system to discuss and I don't want to cause an "Emacs world" rebuild twice in a row. That said, I'm including this patch in wip-emacs with the plan to push to master or staging once everything there is resolved. Regards, Leo