Add latest Org version installation script and update init.el

The commit adds a script to install the latest version of Org on GitHub
Actions and updates init.el to use the latest version of Org.
This commit is contained in:
Jason TIAN 2023-05-19 03:03:47 +08:00
parent fe5dca76f3
commit d4080affdf
3 changed files with 37 additions and 9 deletions

View File

@ -24,6 +24,11 @@ jobs:
with:
version: ${{ matrix.emacs_version }}
- name: Install the latest Org
run: |
chmod +x ./install-latest-org.sh
./install-latest-org.sh
- uses: actions/checkout@v3
with:
submodules: recursive

12
init.el
View File

@ -86,15 +86,9 @@
(package-refresh-contents))
(when (string-equal (getenv "ELPA") "online")
;; https://github.com/jwiegley/use-package/issues/955
;; https://github.com/jwiegley/use-package/issues/319
(message "Built-in Org version: %s" (org-version))
(defun my-ignore-builtin (pkg)
(assq-delete-all pkg package--builtins)
(assq-delete-all pkg package--builtin-versions))
(my-ignore-builtin 'org) ; remove the records of Org from variable
(use-package org)
(message "New Org version: %s" (org-version)))
;; use the latest version of Org
(add-to-list 'load-path (concat (getenv "GITHUB_WORKSPACE") "/src/org-mode/lisp"))
(message "Org version: %s" (org-version)))
(setq use-package-always-ensure t) ; to install the package if it is not
; installed

29
install-latest-org.sh Normal file
View File

@ -0,0 +1,29 @@
#! /bin/sh -x -u -e
#
# Install the latest version of Org on GitHub Actions
# Reference https://orgmode.org/manual/Installation.html
#
WHERE="${GITHUB_WORKSPACE}/src/"
mkdir -p ${WHERE}
cd ${WHERE}
# pull for first time if we don't have it
if [ ! -d ${WHERE}/org-mode ]; then
git clone https://git.savannah.gnu.org/git/emacs/org-mode.git
else
# get updates, if any
cd ${WHERE}/org-mode
git pull
fi
# build the autoloads
cd ${WHERE}/org-mode
make autoloads
# Add to .emacs, .emacs.d/init.el, whatever...
#
# (add-to-list 'load-path (concat (getenv "GITHUB_WORKSPACE") "/src/org-mode/lisp"))