Comments (7)
Hi, Vladimir,
I just checked in codes for selective plugins. Now you can use #+REVEAL_PLUGINS or set variable org-reveal-plugins to a Lisp list to select plugins.
To meet the request you mentioned, please add
#+REVEAL_PLUGINS: (classList highlight zoom notes search)
from org-reveal.
Great! But you've used a string, so you had to do (car (read-from-string...))
.
Better declare it a list (see org-export-options-alist):
(:reveal-plugins "REVEAL_PLUGINS" nil org-reveal-plugins split)
But there's something I don't like about the documentation of 'split': "Split values at white spaces, and cons them to the previous list": does that mean the user can only add to the default value? Before proceeding, please check this.
If you declare it a list, then you can check for correct values, see (info "(elisp)Composite Types")
:
(defcustom org-reveal-plugins
'(classList markdown highlight zoom notes)
"Reveal plugins to load"
:group 'org-export-reveal
:type (set (choice (const :doc "Cross-browser shim implementing classList, MANDATORY" classList)
(const :doc "Interpret Markdown in slides" markdown)
(const :doc "Syntax highlight for SRC blocks" highlight)
...
)))
Note: I've never used defcustom, this above is untested :-)
from org-reveal.
I tried as you have suggested. The split
option specify how the new value of an option is appended to the old ones. split
join them together with white spaces as the seperator. So the value is still a string. To extract the list, we still need a call of read-from-string
, an equivalent effort as current code does. So I'd prefer not change the codes. :)
from org-reveal.
Sorry I can't debug this now, but I looked at the code:
'split
appears twice in ox.el:
(defun org-export-insert-default-template
...
(mapconcat 'identity (eval (nth 3 entry)) " ")
(defun org-export--get-subtree-options
...
(org-split-string value))
The first one converts a list value to a space-separated string, for inserting in the org buffer wiht C-e #.
The second one converts space-separated string to list, for usage by the export process.
So it seems to me your code should get a list. What initial value do you use?
Even if it gets a string (which you can split with org-split-string), isn't it worth it to have choice checking with (defcustom :type)
?
from org-reveal.
isn't it worth it to have choice checking with (defcustom :type)
?
from org-reveal.
Hi, Vladimir,
I just checked in the codes that use the Emacs sexp widget type to define org-reveal-plugins.
I'd like to thank you for your suggestions, which get me to be familiar with the Emacs widgets, a realy amazing feature that I didn't know before. I didn't even know the exact purpose of (defcustom) when I was imitating those in ox-html. :)
Regards,
Yujie
from org-reveal.
Nice!
from org-reveal.
Related Issues (20)
- Slot for extra <script src> tags
- org-reveal-export-to-html not available in emacs batch mode HOT 2
- Problem with org-reveal-extra-script-src HOT 2
- how to change the default size of the slide? HOT 4
- On apple mac only: Single file displays nothing HOT 4
- Single file still has local dependencies
- Using plugins seems broken with current reveal.js HOT 3
- Unable to set theme HOT 2
- Left-alignment broken by comment/note HOT 2
- multiplex confusion HOT 10
- feature request: REVEAL_PROLOGUE_HTML REVEAL_EPILOGUE_HTML HOT 2
- How to tell org-reveal to use latex package HOT 5
- disable the center behavior HOT 1
- 94c43ff36a47f6fa3d865e67f0b99bf0de146db2
- Font color in tables HOT 3
- Image path after export HOT 2
- org-reveal-export-to-html does not respect ordered list start-number with the [@n] trick
- Support request: configure ORGFILE_client.html multiplex output filename
- Adding multiple stylesheets with EXPORT_REVEAL_EXTRA_CSS property does not work as expected
- No dot after section number when using split:t
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from org-reveal.