From a220ac6ef96a91ac224d558a76fc68d37b08b752 Mon Sep 17 00:00:00 2001 From: Jakob L. Kreuze Date: Mon, 11 Mar 2019 17:52:50 -0400 Subject: Add workaround for installing Org packaging with straight.el --- jakob.org | 49 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 3 deletions(-) (limited to 'jakob.org') diff --git a/jakob.org b/jakob.org index 81b2aa6..cfb55e2 100644 --- a/jakob.org +++ b/jakob.org @@ -33,6 +33,42 @@ I use [[https://github.com/raxod502/straight.el][straight.el]] insetad of =packa (load bootstrap-file nil 'nomessage)) #+END_SRC +=straight.el= does have a known issue with installing Org, however, and requires a +workaround early on. The details are outlined [[https://github.com/raxod502/straight.el#installing-org-with-straightel][here]] + +#+BEGIN_SRC elisp +(require 'subr-x) +(straight-use-package 'git) + +(defun org-git-version () + "The Git version of org-mode. +Inserted by installing org-mode or when a release is made." + (require 'git) + (let ((git-repo (expand-file-name + "straight/repos/org/" user-emacs-directory))) + (string-trim + (git-run "describe" + "--match=release\*" + "--abbrev=6" + "HEAD")))) + +(defun org-release () + "The release version of org-mode. +Inserted by installing org-mode or when a release is made." + (require 'git) + (let ((git-repo (expand-file-name + "straight/repos/org/" user-emacs-directory))) + (string-trim + (string-remove-prefix + "release_" + (git-run "describe" + "--match=release\*" + "--abbrev=0" + "HEAD"))))) + +(provide 'org-version) +#+END_SRC + For installation and configuration of packages, I use the [[https://github.com/jwiegley/use-package][use-package]] macro. #+BEGIN_SRC elisp @@ -867,7 +903,7 @@ Emacs starts. #+BEGIN_SRC elisp (use-package org - :straight nil + :straight org-plus-contrib :demand t :init (setq-default org-id-locations-file "~/.cache/emacs/org-id-locations") @@ -1149,11 +1185,18 @@ items right on the first try. It's unhelpful and really just annoying. (setq org-drill-forgetting-index 100)) #+END_SRC +# Workaround + +#+BEGIN_SRC elisp +(straight-use-package '(org-drill :type git :host github :repo "hakanserce/org-drill")) +(require 'org-drill) +#+END_SRC + *** Blog #+BEGIN_SRC elisp -;; (use-package ox-hugo -;; :straight nil) +(use-package ox-hugo) +#+END_SRC #+END_SRC ** pdf-tools -- cgit v1.3