From 723583e8d737fac93a05fe9dc06a233f3efdc305 Mon Sep 17 00:00:00 2001 From: Diego Zamboni Date: Thu, 27 Aug 2020 07:15:14 +0200 Subject: [PATCH] Automatically download reveal.js and use local copy, default to v4 (#3846) * Automatically download reveal.js upgrade to v4 The +present option now automatically checks out the reveal.js repository and configures org-re-reveal to use it. It also now uses reveal.js 4 instead of 3.9.2. * Changed :init to :config --- modules/lang/org/README.org | 2 +- modules/lang/org/contrib/present.el | 6 +++--- modules/lang/org/packages.el | 6 +++++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/modules/lang/org/README.org b/modules/lang/org/README.org index 78e862be1..3df5d7b16 100644 --- a/modules/lang/org/README.org +++ b/modules/lang/org/README.org @@ -69,7 +69,7 @@ https://www.mfoot.com/blog/2015/11/22/literate-emacs-configuration-with-org-mode + =+pandoc= Enables pandoc integration into the Org exporter. + =+pomodoro= Enables a pomodoro timer for clocking time on tasks. + =+present= Enables integration with reveal.js, beamer and org-tree-slide, so - Emacs can be used for presentations. + Emacs can be used for presentations. It automatically downloads [[https://github.com/hakimel/reveal.js][reveal.js]]. + =+pretty= Enables pretty unicode symbols for bullets and priorities, and better syntax highlighting for latex. Keep in mind: this can be expensive. If org becomes too slow, it'd be wise to disable this flag. diff --git a/modules/lang/org/contrib/present.el b/modules/lang/org/contrib/present.el index bbd5e5667..ef47ba1f6 100644 --- a/modules/lang/org/contrib/present.el +++ b/modules/lang/org/contrib/present.el @@ -13,9 +13,9 @@ (use-package! org-re-reveal :after ox - :init - (setq org-re-reveal-root "https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.9.2" - org-re-reveal-revealjs-version "3.8")) + :config + (setq org-re-reveal-root (expand-file-name "../../" (locate-library "dist/reveal.js" t)) + org-re-reveal-revealjs-version "4")) (use-package! org-tree-slide diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index a4973fb1b..3193ac37f 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -69,7 +69,11 @@ :recipe (:host github :repo "anler/centered-window-mode") :pin "f50859941ab5c7cbeaee410f2d38716252b552ac") (package! org-tree-slide :pin "7126a4365072a32898f169ead8fb59265dabc605") - (package! org-re-reveal :pin "7fe39d5d03ccc75d2811445d25cbbb473b53de76")) + (package! org-re-reveal :pin "7fe39d5d03ccc75d2811445d25cbbb473b53de76") + (package! revealjs + :recipe (:host github :repo "hakimel/reveal.js" + :files ("css" "dist" "js" "plugin")) + :pin "15815efe05ca69c35ce66cfdbf93316e1db66ecb")) (when (featurep! +roam) (package! org-roam :pin "c33867e6bc282ff0a69d4ef4a020db82604039bb") (when (featurep! :completion company)