From 34787b58add09decbf31e0e583fd315a207ce88d Mon Sep 17 00:00:00 2001 From: "Pedro A. Aranda" Date: Sun, 10 Mar 2024 11:44:38 +0100 Subject: [PATCH 3/4] A short doc for reproducible native compilations when developing --- doc/native-devel.org | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 doc/native-devel.org diff --git a/doc/native-devel.org b/doc/native-devel.org new file mode 100644 index 000000000..0cc18a6fe --- /dev/null +++ b/doc/native-devel.org @@ -0,0 +1,33 @@ +#+title: A reproducible natively compiled org-mode +#+subtitle: Release {{{version}}} +#+author: The Org Mode Developers +#+language: en + +* Introduction + +In order to develop and test ~org-mode~ when your Emacs editor +supports native compilation, there are two things to take into +account: + +1. you will need to =make native= to generate the =.eln= files. These + will be stored under the ~lisp/~ directory of your development + ~org-mode~ directory. +2. Add the following code in your Emacs ~early-init.el~ file: + +#+BEGIN_SRC emacs-lisp +(let ((org-devel-path (expand-file-name "/lisp"))) + (when (file-directory-p org-devel-path) + (when (native-comp-available-p) + (let ((first (pop native-comp-eln-load-path))) + ;; put in second place + (add-to-list 'native-comp-eln-load-path org-devel-path t) + (add-to-list 'native-comp-eln-load-path first t))) + (add-to-list 'load-path org-devel-path))) +#+END_SRC + +putting the correct path for your org-mode development directory. In +my case, it is =~/Devel/org-mode=, so the first =let= looks like this: + +#+BEGIN_SRC emacs-lisp +(let ((org-devel-path (expand-file-name "~/Devel/org-mode/lisp"))) +#+END_SRC -- 2.34.1