From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:43822) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7R7g-0006Sm-Fk for guix-patches@gnu.org; Thu, 27 Feb 2020 16:55:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7R7c-0001MZ-FZ for guix-patches@gnu.org; Thu, 27 Feb 2020 16:55:12 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:54420) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j7R7b-0001KT-Ec for guix-patches@gnu.org; Thu, 27 Feb 2020 16:55:08 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j7R7W-00046A-Cm for guix-patches@gnu.org; Thu, 27 Feb 2020 16:55:02 -0500 Subject: [bug#38619] Byte compilation of Emacs autoloads Resent-Message-ID: From: Maxim Cournoyer References: <87lfremcr7.fsf@gmail.com> <87tv3c72v4.fsf@ambrevar.xyz> Date: Thu, 27 Feb 2020 16:53:52 -0500 In-Reply-To: <87tv3c72v4.fsf@ambrevar.xyz> (Pierre Neidhardt's message of "Thu, 27 Feb 2020 11:15:27 +0100") Message-ID: <87h7zbn1cf.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Pierre Neidhardt Cc: 38619@debbugs.gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Hello Pierre, Pierre Neidhardt writes: I've now tested this change with the extensive manifest (attached). I've built two profiles, like this: (before change) ./pre-inst-env guix package -m emacs-pkg.txt -p /tmp/emacs-ref (after change) ./pre-inst-env guix package -m emacs-pkg.txt -p /tmp/emacs-byte-compiled Then proceeded to benchmark them like: --8<---------------cut here---------------start------------->8--- env -i sh -c "source /tmp/emacs-ref/etc/profile && time emacs --batch --eval '()'" --8<---------------cut here---------------end--------------->8--- Which returned: --8<---------------cut here---------------start------------->8--- Loading /gnu/store/ipfaivbqjxfnda970w558vpihd84lqwi-profile/share/emacs/site-lisp/treepy-autoloads.el (source)... Loading /gnu/store/ipfaivbqjxfnda970w558vpihd84lqwi-profile/share/emacs/site-lisp/ts-autoloads.el (source)... Loading /gnu/store/ipfaivbqjxfnda970w558vpihd84lqwi-profile/share/emacs/site-lisp/tuareg-autoloads.el (source)... Eager macro-expansion failure: (file-missing "Searching for program" "No such file or directory" "git") Searching for program: No such file or directory, git real 0m0.406s user 0m0.361s sys 0m0.044s --8<---------------cut here---------------end--------------->8--- Now with the patches here: --8<---------------cut here---------------start------------->8--- Loading /gnu/store/l09fascj5xjhbgi3nzc1bhrprdy44y9g-profile/share/emacs/site-lisp/treepy-autoloads... Loading /gnu/store/l09fascj5xjhbgi3nzc1bhrprdy44y9g-profile/share/emacs/site-lisp/ts-autoloads... Loading /gnu/store/l09fascj5xjhbgi3nzc1bhrprdy44y9g-profile/share/emacs/site-lisp/tuareg-autoloads.el (source)... Eager macro-expansion failure: (file-missing "Searching for program" "No such file or directory" "git") Searching for program: No such file or directory, git real 0m0.287s user 0m0.251s sys 0m0.036s --8<---------------cut here---------------end--------------->8--- That's a decent speedup :-) I'll push this to master shortly. Maxim --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=emacs-pkg.txt Content-Description: emacs packages manifest (specifications->manifest '("emacs" "emacs-wget" "emacs-w3m" "emacs-markup-faces" "emacs-guix" "emacs-doom-themes" "emacs-ztree" "emacs-zoutline" "emacs-zotxt" "emacs-zones" "emacs-znc" "emacs-zerodark-theme" "emacs-zenburn-theme" "emacs-youtube-dl" "emacs-yasnippet" "emacs-yasnippet-snippets" "emacs-yaml-mode" "emacs-xtest" "emacs-xterm-color" "emacs-xr" "emacs-xpm" "emacs-xmlgen" "emacs-xml-rpc" "emacs-xelb" "emacs-wttrin" "emacs-ws-butler" "emacs-writeroom" "emacs-writegood-mode" "emacs-wordnut" "emacs-wordgen" "emacs-with-editor" "emacs-windower" "emacs-window-layout" "emacs-whitespace-cleanup-mode" "emacs-which-key" "emacs-wgrep" "emacs-websocket" "emacs-webfeeder" "emacs-web-server" "emacs-web-mode" "emacs-web-beautify" "emacs-wc-mode" "emacs-vterm" "emacs-visual-regexp" "emacs-visual-fill-column" "emacs-vimrc-mode" "emacs-vdiff" "emacs-vdiff-magit" "emacs-validate" "emacs-use-package" "emacs-unpackaged-el" "emacs-unkillable-scratch" "emacs-unidecode" "emacs-unfill" "emacs-undohist-el" "emacs-undo-tree" "emacs-undo-propose-el" "emacs-undercover" "emacs-typo" "emacs-typescript-mode" "emacs-ts" "emacs-treepy" "emacs-treemacs" "emacs-treemacs-extra" "emacs-tree-mode" "emacs-transpose-frame" "emacs-transmission" "emacs-transient" "emacs-tramp-auto-auth" "emacs-tracking" "emacs-tldr" "emacs-tiny" "emacs-tide" "emacs-test-simple" "emacs-terraform-mode" "emacs-telega" "emacs-tco-el" "emacs-taskrunner" "emacs-tao-theme" "emacs-tagedit" "emacs-tablist" "emacs-systemd-mode" "emacs-synosaurus" "emacs-symon" "emacs-symbol-overlay" "emacs-sx" "emacs-switch-window" "emacs-switch-buffer-functions" "emacs-suggest" "emacs-sudo-edit" "emacs-stumpwm-mode" "emacs-stripe-buffer" "emacs-string-inflection" "emacs-stream" "emacs-strace-mode" "emacs-stickyfunc-enhance" "emacs-ssh-config-mode" "emacs-ssh-agency" "emacs-sr-speedbar" "emacs-spinner" "emacs-sparql-mode" "emacs-spark" "emacs-spaceline" "emacs-spacegray-theme" "emacs-sourcemap" "emacs-solarized-theme" "emacs-solaire-mode" "emacs-so-long" "emacs-sml-mode" "emacs-smex" "emacs-smartparens" "emacs-smart-mode-line" "emacs-sly" "emacs-sly-quicklisp" "emacs-sly-package-inferred" "emacs-sly-named-readtables" "emacs-sly-macrostep" "emacs-sly-asdf" "emacs-slime" "emacs-slime-repl-ansi-color" "emacs-slime-company" "emacs-slack" "emacs-skewer-mode" "emacs-skeletor" "emacs-simple-mpc" "emacs-simple-httpd" "emacs-shut-up" "emacs-shroud" "emacs-shrink-path" "emacs-shift-number" "emacs-shell-switcher" "emacs-shackle" "emacs-sesman" "emacs-seq" "emacs-semantic-refactor" "emacs-scroll-on-drag" "emacs-scribble-mode" "emacs-scratch-el" "emacs-scheme-complete" "emacs-scel" "emacs-s" "emacs-rust-mode" "emacs-rudel" "emacs-rsw-elisp" "emacs-rspec" "emacs-rpm-spec-mode" "emacs-rotate-text" "emacs-robot-mode" "emacs-robe" "emacs-rjsx-mode" "emacs-rich-minority" "emacs-rfcview" "emacs-restclient" "emacs-restart-emacs" "emacs-request" "emacs-repo" "emacs-repl-toggle" "emacs-relint" "emacs-reformatter" "emacs-refactor" "emacs-redshank" "emacs-recent-addresses" "emacs-realgud" "emacs-rainbow-mode" "emacs-rainbow-identifiers" "emacs-rainbow-delimiters" "emacs-rainbow-blocks" "emacs-racket-mode" "emacs-queue" "emacs-quasi-monochrome" "emacs-pyvenv" "emacs-python-environment" "emacs-pyim" "emacs-pyim-basedict" "emacs-puppet-mode" "emacs-punpun-theme" "emacs-pulseaudio-control" "emacs-pubmed" "emacs-psession" "emacs-prop-menu" "emacs-projectile" "emacs-prodigy-el" "emacs-pretty-mode" "emacs-prettier" "emacs-prescient" "emacs-powerline" "emacs-posframe" "emacs-pos-tip" "emacs-popup" "emacs-polymode" "emacs-polymode-org" "emacs-polymode-ansible" "emacs-poet-theme" "emacs-pkg-info" "emacs-pinentry" "emacs-picpocket" "emacs-php-mode" "emacs-phi-search" "emacs-phi-search-mc" "emacs-pg" "emacs-pfuture" "emacs-perspective" "emacs-peg" "emacs-peep-dired" "emacs-pdf-tools" "emacs-pcre2el" "emacs-password-store" "emacs-pass" "emacs-parseedn" "emacs-parseclj" "emacs-parsebib" "emacs-parinfer-mode" "emacs-parent-mode" "emacs-paren-face" "emacs-paredit" "emacs-pandoc-mode" "emacs-page-break-lines" "emacs-package-lint" "emacs-ox-twbs" "emacs-ox-pandoc" "emacs-ox-hugo" "emacs-ox-epub" "emacs-ov" "emacs-outshine" "emacs-outorg" "emacs-origami-el" "emacs-orgit" "emacs-orgalist" "emacs-org" "emacs-org2web" "emacs-org-web-tools" "emacs-org-trello" "emacs-org-tree-slide" "emacs-org-tanglesync" "emacs-org-super-agenda" "emacs-org-sidebar" "emacs-org-rich-yank" "emacs-org-reveal" "emacs-org-ref" "emacs-org-redmine" "emacs-org-recent-headings" "emacs-org-re-reveal" "emacs-org-ql" "emacs-org-present" "emacs-org-pomodoro" "emacs-org-now" "emacs-org-noter" "emacs-org-mind-map" "emacs-org-make-toc" "emacs-org-jira" "emacs-org-emms" "emacs-org-edit-latex" "emacs-org-download" "emacs-org-contrib" "emacs-org-caldav" "emacs-org-bullets" "emacs-org-brain" "emacs-org-auto-expand" "emacs-openwith" "emacs-on-screen" "emacs-olivetti" "emacs-ob-restclient" "emacs-ob-ipython" "emacs-oauth2" "emacs-nswbuff" "emacs-npm-mode" "emacs-nov-el" "emacs-noflet" "emacs-nodejs-repl" "emacs-no-littering" "emacs-nnreddit" "emacs-nix-mode" "emacs-nhexl-mode" "emacs-nginx-mode" "emacs-neotree" "emacs-navi-mode" "emacs-names" "emacs-mwim" "emacs-mustache" "emacs-multiple-cursors" "emacs-multi-term" "emacs-mu4e-patch" "emacs-mu4e-jump-to-list" "emacs-mu4e-conversation" "emacs-mu4e-alert" "emacs-mpdel" "emacs-move-text" "emacs-monroe" "emacs-monky" "emacs-moe-theme-el" "emacs-modus-themes" "emacs-mocker" "emacs-mmm-mode" "emacs-mkmcc-gnuplot-mode" "emacs-mixed-pitch" "emacs-mit-scheme-doc" "emacs-minitest" "emacs-minions" "emacs-miniedit" "emacs-minibuffer-line" "emacs-metal-mercury-mode" "emacs-message-x" "emacs-memoize" "emacs-md4rd" "emacs-mc-extras" "emacs-mbsync" "emacs-matrix-client" "emacs-math-symbol-lists" "emacs-matcha" "emacs-mastodon" "emacs-markdown-preview-mode" "emacs-markdown-mode" "emacs-makey" "emacs-make-it-so" "emacs-magit" "emacs-magit-todos" "emacs-magit-svn" "emacs-magit-popup" "emacs-magit-org-todos-el" "emacs-magit-gerrit" "emacs-macrostep" "emacs-m-buffer-el" "emacs-lua-mode" "emacs-lsp-ui" "emacs-lsp-mode" "emacs-lsp-lua-emmy" "emacs-lsp-java" "emacs-lsp-ivy" "emacs-lpy" "emacs-lorem-ipsum" "emacs-loop" "emacs-logview" "emacs-log4e" "emacs-loc-changes" "emacs-load-relative" "emacs-litable" "emacs-list-utils" "emacs-lispyville" "emacs-lispy" "emacs-lisp-extra-font-lock" "emacs-linum-relative" "emacs-link-hint" "emacs-lice-el" "emacs-libmpdel" "emacs-let-alist" "emacs-leetcode" "emacs-leaf" "emacs-lcr" "emacs-lacarte" "emacs-kv" "emacs-know-your-http-well" "emacs-keyfreq" "emacs-key-chord" "emacs-julia-mode" "emacs-json-snatcher" "emacs-json-reformat" "emacs-json-mode" "emacs-js2-refactor-el" "emacs-js2-mode" "emacs-jinja2-mode" "emacs-jedi" "emacs-janpath-evil-numbers" "emacs-ivy" "emacs-ivy-yasnippet" "emacs-ivy-xref" "emacs-ivy-taskrunner" "emacs-ivy-rich" "emacs-ivy-pass" "emacs-ivy-omni-org" "emacs-ivy-clipmenu" "emacs-itail" "emacs-isearch-prop" "emacs-isearch-dabbrev" "emacs-isearch+" "emacs-irony-mode" "emacs-irony-mode-server" "emacs-irony-eldoc" "emacs-irfc" "emacs-interactive-align" "emacs-info-plus" "emacs-inf-ruby" "emacs-image+" "emacs-iedit" "emacs-idris-mode" "emacs-ido-vertical-mode" "emacs-ido-ubiquitous" "emacs-ido-completing-read+" "emacs-idle-highlight" "emacs-ibuffer-projectile" "emacs-hydra" "emacs-hy-mode" "emacs-htmlize" "emacs-ht" "emacs-howm" "emacs-hl-todo" "emacs-highlight-symbol" "emacs-highlight-stages" "emacs-highlight-sexp" "emacs-highlight-numbers" "emacs-highlight-indentation" "emacs-highlight-escape-sequences" "emacs-highlight-defined" "emacs-hierarchy" "emacs-hide-mode-line" "emacs-hercules" "emacs-helpful" "emacs-helm" "emacs-helm-wikipedia" "emacs-helm-taskrunner" "emacs-helm-system-packages" "emacs-helm-swoop" "emacs-helm-sly" "emacs-helm-slime" "emacs-helm-shell-history" "emacs-helm-projectile" "emacs-helm-pass" "emacs-helm-org" "emacs-helm-org-rifle" "emacs-helm-org-contacts" "emacs-helm-notmuch" "emacs-helm-mu" "emacs-helm-mode-manager" "emacs-helm-make" "emacs-helm-lsp" "emacs-helm-ls-git" "emacs-helm-linux-disks" "emacs-helm-lacarte" "emacs-helm-gtags" "emacs-helm-flycheck" "emacs-helm-fish-completion" "emacs-helm-firefox" "emacs-helm-exwm" "emacs-helm-eww" "emacs-helm-emms" "emacs-helm-descbinds" "emacs-helm-dash" "emacs-helm-company" "emacs-helm-clojuredocs" "emacs-helm-cider" "emacs-helm-c-yasnippet" "emacs-helm-bibtex" "emacs-helm-ag" "emacs-hcl-mode" "emacs-haskell-mode" "emacs-handle" "emacs-hackernews" "emacs-gtk-look" "emacs-gruvbox-theme" "emacs-groovy-modes" "emacs-grep-context" "emacs-grep-a-lot" "emacs-graphviz-dot-mode" "emacs-graphql" "emacs-goto-chg" "emacs-google-translate" "emacs-google-maps" "emacs-google-c-style" "emacs-god-mode" "emacs-go-mode" "emacs-gnus-harvest" "emacs-gnus-alias" "emacs-gnuplot" "emacs-gnugo" "emacs-gntp" "emacs-gitpatch" "emacs-gitlab-ci-mode" "emacs-github-review" "emacs-git-timemachine" "emacs-git-modes" "emacs-git-messenger" "emacs-git-link" "emacs-git-gutter" "emacs-git-gutter-fringe" "emacs-git-auto-commit-mode" "emacs-git-annex" "emacs-gif-screencast" "emacs-ghub" "emacs-ggtags" "emacs-general" "emacs-geiser" "emacs-fullframe" "emacs-frog-menu" "emacs-frog-jump-buffer" "emacs-fringe-helper" "emacs-frecency" "emacs-frame-purpose" "emacs-forge" "emacs-fold-dwim" "emacs-focus" "emacs-flyspell-correct" "emacs-flycheck" "emacs-flycheck-irony" "emacs-flycheck-haskell" ;"emacs-flycheck-grammalecte" ;build fails "emacs-flycheck-flow" "emacs-flycheck-cpplint" "emacs-flx" "emacs-flow-minor-mode" "emacs-fish-mode" "emacs-fish-completion" "emacs-find-file-in-project" "emacs-finalize" "emacs-fill-column-indicator" "emacs-ffap-rfc-space" "emacs-fancy-narrow" "emacs-faceup" "emacs-f" "emacs-f3" "emacs-exwm" "emacs-exwm-x" "emacs-exwm-edit" "emacs-extend-smime" "emacs-extempore-mode" "emacs-expand-region" "emacs-exec-path-from-shell" "emacs-eww-lnum" "emacs-ewmctrl" "emacs-evil" "emacs-evil-visualstar" "emacs-evil-visual-replace" "emacs-evil-traces" "emacs-evil-textobj-syntax" "emacs-evil-text-object-python" "emacs-evil-surround" "emacs-evil-smartparens" "emacs-evil-replace-with-register" "emacs-evil-quickscope" "emacs-evil-owl" "emacs-evil-org" "emacs-evil-numbers" "emacs-evil-nerd-commenter" "emacs-evil-multiedit" "emacs-evil-mc" "emacs-evil-matchit" "emacs-evil-markdown" "emacs-evil-magit" "emacs-evil-lion" "emacs-evil-indent-plus" "emacs-evil-expat" "emacs-evil-exchange" "emacs-evil-commentary" "emacs-evil-collection" "emacs-evil-cleverparens" "emacs-evil-args" "emacs-evil-anzu" "emacs-eval-sexp-fu-el" "emacs-esxml" "emacs-esup" "emacs-espuds" "emacs-eshell-z" "emacs-eshell-up" "emacs-eshell-toggle" "emacs-eshell-prompt-extras" "emacs-eshell-did-you-mean" "emacs-eshell-bookmark" "emacs-esh-help" "emacs-esh-autosuggest" "emacs-es-mode" "emacs-ert-runner" "emacs-ert-expectations" "emacs-ert-async" "emacs-eros" "emacs-ergoemacs-mode" "emacs-erc-scrolltoplace" "emacs-erc-image" "emacs-erc-hl-nicks" "emacs-equake" "emacs-eprime" "emacs-epl" "emacs-epkg" "emacs-epc" "emacs-engine-mode" "emacs-emojify" "emacs-emms" "emacs-emms-mode-line-cycle" "emacs-emmet-mode" "emacs-emamux" "emacs-emacsql" "emacs-elpy" "emacs-elpher" "emacs-elmacro" "emacs-elixir-mode" "emacs-elisp-slime-nav" "emacs-elisp-refs" "emacs-elisp-docstring-mode" "emacs-elisp-demos" "emacs-elfeed" "emacs-elfeed-org" "emacs-el2org" "emacs-el-x" "emacs-el-search" "emacs-el-patch" "emacs-el-mock" "emacs-eimp" "emacs-edn" "emacs-editorconfig" "emacs-edit-server" "emacs-edit-indirect" "emacs-ediprolog" ; "emacs-edbi" ;build fails ; "emacs-edbi-sqlite" ;(depends on emacs-edbi) "emacs-ebuild-mode" "emacs-ebib" "emacs-ebdb" "emacs-easy-kill" "emacs-eacl" "emacs-e2wm" "emacs-dumb-jump" "emacs-dts-mode" "emacs-dtrt-indent" "emacs-dream-theme" "emacs-download-region" "emacs-dotenv-mode" "emacs-doom-modeline" "emacs-dockerfile-mode" "emacs-docker" "emacs-docker-tramp" "emacs-docker-compose-mode" "emacs-dmenu" "emacs-djvu" "emacs-disk-usage" "emacs-discover-my-major" "emacs-disable-mouse" "emacs-direnv" "emacs-dired-toggle-sudo" "emacs-dired-sidebar" "emacs-dired-rsync" "emacs-dired-hacks" "emacs-dired-du" "emacs-dimmer" "emacs-diminish" "emacs-diff-hl" "emacs-desktop-environment" "emacs-delight" "emacs-deft" "emacs-deferred" "emacs-default-text-scale" "emacs-default-encrypt" "emacs-dedicated" "emacs-debpaste" "emacs-debbugs" "emacs-deadgrep" "emacs-datetime" "emacs-dashboard" "emacs-dash" "emacs-dash-docs" "emacs-darkroom" "emacs-dante" "emacs-danneskjold-theme" "emacs-daemons" "emacs-d-mode" "emacs-cyberpunk-theme" "emacs-ctable" "emacs-csv-mode" "emacs-crux" "emacs-counsel-tramp" "emacs-counsel-projectile" "emacs-counsel-etags" "emacs-counsel-dash" "emacs-constants" "emacs-compdef" "emacs-company" "emacs-company-restclient" "emacs-company-quickhelp" "emacs-company-posframe" "emacs-company-math" "emacs-company-lua" "emacs-company-lsp" "emacs-company-jedi" "emacs-company-irony" "emacs-company-flow" "emacs-company-ebdb" "emacs-company-cabal" "emacs-company-auctex" "emacs-commander" "emacs-column-marker" "emacs-cnfonts" "emacs-cmake-font-lock" "emacs-closql" "emacs-clojure-mode" "emacs-cl-print" "emacs-cl-generic" "emacs-circe" "emacs-cider" "emacs-cdlatex" "emacs-ccls" "emacs-calfw" "emacs-buttercup" "emacs-butler" "emacs-build-farm" "emacs-bui" "emacs-bug-hunter" "emacs-browse-at-remote" "emacs-boxquote" "emacs-bongo" "emacs-blimp" "emacs-blackout" "emacs-biblio" "emacs-better-defaults" "emacs-benchmark-init" "emacs-beginend" "emacs-bbdb" "emacs-bash-completion" "emacs-base16-theme" "emacs-avy" "emacs-autothemer" "emacs-auto-yasnippet" "emacs-auto-complete" "emacs-auth-source-pass" "emacs-auctex" "emacs-attrap" "emacs-atom-one-dark-theme" "emacs-async" "emacs-ascii-art-to-unicode" "emacs-arduino-mode" "emacs-apheleia" "emacs-anzu" "emacs-ansi" "emacs-annalist" "emacs-anaphora" "emacs-amx" "emacs-ample-theme" "emacs-ample-regexps" "emacs-almost-mono-themes" "emacs-all-the-icons" "emacs-all-the-icons-dired" "emacs-alert" "emacs-alect-themes" "emacs-ahungry-theme" "emacs-aggressive-indent" "emacs-ag" "emacs-adoc-mode" "emacs-add-node-modules-path" "emacs-add-hooks" "emacs-adaptive-wrap" "emacs-ace-window" "emacs-ace-link" "emacs-ace-jump-mode" "emacs-academic-phrases" "emacs-a" "emacs-2048-game" "emacs-tuareg" "emacs-recutils" "emacs-protobuf-mode" "emacs-mew" "emacs-ledger-mode" "emacs-flycheck-dedukti" "emacs-ess" "emacs-erlang" "emacs-dedukti-mode" "emacs-cmake-mode" "emacs-clang-rename" "emacs-clang-format" "emacs-ansible-doc" "emacs-agda2-mode")) --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-emacs-Byte-compile-the-site-lisp-directory.patch Content-Transfer-Encoding: quoted-printable From=207ee79cdaa04a2531adf64cdac38c565774e24da5 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 5 Dec 2019 13:40:32 +0900 Subject: [PATCH 1/7] gnu: emacs: Byte compile the site-lisp directory. * gnu/packages/emacs.scm (emacs): Use the (gnu build emacs-utils) module. Byte compile the site-lisp directory as part of the 'install-site-start' phase. (emacs-minimal, emacs-xwidgets, emacs-no-x, emacs-no-x-toolkit): Reset modu= les to those of the gnu-build-system. =2D-- gnu/packages/emacs.scm | 43 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index b26c928e87..18c8549cb9 100644 =2D-- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -129,6 +129,11 @@ `(#:tests? #f ; no check target #:configure-flags (list "--with-modules" "--disable-build-details") + #:modules ((guix build emacs-utils) + (guix build glib-or-gtk-build-system) + (guix build utils)) + #:imported-modules ((guix build emacs-utils) + ,@%glib-or-gtk-build-system-modules) #:phases (modify-phases %standard-phases (add-before 'configure 'fix-/bin/pwd @@ -145,7 +150,8 @@ ;; automatically found. (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) =2D (lisp-dir (string-append out "/share/emacs/site-lisp= "))) + (lisp-dir (string-append out "/share/emacs/site-lisp")) + (emacs (string-append out "/bin/emacs"))) (copy-file (assoc-ref inputs "guix-emacs.el") (string-append lisp-dir "/guix-emacs.el")) (with-output-to-file (string-append lisp-dir "/site-start.e= l") @@ -158,6 +164,9 @@ ;; share/emacs/site-lisp union when added to EMACSLOADPATH, ;; which leads to conflicts. (delete-file (string-append lisp-dir "/subdirs.el")) + ;; Byte compile the site-start files. + (parameterize ((%emacs emacs)) + (emacs-byte-compile-directory lisp-dir)) #t)))))) (inputs `(("gnutls" ,gnutls) @@ -326,6 +335,12 @@ languages.") (build-system gnu-build-system) (arguments (substitute-keyword-arguments (package-arguments emacs) + ((#:modules _) + `((guix build emacs-utils) + ,@%gnu-build-system-modules)) + ((#:imported-modules _) + `((guix build emacs-utils) + ,@%gnu-build-system-modules)) ((#:phases phases) `(modify-phases ,phases (delete 'install-site-start))) @@ -345,6 +360,12 @@ editor (with xwidgets support)") (build-system gnu-build-system) (arguments (substitute-keyword-arguments (package-arguments emacs) + ((#:modules _) + `((guix build emacs-utils) + ,@%gnu-build-system-modules)) + ((#:imported-modules _) + `((guix build emacs-utils) + ,@%gnu-build-system-modules)) ((#:configure-flags flags ''()) `(cons "--with-xwidgets" ,flags)))) (inputs @@ -358,6 +379,14 @@ editor (with xwidgets support)") (synopsis "The extensible, customizable, self-documenting text editor (console only)") (build-system gnu-build-system) + (arguments + (substitute-keyword-arguments (package-arguments emacs) + ((#:modules _) + `((guix build emacs-utils) + ,@%gnu-build-system-modules)) + ((#:imported-modules _) + `((guix build emacs-utils) + ,@%gnu-build-system-modules)))) (inputs (fold alist-delete (package-inputs emacs) '("libx11" "gtk+" "libxft" "libtiff" "giflib" "libjpeg" @@ -376,9 +405,15 @@ editor (without an X toolkit)" ) (inputs (append `(("inotify-tools" ,inotify-tools)) (alist-delete "gtk+" (package-inputs emacs)))) (arguments =2D `(,@(substitute-keyword-arguments (package-arguments emacs) =2D ((#:configure-flags cf) =2D `(cons "--with-x-toolkit=3Dno" ,cf))))))) + (substitute-keyword-arguments (package-arguments emacs) + ((#:modules _) + `((guix build emacs-utils) + ,@%gnu-build-system-modules)) + ((#:imported-modules _) + `((guix build emacs-utils) + ,@%gnu-build-system-modules)) + ((#:configure-flags cf) + `(cons "--with-x-toolkit=3Dno" ,cf)))))) =20 (define-public guile-emacs (let ((commit "41120e0f595b16387eebfbf731fff70481de1b4b") =2D-=20 2.25.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-emacs-build-system-Byte-compile-the-autoload-files.patch Content-Transfer-Encoding: quoted-printable From=2017c0eb0499196600ceb516ad67b010c281e1b188 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 6 Dec 2019 15:12:32 +0900 Subject: [PATCH 2/7] emacs-build-system: Byte compile the autoload files. * guix/build/emacs-build-system.scm (enable-autoloads-compilation) (validate-compiled-autoloads): Add procedures. (%standard-phases): Register the new procedures. * gnu/packages/aux-files/emacs/guix-emacs.el (guix-emacs-find-autoloads): Remove duplicates in the list of autoload files found. * guix/build/emacs-utils.scm (expr->string): Add procedure. (emacs-batch-eval, emacs-batch-edit-file): Use it. =2D-- gnu/packages/aux-files/emacs/guix-emacs.el | 5 +++-- guix/build/emacs-build-system.scm | 22 ++++++++++++++++++++-- guix/build/emacs-utils.scm | 10 ++++++++-- 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/gnu/packages/aux-files/emacs/guix-emacs.el b/gnu/packages/aux-= files/emacs/guix-emacs.el index 05fc9709b6..25a87ee52d 100644 =2D-- a/gnu/packages/aux-files/emacs/guix-emacs.el +++ b/gnu/packages/aux-files/emacs/guix-emacs.el @@ -35,8 +35,9 @@ "Return a list of Emacs 'autoloads' files in DIRECTORY. The files in the list do not have extensions (.el, .elc)." ;; `directory-files' doesn't honor group in regexp. =2D (mapcar #'file-name-sans-extension =2D (directory-files directory 'full-name guix-emacs-autoloads-reg= exp))) + (delete-dups (mapcar #'file-name-sans-extension + (directory-files directory 'full-name + guix-emacs-autoloads-regexp)))) =20 ;;;###autoload (defun guix-emacs-autoload-packages () diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-sys= tem.scm index 09de244993..219310cf08 100644 =2D-- a/guix/build/emacs-build-system.scm +++ b/guix/build/emacs-build-system.scm @@ -225,6 +225,21 @@ parallel. PARALLEL-TESTS? is ignored when using a non-= make TEST-COMMAND." (parameterize ((%emacs emacs)) (emacs-generate-autoloads elpa-name site-lisp)))) =20 +(define* (enable-autoloads-compilation #:key outputs #:allow-other-keys) + "Remove the NO-BYTE-COMPILATION local variable embedded in the generated +autoload files." + (let* ((out (assoc-ref outputs "out")) + (autoloads (find-files out "-autoloads.el$"))) + (substitute* autoloads + ((";; no-byte-compile.*") "")) + #t)) + +(define* (validate-compiled-autoloads #:key outputs #:allow-other-keys) + "Verify whether the byte compiled autoloads load fine." + (let* ((out (assoc-ref outputs "out")) + (autoloads (find-files out "-autoloads.elc$"))) + (emacs-batch-eval (format #f "(mapc #'load '~s)" autoloads)))) + (define (emacs-package? name) "Check if NAME correspond to the name of an Emacs package." (string-prefix? "emacs-" name)) @@ -253,10 +268,13 @@ second hyphen. This corresponds to 'name-version' as= used in ELPA packages." (replace 'check check) (replace 'install install) (add-after 'install 'make-autoloads make-autoloads) =2D (add-after 'make-autoloads 'patch-el-files patch-el-files) + (add-after 'make-autoloads 'enable-autoloads-compilation + enable-autoloads-compilation) + (add-after 'enable-autoloads-compilation 'patch-el-files patch-el-file= s) ;; The .el files are byte compiled directly in the store. (add-after 'patch-el-files 'build build) =2D (add-after 'build 'move-doc move-doc))) + (add-after 'build 'validate-compiled-autoloads validate-compiled-autol= oads) + (add-after 'validate-compiled-autoloads 'move-doc move-doc))) =20 (define* (emacs-build #:key inputs (phases %standard-phases) #:allow-other-keys #:rest args) diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm index 885fd0a217..ab64e3714c 100644 =2D-- a/guix/build/emacs-utils.scm +++ b/guix/build/emacs-utils.scm @@ -41,16 +41,22 @@ ;; The `emacs' command. (make-parameter "emacs")) =20 +(define (expr->string expr) + "Converts EXPR, an expression, into a string." + (if (string? expr) + expr + (format #f "~s" expr))) + (define (emacs-batch-eval expr) "Run Emacs in batch mode, and execute the elisp code EXPR." (invoke (%emacs) "--quick" "--batch" =2D (format #f "--eval=3D~S" expr))) + (string-append "--eval=3D" (expr->string expr)))) =20 (define (emacs-batch-edit-file file expr) "Load FILE in Emacs using batch mode, and execute the elisp code EXPR." (invoke (%emacs) "--quick" "--batch" (string-append "--visit=3D" file) =2D (format #f "--eval=3D~S" expr))) + (string-append "--eval=3D" (expr->string expr)))) =20 (define (emacs-batch-disable-compilation file) (emacs-batch-edit-file file =2D-=20 2.25.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0003-gnu-emacs-Fix-comment.patch Content-Transfer-Encoding: quoted-printable From=208f4044b385252b914feff6584ac683e16935006e Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 27 Feb 2020 14:20:58 -0500 Subject: [PATCH 3/7] gnu: emacs: Fix comment. * gnu/packages/emacs.scm (emacs): Fix comment. =2D-- gnu/packages/emacs.scm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 18c8549cb9..fd9c7fa875 100644 =2D-- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -144,10 +144,8 @@ "pwd")) #t)) (add-after 'install 'install-site-start =2D ;; Use 'guix-emacs' in "site-start.el". This way, Emacs pack= ages =2D ;; provided by Guix and installed in =2D ;; ~/.guix-profile/share/emacs/site-lisp/guix.d/PACKAGE-VERSI= ON are =2D ;; automatically found. + ;; Use 'guix-emacs' in "site-start.el", which is used autoload = the + ;; Elisp packages found in EMACSLOADPATH. (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (lisp-dir (string-append out "/share/emacs/site-lisp")) =2D-=20 2.25.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0004-gnu-emacs-cl-generic-Disable-byte-compilation-of-its.patch Content-Transfer-Encoding: quoted-printable From=209a91d7018ea0d2749f88014c7dd0d1a4bfb99fba Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 7 Dec 2019 02:47:25 +0900 Subject: [PATCH 4/7] gnu: emacs-cl-generic: Disable byte compilation of its autoload file. *gnu/packages/emacs-xyz.scm (emacs-cl-generic)[phases] {enable-autoloads-compilation}: Delete. =2D-- gnu/packages/emacs-xyz.scm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 76b9746f69..7235ef611a 100644 =2D-- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -12066,6 +12066,10 @@ match and total match information in the mode-line= in various search modes.") (base32 "0vb338bhjpsnrf60qgxny4z5rjrnifahnrv9axd4shay89d894zq")))) (build-system emacs-build-system) + ;; Byte compilation of the autoload file fails. + (arguments + `(#:phases (modify-phases %standard-phases + (delete 'enable-autoloads-compilation)))) (home-page "https://elpa.gnu.org/packages/seq.html") (synopsis "Forward @code{cl-generic} compatibility for Emacs before version 25") =2D-=20 2.25.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0005-gnu-emacs-sly-macrostep-Remove-the-enable-autoloads-.patch Content-Transfer-Encoding: quoted-printable From=20070c392b7af00b054ee4fe86548d621fbba8d1bb Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 27 Feb 2020 16:00:58 -0500 Subject: [PATCH 5/7] gnu: emacs-sly-macrostep: Remove the enable-autoloads-compilation phase. * gnu/packages/emacs-xyz.scm (emacs-sly-macrostep)[phases] {enable-autoloads-compilation}: Remove. =2D-- gnu/packages/emacs-xyz.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 7235ef611a..9bb636f75e 100644 =2D-- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -7567,7 +7567,8 @@ file.") #:phases ;; The package provides autoloads. (modify-phases %standard-phases =2D (delete 'make-autoloads)))) + (delete 'make-autoloads) + (delete 'enable-autoloads-compilation)))) (synopsis "Expand Common Lisp macros inside source files with SLY") (description "@command{sly-macrostep} is a SLY contrib for expanding CL macros r= ight =2D-=20 2.25.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0006-gnu-emacs-sly-quicklisp-Remove-the-enable-autoloads-.patch Content-Transfer-Encoding: quoted-printable From=202e6c80424943ce8a14fe901dfc5db4afeda64006 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 27 Feb 2020 16:03:33 -0500 Subject: [PATCH 6/7] gnu: emacs-sly-quicklisp: Remove the enable-autoloads-compilation phase. * gnu/packages/emacs-xyz.scm (emacs-sly-quicklisp)[phases] {enable-autoloads-compilation}: Remove. =2D-- gnu/packages/emacs-xyz.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 9bb636f75e..faf3a55ba1 100644 =2D-- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -7476,7 +7476,8 @@ xref, etc...) are still available, but with better in= tegration.") #:phases ;; The package provides autoloads. (modify-phases %standard-phases =2D (delete 'make-autoloads)))) + (delete 'make-autoloads) + (delete 'enable-autoloads-compilation)))) (synopsis "Quicklisp support for SLY") (description "@command{sly-quicklisp} is an external contrib for SLY that provid= es a =2D-=20 2.25.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0007-gnu-emacs-sly-named-readtables-Disable-byte-compilat.patch Content-Transfer-Encoding: quoted-printable From=208e6dfcf318d3f88ae131b737483c1b3bd0139f2e Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 27 Feb 2020 16:07:06 -0500 Subject: [PATCH 7/7] gnu: emacs-sly-named-readtables: Disable byte compilat= ion of its autoload file. *gnu/packages/emacs-xyz.scm (emacs-sly-named-readtables)[phases] {enable-autoloads-compilation}: Delete. =2D-- gnu/packages/emacs-xyz.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index faf3a55ba1..ca8392c896 100644 =2D-- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -7534,7 +7534,10 @@ additional support for working with ASDF projects.") (propagated-inputs `(("emacs-sly" ,emacs-sly))) (arguments =2D '(#:include (cons* "\\.lisp$" "\\.asd$" %default-include))) + '(#:include (cons* "\\.lisp$" "\\.asd$" %default-include) + #:phases (modify-phases %standard-phases + ;; Byte compilation of the autoload file fails. + (delete 'enable-autoloads-compilation)))) (synopsis "Named-readtables support for SLY") (description "@command{sly-named-readtables} is an external contrib for SLY that =2D-=20 2.25.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEJ9WGpPiQCFQyn/CfEmDkZILmNWIFAl5YOnAACgkQEmDkZILm NWIajg//fN0ZTUka1VeCuP/7jVGLSz+omem4hwvevmbpsAUzVLX3LajW/dNaWyXF bkG1MPC32LJBiBJJ4z4q9MvN1Oaimb5I1+qPV5TqcaMoAtwuPeq4IKdHqnK7zdC/ eRs7NiiEL3Oe+GcfF4UJrnaGKcKwrL7H9jy2gH95eXYMx6uB59jU9hUfn8I/hYna FiydS12HkD2u1kEIVTT8uL5TVy0qo3I23jOdABlZR/mArnXMcYGRKUqdDkMbsqyk 6A7EY4XSVuZyS33ZcqiZf8I54142vhdAaOJZ5k3KV422EDBX29sQ0GVo3jlT+Fiw XDQqDM5PidoNqEAbVhRXwx/c18JzJIaj/HFSustiQdIINuEO5O4+p971iQh2YAV1 MoQfr8IoT85jInUQBZhsAoLT+DjD4vyix8xEkk4Oq52QeDVRoz5zuT3o0C3b/F7W CYlLBY7nE/Jc8L6tQ97MMClgHwTcQD50rWcKMCehWdlgdT6xheeTr/H63Zbe7bfm xYPUDtdIU2Q6USJay4YSGdCF4JKGahPHvueJpU7G3dTXkZVNMM8g/UK64vFD5VMZ ygO7o46Ccl+6a+n3mC3Lj+jM/AjyGiuORVnDHIfl7Holu6O2NcIxleIQ2qbbcOlJ 0B5tKMP9YY4hMCataEJjOwE4ztN2TyFnT0RHr/thlNZetUMJuN8= =d8sa -----END PGP SIGNATURE----- --==-=-=--