Giter VIP home page Giter VIP logo

org-special-block-extras's Introduction

A unified interface for Emacs' Org-mode block & link types (•̀ᴗ•́)و

Which is used to obtain 30 new custom blocks and 34 link types ¯\_(ツ)_/¯

Abstract

The aim is to write something once using Org-mode markup then generate the markup for multiple backends. That is, write once, generate many!

In particular, we are concerned with ‘custom’, or ‘special’, blocks which delimit how a particular region of text is supposed to be formatted according to the possible export backends. In some sense, special blocks are meta-blocks. Rather than writing text in, say, LaTeX environments using LaTeX commands or in HTML div's using HTML tags, we promote using Org-mode markup in special blocks —Org markup cannot be used explicitly within HTML or LaTeX environments.

Special blocks, like centre and quote, allow us to use Org-mode as the primary interface regardless of whether the final result is an HTML or PDF article; sometime we need to make our own special blocks to avoid a duplication of effort. However, this can be difficult and may require familiarity with relatively advanced ELisp concepts, such as macros and hooks; as such, users may not be willing to put in the time and instead use ad-hoc solutions.

We present a new macro, defblock, which is similar in-spirit to Lisp's standard except that where the latter defines functions, ours defines new special blocks for Emacs' Org-mode —as well as, simultaneously, defining new Org link types. Besides the macro, the primary contribution of this effort is an interface for special blocks that admits arguments and is familar to Org users —namely, we ‘try to reuse’ the familiar src-block interface, including header-args, but for special blocks.

It is hoped that the ease of creating custom special blocks will be a gateway for many Emacs users to start using Lisp.

**

A 5-page PDF covering ELisp fundamentals

** can be found here.

This article is featured in EmacsConf2020, with slides here: No pictures, instead we use this system to make the slides have a variety of styling information; i.e., we write Org and the result looks nice. “Look ma, no HTML required!”

img

Table of Contents

  1. Installation Instructions
  2. Minimal working example
  3. Bye!

The full article may be read as a PDF or as HTML —or visit the repo. Installation instructions are .

Installation Instructions

Manually or using quelpa:

;; ⟨0⟩ Download the org-special-block-extras.el file manually or using quelpa
(quelpa '(org-special-block-extras :fetcher github :repo
"alhassy/org-special-block-extras"))

;; ⟨1⟩ Have this always active in Org buffers
(add-hook #'org-mode-hook #'org-special-block-extras-mode)

;; ⟨1′⟩ Or use: “M-x org-special-block-extras-mode” to turn it on/off

Or with use-package:

(use-package org-special-block-extras
  :ensure t
  :hook (org-mode . org-special-block-extras-mode)
  ;; All relevant Lisp functions are prefixed ‘o-’; e.g., `o-docs-insert'.
  :custom
    (o-docs-libraries
     '("~/org-special-block-extras/documentation.org")
     "The places where I keep my ‘#+documentation’")))

Then, provide support for a new type of special block, say re-using the src blocks that, say, folds up all such blocks in HTML export, by declaring the following.

(o-defblock src (lang nil) (title nil exports nil file nil)
  "Fold-away all ‘src’ blocks as ‘<details>’ HTML export.
If a block has a ‘:title’, use that to title the ‘<details>’."
  (format "<details> <summary> %s </summary> <pre> %s </pre></details>"
          (or title (concat "Details; " lang))
          raw-contents))

Minimal working example

The following example showcases the prominent features of this library.

#+begin_parallel
[[color:orange][Are you excited to learn some Lisp?]] [[blue:Yes!]]

Pop-quiz: How does doc:apply work?
#+end_parallel

#+begin_details Answer
link-here:solution
Syntactically, ~(apply f '(x0 ... xN)) = (f x0 ... xN)~.

[[remark:Musa][Ain't that cool?]]

#+begin_spoiler aqua
That is, [[color:magenta][we can ((apply)) a function to a list of arguments!]]
#+end_spoiler

#+end_details

#+html: <br>
#+begin_box
octoicon:report Note that kbd:C-x_C-e evaluates a Lisp form!
#+end_box

#+LATEX_HEADER: \usepackage{multicol}
#+LATEX_HEADER: \usepackage{tcolorbox}
#+latex: In the LaTeX output, we have a glossary.

show:GLOSSARY

badge:Thanks|for_reading
tweet:https://github.com/alhassy/org-special-block-extras
badge:|buy_me_a coffee|gray|https://www.buymeacoffee.com/alhassy|buy-me-a-coffee

Here is what it looks like as HTML (left) and LaTeX (right):

img

The above section, , presents a few puzzles to get you comfortable with defblock ;-)

Bye!

org-special-block-extras's People

Contributors

alhassy avatar basil-conto avatar gwena avatar nidish96 avatar thecsw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

org-special-block-extras's Issues

Typesetting math in defblocks

Firstly great package, thanks a lot!!

While typesetting inline math on org, I usually just use $$ and proceed, and the latex interpreter interprets it as latex math and the html interpreter does the right thing too.

But the following doesn't work:

#+begin_details SDOF equations are $m\ddot{x}=f(t)$
The above is a differential equation with $\ddot{x}$.
#+end_details

Here's the result to this on html :
image

On pdflatex :
image

As you can see, the second math equation works properly, but the first one doesn't.

Is there any easy way to fix this?

The package does not work with the readtheorg-theme

I really like the package and had a fun time creating my own special-block!

However, a problem I found after installing the package is that some of the interactivity of my html-exports are gone. I often use the readtheorg-theme from https://github.com/fniessen/org-html-themes, which can be enabled by adding

#+SETUPFILE: https://fniessen.github.io/org-html-themes/setup/theme-readtheorg.setup

to the top of an org file. After adding the org-special-block-extras package, the content-table at the left of the theme does not react when scrolling as it should do.

After examining the html-output of the org-file, the problem seems to be that the jQuery-library is loaded two times. Both by this package and from the readtheorg-setupfile.

Is there a way to change this package in a way so that this does not happen? 😊

export fails on org-9.4?

kbd:C-x exports fine, but badges cause the following stack trace.

badge:x|Y is the only line in this org file.

string-prefix-p: Wrong type argument: stringp, (:export-options nil :back-end #s(org-export-backend html nil ((bold . org-html-bold) (center-block . org-html-center-block) (clock . org-html-clock) (code . org-html-code) (drawer . org-html-drawer) (dynamic-block . org-html-dynamic-block) (entity . org-html-entity) (example-block . org-html-example-block) (export-block . org-html-export-block) (export-snippet . org-html-export-snippet) ...) ((:html-doctype "HTML_DOCTYPE" nil org-html-doctype) (:html-container "HTML_CONTAINER" nil org-html-container-element) (:description "DESCRIPTION" nil nil newline) (:keywords "KEYWORDS" nil nil space) (:html-html5-fancy nil "html5-fancy" org-html-html5-fancy) (:html-link-use-abs-url nil "html-link-use-abs-url" org-html-link-use-abs-url) (:html-link-home "HTML_LINK_HOME" nil org-html-link-home) (:html-link-up "HTML_LINK_UP" nil org-html-link-up) (:html-mathjax "HTML_MATHJAX" nil "" space) (:html-equation-reference-format "HTML_EQUATION_REFERENCE_FORMAT" nil org-html-equation-reference-format t) ...) ((:filter-options . org-html-infojs-install-script) (:filter-parse-tree . org-html-image-link-filter) (:filter-final-output . org-html-final-function)) nil (104 "Export to HTML" ((72 "As HTML buffer" org-html-export-as-html) (104 "As HTML file" org-html-export-to-html) (111 "As HTML file and open" (lambda (a s v b) (if a (org-html-export-to-html t s v b) (org-open-file (org-html-export-to-html nil s v b)))))))) :translate-alist ((bold . org-html-bold) (center-block . org-html-center-block) (clock . org-html-clock) (code . org-html-code) (drawer . org-html-drawer) (dynamic-block . org-html-dynamic-block) (entity . org-html-entity) (example-block . org-html-example-block) (export-block . org-html-export-block) (export-snippet . org-html-export-snippet) ...) :exported-data #s(hash-table size 4001 test eq rehash-size 1.5 rehash-threshold 0.8125 data ( ...)) :input-buffer "x.org" ...)

Create new special blocks/links following these examples...

  1. Look at http://xahlee.info/js/css_index.html
  2. Find something you like there
  3. Implement a special block that produces the CSS feature you like
  4. Add some unit tests (ert-deftest)

For example, text shadows give way to a new link type which can be used in the form <shadow: Moonlight > to produce the example shown in the URL. We can also make this into a special block and then use :option value header arguments to allow a variety of inline styling options.

Need help with o-thread-blockcall

Thanks for some mind-blowing elisp work!

Just trying to figure out how to use o-thread-blockcall

Basically I want to use #begin_rename with a fixed list
And then wrap it in #begin_eqnarray*

Currently I hacked this far
Which basically cutpasted your rename block and hardcoded (one element of) the list I want replaced.
goftex is the block I want -- gofer as Latex equations

(o-defblock goftex (list "-> to \\leftarrow") nil
   (s-replace-all
   (--map (cons (car it) (cadr it))
          (--map (s-split " to " (s-trim it))
                 (s-split "," list)))
   contents))

Obviously I'd prefer to reuse your rename not cutpaste it!
The other thing is that in the current attempt, org is not recognizing #begin_eqnarray if it is mixed with my goftex.
Result of that is that I get extra \( and \) enclosing the \leftarrow inside the begin{eqnarray*}

badge export fails with HTML special characters in URL...

a URL with a space in it (%20) fails to generate a badge. really any % character in the URL causes the failure, the space is the easiest example to provide.

I'm not saying it's best practices, but Microsoft URLs for things in Sharepoint are riddled with them.

org-defblock not working

Hello there, and thanks for keeping up your work on org-special-block-extras! I have not been using it for a while since I wasn’t preparing presentations using org-beamer, but now I am at it again. Unfortunately, though, the macro org-defblock does not seem to work for me on the current version (20230721.43). Here is an example definition I use, but I found the problem with any definition:

(org-defblock satz nil (name "" label "" align "" width 0.15)
              "Custom block for the custom satz-environment in LaTeX."
              (let ((changed-name name)
                    (align-one (cond
                                ((equal align 'center) "\\begin{center}\n")
                                ((equal align 'right) "\\begin{flushright}\n")
                                (t "")))
                    (align-two (cond
                                ((equal align'center) "\n\\end{center}")
                                ((equal align 'right) "\n\\end{flushright}")
                                (t "")))
                    (width-two (- 1 width)))
                (cond
                 ((memq backend '(latex beamer))

                  (format "%s\\begin{equation}
\\label{%s}
\\tag{%s}
\\text{\\parbox{%s\\textwidth}{%s}}
\\end{equation}%s \\noindent"
                          align-one label changed-name width-two contents align-two))

                 (backend (format "\n\n      (%s)      \t%s\n" changed-name contents)))))

When using such a block, as for example

#+BEGIN_SATZ :name myname :label mylabel
Example Sentence.
#+END_SATZ

I get the error message Symbol's function definition is void: name.

I had an old version (20220326.1432) flying around so I tried it with that version and everything worked the way I intended it to work. Thus, I suppose that you made some change to some file which blows up org-defblock. Would you be willing to look into this, please?

Error: void-function closure

First, Thanks for this great job!

When I try the Minimal working example, it displays correctly in org-mode. However, exporting to html raises (void-function closure). The full error log:

Debugger entered--Lisp error: (void-function closure)
(closure (t) (lbl) (let* ((--dash-source-23-- (cdr (or (assoc lbl org-special-block-extras--docs) (assoc lbl org-special-block-extras--docs-from-libraries)))) (name (car-safe (prog1 --dash-source-23-- (setq --dash-source-23-- (cdr --dash-source-23--))))) (doc (car --dash-source-23--))) (if doc nil (setq doc (condition-case nil (funcall org-special-block-extras--docs-fallback lbl) (error (error "Error: No documentation-glossary entry for “%s”!" lbl)))) (setq name (nth 1 doc)) (setq doc (nth 2 doc))) (list name doc)))
(funcall (closure (t) (lbl) (let* ((--dash-source-23-- (cdr (or (assoc lbl org-special-block-extras--docs) (assoc lbl org-special-block-extras--docs-from-libraries)))) (name (car-safe (prog1 --dash-source-23-- (setq --dash-source-23-- ...)))) (doc (car --dash-source-23--))) (if doc nil (setq doc (condition-case nil (funcall org-special-block-extras--docs-fallback lbl) (error (error "Error: No documentation-glossary entry for “%s”!" lbl)))) (setq name (nth 1 doc)) (setq doc (nth 2 doc))) (list name doc))) label)
(let* ((--dash-source-27-- (funcall (closure (t) (lbl) (let* ((--dash-source-23-- ...) (name ...) (doc ...)) (if doc nil (setq doc ...) (setq name ...) (setq doc ...)) (list name doc))) label)) (name (pop --dash-source-27--)) (docs (car --dash-source-27--))) (add-to-list 'org-special-block-extras--docs-GLOSSARY (list label name docs)) (setq name (or description name)) (pcase backend (html (format "<abbr class=\"tooltip\" title=\"%s\">%s</abbr>" (thread-last docs (s-replace " " "&emsp;") (s-replace "\n" "<br>") (s-replace-regexp "\\#\\+begin_example<br>" "") (s-replace-regexp "\\#\\+end_example<br>" "") (s-replace-regexp "\\([^a-z0-9A-Z:/]\\)/\\(.+?\\)/" "\\1<em>\\2</em>") (s-replace-regexp "\\*\\(.+?\\)\\*" "<strong>\\1</strong>") (s-replace-regexp "\\~\\([^ ].*?\\)\\~" "<code>\\1</code>") (s-replace-regexp "\\$\\(.+?\\)\\$" "<em>\\1</em>") (s-replace-regexp "\\[\\[\\(.*\\)\\]\\[\\(.*\\)\\]\\]" "\\2 (\\1)") (s-replace-regexp "-----+" "<hr>") (s-replace-regexp "\\\\quad" "&#x2000;") (s-replace-regexp "\\\\," "&#8194;") (s-replace-regexp "\\\\;" "&#8195;") (s-replace-regexp "\\\"" "''")) name)) (latex (format (concat "\hyperref" "[org-special-block-extras-glossary-%s]{%s}" "\label{org-special-block-extras-glossary" "-declaration-site-%s}") label name label))))
(-let [(name docs) (funcall (closure (t) (lbl) (let* ((--dash-source-23-- (cdr ...)) (name (car-safe ...)) (doc (car --dash-source-23--))) (if doc nil (setq doc (condition-case nil ... ...)) (setq name (nth 1 doc)) (setq doc (nth 2 doc))) (list name doc))) label)] (add-to-list 'org-special-block-extras--docs-GLOSSARY (list label name docs)) (setq name (or description name)) (pcase backend (html (format "<abbr class=\"tooltip\" title=\"%s\">%s</abbr>" (thread-last docs (s-replace " " "&emsp;") (s-replace "\n" "<br>") (s-replace-regexp "\\#\\+begin_example<br>" "") (s-replace-regexp "\\#\\+end_example<br>" "") (s-replace-regexp "\\([^a-z0-9A-Z:/]\\)/\\(.+?\\)/" "\\1<em>\\2</em>") (s-replace-regexp "\\*\\(.+?\\)\\*" "<strong>\\1</strong>") (s-replace-regexp "\\~\\([^ ].*?\\)\\~" "<code>\\1</code>") (s-replace-regexp "\\$\\(.+?\\)\\$" "<em>\\1</em>") (s-replace-regexp "\\[\\[\\(.*\\)\\]\\[\\(.*\\)\\]\\]" "\\2 (\\1)") (s-replace-regexp "-----+" "<hr>") (s-replace-regexp "\\\\quad" "&#x2000;") (s-replace-regexp "\\\\," "&#8194;") (s-replace-regexp "\\\\;" "&#8195;") (s-replace-regexp "\\\"" "''")) name)) (latex (format (concat "\hyperref" "[org-special-block-extras-glossary-%s]{%s}" "\label{org-special-block-extras-glossary" "-declaration-site-%s}") label name label))))
(lambda (label description backend) (-let [(name docs) (funcall (closure (t) (lbl) (let* (... ... ...) (if doc nil ... ... ...) (list name doc))) label)] (add-to-list 'org-special-block-extras--docs-GLOSSARY (list label name docs)) (setq name (or description name)) (pcase backend (html (format "<abbr class=\"tooltip\" title=\"%s\">%s</abbr>" (thread-last docs (s-replace " " "&emsp;") (s-replace "\n" "<br>") (s-replace-regexp "\\#\\+begin_example<br>" "") (s-replace-regexp "\\#\\+end_example<br>" "") (s-replace-regexp "\\([^a-z0-9A-Z:/]\\)/\\(.+?\\)/" "\\1<em>\\2</em>") (s-replace-regexp "\\*\\(.+?\\)\\*" "<strong>\\1</strong>") (s-replace-regexp "\\~\\([^ ].*?\\)\\~" "<code>\\1</code>") (s-replace-regexp "\\$\\(.+?\\)\\$" "<em>\\1</em>") (s-replace-regexp "\\[\\[\\(.*\\)\\]\\[\\(.*\\)\\]\\]" "\\2 (\\1)") (s-replace-regexp "-----+" "<hr>") (s-replace-regexp "\\\\quad" "&#x2000;") (s-replace-regexp "\\\\," "&#8194;") (s-replace-regexp "\\\\;" "&#8195;") (s-replace-regexp "\\\"" "''")) name)) (latex (format (concat "\hyperref" "[org-special-block-extras-glossary-%s]{%s}" "\label{org-special-block-extras-glossary" "-declaration-site-%s}") label name label)))))("apply" nil html)
org-export-custom-protocol-maybe((link (:type "doc" :path "apply" :format plain :raw-link "doc:apply" :application nil :search-option nil :begin 3568 :end 3578 :contents-begin nil :contents-end nil :post-blank 1 :parent (paragraph ... ... #1 ...))) nil html (:export-options (subtree) :back-end #s(org-export-backend :name html :parent nil :transcoders (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :options (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :filters (... ... ...) :blocks nil :menu (104 "Export to HTML" ...)) :translate-alist ((bold . org-html-bold) (center-block . org-html-center-block) (clock . org-html-clock) (code . org-html-code) (drawer . org-html-drawer) (dynamic-block . org-html-dynamic-block) (entity . org-html-entity) (example-block . org-html-example-block) (export-block . org-html-export-block) (export-snippet . org-html-export-snippet) (fixed-width . org-html-fixed-width) (footnote-reference . org-html-footnote-reference) (headline . org-html-headline) (horizontal-rule . org-html-horizontal-rule) (inline-src-block . org-html-inline-src-block) (inlinetask . org-html-inlinetask) (inner-template . org-html-inner-template) (italic . org-html-italic) (item . org-html-item) (keyword . org-html-keyword) (latex-environment . org-html-latex-environment) (latex-fragment . org-html-latex-fragment) (line-break . org-html-line-break) (link . org-html-link) (node-property . org-html-node-property) (paragraph . org-html-paragraph) ...) :exported-data #<hash-table eq 7/4001 0x1ff234c3b921> :input-buffer "demo.org" :input-file "/Users/yuchen/Notes/data/4..." :html-doctype "xhtml-strict" :html-container "div" :description nil :keywords nil :html-html5-fancy nil :html-link-use-abs-url nil :html-link-home "" ...))
org-html-link((link (:type "doc" :path "apply" :format plain :raw-link "doc:apply" :application nil :search-option nil :begin 3568 :end 3578 :contents-begin nil :contents-end nil :post-blank 1 :parent (paragraph ... ... #1 ...))) nil (:export-options (subtree) :back-end #s(org-export-backend :name html :parent nil :transcoders (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :options (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :filters (... ... ...) :blocks nil :menu (104 "Export to HTML" ...)) :translate-alist ((bold . org-html-bold) (center-block . org-html-center-block) (clock . org-html-clock) (code . org-html-code) (drawer . org-html-drawer) (dynamic-block . org-html-dynamic-block) (entity . org-html-entity) (example-block . org-html-example-block) (export-block . org-html-export-block) (export-snippet . org-html-export-snippet) (fixed-width . org-html-fixed-width) (footnote-reference . org-html-footnote-reference) (headline . org-html-headline) (horizontal-rule . org-html-horizontal-rule) (inline-src-block . org-html-inline-src-block) (inlinetask . org-html-inlinetask) (inner-template . org-html-inner-template) (italic . org-html-italic) (item . org-html-item) (keyword . org-html-keyword) (latex-environment . org-html-latex-environment) (latex-fragment . org-html-latex-fragment) (line-break . org-html-line-break) (link . org-html-link) (node-property . org-html-node-property) (paragraph . org-html-paragraph) ...) :exported-data #<hash-table eq 7/4001 0x1ff234c3b921> :input-buffer "demo.org" :input-file "/Users/yuchen/Notes/data/4..." :html-doctype "xhtml-strict" :html-container "div" :description nil :keywords nil :html-html5-fancy nil :html-link-use-abs-url nil :html-link-home "" ...))
org-export-data((link (:type "doc" :path "apply" :format plain :raw-link "doc:apply" :application nil :search-option nil :begin 3568 :end 3578 :contents-begin nil :contents-end nil :post-blank 1 :parent (paragraph ... ... #1 ...))) (:export-options (subtree) :back-end #s(org-export-backend :name html :parent nil :transcoders (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :options (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :filters (... ... ...) :blocks nil :menu (104 "Export to HTML" ...)) :translate-alist ((bold . org-html-bold) (center-block . org-html-center-block) (clock . org-html-clock) (code . org-html-code) (drawer . org-html-drawer) (dynamic-block . org-html-dynamic-block) (entity . org-html-entity) (example-block . org-html-example-block) (export-block . org-html-export-block) (export-snippet . org-html-export-snippet) (fixed-width . org-html-fixed-width) (footnote-reference . org-html-footnote-reference) (headline . org-html-headline) (horizontal-rule . org-html-horizontal-rule) (inline-src-block . org-html-inline-src-block) (inlinetask . org-html-inlinetask) (inner-template . org-html-inner-template) (italic . org-html-italic) (item . org-html-item) (keyword . org-html-keyword) (latex-environment . org-html-latex-environment) (latex-fragment . org-html-latex-fragment) (line-break . org-html-line-break) (link . org-html-link) (node-property . org-html-node-property) (paragraph . org-html-paragraph) ...) :exported-data #<hash-table eq 7/4001 0x1ff234c3b921> :input-buffer "demo.org" :input-file "/Users/yuchen/Notes/data/4..." :html-doctype "xhtml-strict" :html-container "div" :description nil :keywords nil :html-html5-fancy nil :html-link-use-abs-url nil :html-link-home "" ...))
#f(compiled-function (element) #<bytecode 0x1ff24cbe9d1d>)((link (:type "doc" :path "apply" :format plain :raw-link "doc:apply" :application nil :search-option nil :begin 3568 :end 3578 :contents-begin nil :contents-end nil :post-blank 1 :parent (paragraph (:begin 3549 :end 3585 :contents-begin 3549 :contents-end 3584 :post-blank 1 :post-affiliated 3549 :parent (section (:begin 3391 :end 5408 :contents-begin 3391 :contents-end 5408 :post-blank 0 :post-affiliated 3391 :parent (org-data nil #43)) (export-block (:type "HTML" :begin 3391 :end 3480 :value "<div style="column-rule-style: none;column-count: ..." :post-blank 0 :post-affiliated 3391 :parent #43)) (paragraph (:begin 3480 :end 3549 :contents-begin 3480 :contents-end 3548 :post-blank 1 :post-affiliated 3480 :parent #43) (link ... ...) (link ...) #("\n" 0 1 ...)) #27 (export-block (:type "HTML" :begin 3585 :end 3628 :value "\n" :post-blank 3 :post-affiliated 3585 :parent #43)) (export-block (:type "HTML" :begin 3628 :end 4318 :value "<details class="code-details"\n sty..." :post-blank 0 :post-affiliated 3628 :parent #43)) (paragraph (:begin 4318 :end 4395 :contents-begin 4318 :contents-end 4394 :post-blank 1 :post-affiliated 4318 :parent #43) (link ...) #("\nSyntactically, " 0 16 ...) (code ...) #(".\n" 0 2 ...)) (paragraph (:begin 4395 :end 4431 :contents-begin 4395 :contents-end 4429 :post-blank 2 :post-affiliated 4395 :parent #43) (link ... ...) #("\n" 0 1 ...)) (export-block (:type "HTML" :begin 4431 :end 4591 :value "<style> #g54 {color: aqua; background-color:aqua;}..." :post-blank 0 :post-affiliated 4431 :parent #43)) (paragraph (:begin 4591 :end 4701 :contents-begin 4591 :contents-end 4700 :post-blank 1 :post-affiliated 4591 :parent #43) #("That is, " 0 9 ...) (link ... ... ... ...) #("\n" 0 1 ...)) (export-block (:type "HTML" :begin 4701 :end 4738 :value "\n" :post-blank 3 :post-affiliated 4701 :parent #43)) (export-block (:type "HTML" :begin 4738 :end 4800 :value "\n \n" :post-blank 2 :post-affiliated 4738 :parent #43)) (keyword (:key "HTML" :value "
" :begin 4800 :end 4814 :post-blank 1 :post-affiliated 4800 :parent #43)) (export-block (:type "HTML" :begin 4814 :end 4997 :value "<div style="padding: 1em; background-color: #CCFFC..." :post-blank 0 :post-affiliated 4814 :parent #43)) (paragraph (:begin 4997 :end 5059 :contents-begin 4997 :contents-end 5058 :post-blank 1 :post-affiliated 4997 :parent #43) (link ...) #("Note that " 0 10 ...) (link ...) #("evaluates a Lisp form!\n" 0 23 ...)) (export-block (:type "HTML" :begin 5059 :end 5101 :value "\n" :post-blank 2 :post-affiliated 5059 :parent #43)) (keyword (:key "LATEX_HEADER" :value "\usepackage{multicol}" :begin 5101 :end 5139 :post-blank 0 :post-affiliated 5101 :parent #43)) (keyword (:key "LATEX_HEADER" :value "\usepackage{tcolorbox}" :begin 5139 :end 5178 :post-blank 0 :post-affiliated 5139 :parent #43)) (keyword (:key "LATEX" :value "In the LaTeX output, we have a glossary." :begin 5178 :end 5229 :post-blank 1 :post-affiliated 5178 :parent #43)) (paragraph (:begin 5229 :end 5244 :contents-begin 5229 :contents-end 5243 :post-blank 1 :post-affiliated 5229 :parent #43) (link ...) #("\n" 0 1 ...)) (paragraph (:begin 5244 :end 5408 :contents-begin 5244 :contents-end 5408 :post-blank 0 :post-affiliated 5244 :parent #43) (link ...) #("\n" 0 1 ...) (link ...) #("\n" 0 1 ...) (link ...) #("coffee|gray|" 0 12 ...) (link ...) #("\n" 0 1 ...)))) #("Pop-quiz: How does " 0 19 (:parent #27)) #1 #("work?\n" 0 6 (:parent #27))))))
mapconcat(#f(compiled-function (element) #<bytecode 0x1ff24cbe9d1d>) (#("Pop-quiz: How does " 0 19 (:parent (paragraph (:begin 3549 :end 3585 :contents-begin 3549 :contents-end 3584 :post-blank 1 :post-affiliated 3549 :parent (section (:begin 3391 :end 5408 :contents-begin 3391 :contents-end 5408 :post-blank 0 :post-affiliated 3391 :parent ...) (export-block ...) (paragraph ... ... ... ...) #6 (export-block ...) (export-block ...) (paragraph ... ... ... ... ...) (paragraph ... ... ...) (export-block ...) (paragraph ... ... ... ...) (export-block ...) (export-block ...) (keyword ...) (export-block ...) (paragraph ... ... ... ... ...) (export-block ...) (keyword ...) (keyword ...) (keyword ...) (paragraph ... ... ...) (paragraph ... ... ... ... ... ... ... ... ...))) . #2))) (link (:type "doc" :path "apply" :format plain :raw-link "doc:apply" :application nil :search-option nil :begin 3568 :end 3578 :contents-begin nil :contents-end nil :post-blank 1 :parent (paragraph (:begin 3549 :end 3585 :contents-begin 3549 :contents-end 3584 :post-blank 1 :post-affiliated 3549 :parent (section (:begin 3391 :end 5408 :contents-begin 3391 :contents-end 5408 :post-blank 0 :post-affiliated 3391 :parent ...) (export-block ...) (paragraph ... ... ... ...) #30 (export-block ...) (export-block ...) (paragraph ... ... ... ... ...) (paragraph ... ... ...) (export-block ...) (paragraph ... ... ... ...) (export-block ...) (export-block ...) (keyword ...) (export-block ...) (paragraph ... ... ... ... ...) (export-block ...) (keyword ...) (keyword ...) (keyword ...) (paragraph ... ... ...) (paragraph ... ... ... ... ... ... ... ... ...))) . #2))) #("work?\n" 0 6 (:parent (paragraph (:begin 3549 :end 3585 :contents-begin 3549 :contents-end 3584 :post-blank 1 :post-affiliated 3549 :parent (section (:begin 3391 :end 5408 :contents-begin 3391 :contents-end 5408 :post-blank 0 :post-affiliated 3391 :parent ...) (export-block ...) (paragraph ... ... ... ...) #8 (export-block ...) (export-block ...) (paragraph ... ... ... ... ...) (paragraph ... ... ...) (export-block ...) (paragraph ... ... ... ...) (export-block ...) (export-block ...) (keyword ...) (export-block ...) (paragraph ... ... ... ... ...) (export-block ...) (keyword ...) (keyword ...) (keyword ...) (paragraph ... ... ...) (paragraph ... ... ... ... ... ... ... ... ...))) . #2)))) "")
org-export-data((paragraph (:begin 3549 :end 3585 :contents-begin 3549 :contents-end 3584 :post-blank 1 :post-affiliated 3549 :parent (section ... ... ... #1 ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...)) #("Pop-quiz: How does " 0 19 (:parent #1)) (link (:type "doc" :path "apply" :format plain :raw-link "doc:apply" :application nil :search-option nil :begin 3568 :end 3578 :contents-begin nil :contents-end nil :post-blank 1 :parent #1)) #("work?\n" 0 6 (:parent #1))) (:export-options (subtree) :back-end #s(org-export-backend :name html :parent nil :transcoders (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :options (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :filters (... ... ...) :blocks nil :menu (104 "Export to HTML" ...)) :translate-alist ((bold . org-html-bold) (center-block . org-html-center-block) (clock . org-html-clock) (code . org-html-code) (drawer . org-html-drawer) (dynamic-block . org-html-dynamic-block) (entity . org-html-entity) (example-block . org-html-example-block) (export-block . org-html-export-block) (export-snippet . org-html-export-snippet) (fixed-width . org-html-fixed-width) (footnote-reference . org-html-footnote-reference) (headline . org-html-headline) (horizontal-rule . org-html-horizontal-rule) (inline-src-block . org-html-inline-src-block) (inlinetask . org-html-inlinetask) (inner-template . org-html-inner-template) (italic . org-html-italic) (item . org-html-item) (keyword . org-html-keyword) (latex-environment . org-html-latex-environment) (latex-fragment . org-html-latex-fragment) (line-break . org-html-line-break) (link . org-html-link) (node-property . org-html-node-property) (paragraph . org-html-paragraph) ...) :exported-data #<hash-table eq 7/4001 0x1ff234c3b921> :input-buffer "demo.org" :input-file "/Users/yuchen/Notes/data/4..." :html-doctype "xhtml-strict" :html-container "div" :description nil :keywords nil :html-html5-fancy nil :html-link-use-abs-url nil :html-link-home "" ...))
#f(compiled-function (element) #<bytecode 0x1ff23520f381>)((paragraph (:begin 3549 :end 3585 :contents-begin 3549 :contents-end 3584 :post-blank 1 :post-affiliated 3549 :parent (section (:begin 3391 :end 5408 :contents-begin 3391 :contents-end 5408 :post-blank 0 :post-affiliated 3391 :parent (org-data nil #17)) (export-block (:type "HTML" :begin 3391 :end 3480 :value "<div style="column-rule-style: none;co..." :post-blank 0 :post-affiliated 3391 :parent #17)) (paragraph (:begin 3480 :end 3549 :contents-begin 3480 :contents-end 3548 :post-blank 1 :post-affiliated 3480 :parent #17) (link ... ...) (link ...) #("\n" 0 1 ...)) #1 (export-block (:type "HTML" :begin 3585 :end 3628 :value "\n" :post-blank 3 :post-affiliated 3585 :parent #17)) (export-block (:type "HTML" :begin 3628 :end 4318 :value "<details class="code-details"\n ..." :post-blank 0 :post-affiliated 3628 :parent #17)) (paragraph (:begin 4318 :end 4395 :contents-begin 4318 :contents-end 4394 :post-blank 1 :post-affiliated 4318 :parent #17) (link ...) #("\nSyntactically, " 0 16 ...) (code ...) #(".\n" 0 2 ...)) (paragraph (:begin 4395 :end 4431 :contents-begin 4395 :contents-end 4429 :post-blank 2 :post-affiliated 4395 :parent #17) (link ... ...) #("\n" 0 1 ...)) (export-block (:type "HTML" :begin 4431 :end 4591 :value "<style> #g54 {color: aqua; background-..." :post-blank 0 :post-affiliated 4431 :parent #17)) (paragraph (:begin 4591 :end 4701 :contents-begin 4591 :contents-end 4700 :post-blank 1 :post-affiliated 4591 :parent #17) #("That is, " 0 9 ...) (link ... ... ... ...) #("\n" 0 1 ...)) (export-block (:type "HTML" :begin 4701 :end 4738 :value "\n" :post-blank 3 :post-affiliated 4701 :parent #17)) (export-block (:type "HTML" :begin 4738 :end 4800 :value "\n \n" :post-blank 2 :post-affiliated 4738 :parent #17)) (keyword (:key "HTML" :value "
" :begin 4800 :end 4814 :post-blank 1 :post-affiliated 4800 :parent #17)) (export-block (:type "HTML" :begin 4814 :end 4997 :value "<div style="padding: 1em; background-c..." :post-blank 0 :post-affiliated 4814 :parent #17)) (paragraph (:begin 4997 :end 5059 :contents-begin 4997 :contents-end 5058 :post-blank 1 :post-affiliated 4997 :parent #17) (link ...) #("Note that " 0 10 ...) (link ...) #("evaluates a Lisp form!\n" 0 23 ...)) (export-block (:type "HTML" :begin 5059 :end 5101 :value "\n" :post-blank 2 :post-affiliated 5059 :parent #17)) (keyword (:key "LATEX_HEADER" :value "\usepackage{multicol}" :begin 5101 :end 5139 :post-blank 0 :post-affiliated 5101 :parent #17)) (keyword (:key "LATEX_HEADER" :value "\usepackage{tcolorbox}" :begin 5139 :end 5178 :post-blank 0 :post-affiliated 5139 :parent #17)) (keyword (:key "LATEX" :value "In the LaTeX output, we have a glossar..." :begin 5178 :end 5229 :post-blank 1 :post-affiliated 5178 :parent #17)) (paragraph (:begin 5229 :end 5244 :contents-begin 5229 :contents-end 5243 :post-blank 1 :post-affiliated 5229 :parent #17) (link ...) #("\n" 0 1 ...)) (paragraph (:begin 5244 :end 5408 :contents-begin 5244 :contents-end 5408 :post-blank 0 :post-affiliated 5244 :parent #17) (link ...) #("\n" 0 1 ...) (link ...) #("\n" 0 1 ...) (link ...) #("coffee|gray|" 0 12 ...) (link ...) #("\n" 0 1 ...)))) #("Pop-quiz: How does " 0 19 (:parent #1)) (link (:type "doc" :path "apply" :format plain :raw-link "doc:apply" :application nil :search-option nil :begin 3568 :end 3578 :contents-begin nil :contents-end nil :post-blank 1 :parent #1)) #("work?\n" 0 6 (:parent #1))))
mapconcat(#f(compiled-function (element) #<bytecode 0x1ff23520f381>) ((export-block (:type "HTML" :begin 3391 :end 3480 :value "<div style="column-rule-st..." :post-blank 0 :post-affiliated 3391 :parent ...)) (paragraph (:begin 3480 :end 3549 :contents-begin 3480 :contents-end 3548 :post-blank 1 :post-affiliated 3480 :parent ...) (link ... ...) (link ...) #("\n" 0 1 ...)) (paragraph (:begin 3549 :end 3585 :contents-begin 3549 :contents-end 3584 :post-blank 1 :post-affiliated 3549 :parent ...) #("Pop-quiz: How does " 0 19 ...) (link ...) #("work?\n" 0 6 ...)) (export-block (:type "HTML" :begin 3585 :end 3628 :value "\n" :post-blank 3 :post-affiliated 3585 :parent ...)) (export-block (:type "HTML" :begin 3628 :end 4318 :value "<details class="code-detai..." :post-blank 0 :post-affiliated 3628 :parent ...)) (paragraph (:begin 4318 :end 4395 :contents-begin 4318 :contents-end 4394 :post-blank 1 :post-affiliated 4318 :parent ...) (link ...) #("\nSyntactically, " 0 16 ...) (code ...) #(".\n" 0 2 ...)) (paragraph (:begin 4395 :end 4431 :contents-begin 4395 :contents-end 4429 :post-blank 2 :post-affiliated 4395 :parent ...) (link ... ...) #("\n" 0 1 ...)) (export-block (:type "HTML" :begin 4431 :end 4591 :value "<style> #g54 {color: aqua;..." :post-blank 0 :post-affiliated 4431 :parent ...)) (paragraph (:begin 4591 :end 4701 :contents-begin 4591 :contents-end 4700 :post-blank 1 :post-affiliated 4591 :parent ...) #("That is, " 0 9 ...) (link ... ... ... ...) #("\n" 0 1 ...)) (export-block (:type "HTML" :begin 4701 :end 4738 :value "\n" :post-blank 3 :post-affiliated 4701 :parent ...)) (export-block (:type "HTML" :begin 4738 :end 4800 :value "\n ..." :post-blank 2 :post-affiliated 4738 :parent ...)) (keyword (:key "HTML" :value "
" :begin 4800 :end 4814 :post-blank 1 :post-affiliated 4800 :parent ...)) (export-block (:type "HTML" :begin 4814 :end 4997 :value "<div style="padding: 1em; ..." :post-blank 0 :post-affiliated 4814 :parent ...)) (paragraph (:begin 4997 :end 5059 :contents-begin 4997 :contents-end 5058 :post-blank 1 :post-affiliated 4997 :parent ...) (link ...) #("Note that " 0 10 ...) (link ...) #("evaluates a Lisp form!\n" 0 23 ...)) (export-block (:type "HTML" :begin 5059 :end 5101 :value "\n" :post-blank 2 :post-affiliated 5059 :parent ...)) (keyword (:key "LATEX_HEADER" :value "\usepackage{multicol}" :begin 5101 :end 5139 :post-blank 0 :post-affiliated 5101 :parent ...)) (keyword (:key "LATEX_HEADER" :value "\usepackage{tcolorbox}" :begin 5139 :end 5178 :post-blank 0 :post-affiliated 5139 :parent ...)) (keyword (:key "LATEX" :value "In the LaTeX output, we ha..." :begin 5178 :end 5229 :post-blank 1 :post-affiliated 5178 :parent ...)) (paragraph (:begin 5229 :end 5244 :contents-begin 5229 :contents-end 5243 :post-blank 1 :post-affiliated 5229 :parent ...) (link ...) #("\n" 0 1 ...)) (paragraph (:begin 5244 :end 5408 :contents-begin 5244 :contents-end 5408 :post-blank 0 :post-affiliated 5244 :parent ...) (link ...) #("\n" 0 1 ...) (link ...) #("\n" 0 1 ...) (link ...) #("coffee|gray|" 0 12 ...) (link ...) #("\n" 0 1 ...))) "")
org-export-data((section (:begin 3391 :end 5408 :contents-begin 3391 :contents-end 5408 :post-blank 0 :post-affiliated 3391 :parent (org-data nil #1)) (export-block (:type "HTML" :begin 3391 :end 3480 :value "<div style="column-rule-st..." :post-blank 0 :post-affiliated 3391 :parent #1)) (paragraph (:begin 3480 :end 3549 :contents-begin 3480 :contents-end 3548 :post-blank 1 :post-affiliated 3480 :parent #1) (link ... ...) (link ...) #("\n" 0 1 ...)) (paragraph (:begin 3549 :end 3585 :contents-begin 3549 :contents-end 3584 :post-blank 1 :post-affiliated 3549 :parent #1) #("Pop-quiz: How does " 0 19 ...) (link ...) #("work?\n" 0 6 ...)) (export-block (:type "HTML" :begin 3585 :end 3628 :value "\n" :post-blank 3 :post-affiliated 3585 :parent #1)) (export-block (:type "HTML" :begin 3628 :end 4318 :value "<details class="code-detai..." :post-blank 0 :post-affiliated 3628 :parent #1)) (paragraph (:begin 4318 :end 4395 :contents-begin 4318 :contents-end 4394 :post-blank 1 :post-affiliated 4318 :parent #1) (link ...) #("\nSyntactically, " 0 16 ...) (code ...) #(".\n" 0 2 ...)) (paragraph (:begin 4395 :end 4431 :contents-begin 4395 :contents-end 4429 :post-blank 2 :post-affiliated 4395 :parent #1) (link ... ...) #("\n" 0 1 ...)) (export-block (:type "HTML" :begin 4431 :end 4591 :value "<style> #g54 {color: aqua;..." :post-blank 0 :post-affiliated 4431 :parent #1)) (paragraph (:begin 4591 :end 4701 :contents-begin 4591 :contents-end 4700 :post-blank 1 :post-affiliated 4591 :parent #1) #("That is, " 0 9 ...) (link ... ... ... ...) #("\n" 0 1 ...)) (export-block (:type "HTML" :begin 4701 :end 4738 :value "\n" :post-blank 3 :post-affiliated 4701 :parent #1)) (export-block (:type "HTML" :begin 4738 :end 4800 :value "\n ..." :post-blank 2 :post-affiliated 4738 :parent #1)) (keyword (:key "HTML" :value "
" :begin 4800 :end 4814 :post-blank 1 :post-affiliated 4800 :parent #1)) (export-block (:type "HTML" :begin 4814 :end 4997 :value "<div style="padding: 1em; ..." :post-blank 0 :post-affiliated 4814 :parent #1)) (paragraph (:begin 4997 :end 5059 :contents-begin 4997 :contents-end 5058 :post-blank 1 :post-affiliated 4997 :parent #1) (link ...) #("Note that " 0 10 ...) (link ...) #("evaluates a Lisp form!\n" 0 23 ...)) (export-block (:type "HTML" :begin 5059 :end 5101 :value "\n" :post-blank 2 :post-affiliated 5059 :parent #1)) (keyword (:key "LATEX_HEADER" :value "\usepackage{multicol}" :begin 5101 :end 5139 :post-blank 0 :post-affiliated 5101 :parent #1)) (keyword (:key "LATEX_HEADER" :value "\usepackage{tcolorbox}" :begin 5139 :end 5178 :post-blank 0 :post-affiliated 5139 :parent #1)) (keyword (:key "LATEX" :value "In the LaTeX output, we ha..." :begin 5178 :end 5229 :post-blank 1 :post-affiliated 5178 :parent #1)) (paragraph (:begin 5229 :end 5244 :contents-begin 5229 :contents-end 5243 :post-blank 1 :post-affiliated 5229 :parent #1) (link ...) #("\n" 0 1 ...)) (paragraph (:begin 5244 :end 5408 :contents-begin 5244 :contents-end 5408 :post-blank 0 :post-affiliated 5244 :parent #1) (link ...) #("\n" 0 1 ...) (link ...) #("\n" 0 1 ...) (link ...) #("coffee|gray|" 0 12 ...) (link ...) #("\n" 0 1 ...))) (:export-options (subtree) :back-end #s(org-export-backend :name html :parent nil :transcoders (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :options (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :filters (... ... ...) :blocks nil :menu (104 "Export to HTML" ...)) :translate-alist ((bold . org-html-bold) (center-block . org-html-center-block) (clock . org-html-clock) (code . org-html-code) (drawer . org-html-drawer) (dynamic-block . org-html-dynamic-block) (entity . org-html-entity) (example-block . org-html-example-block) (export-block . org-html-export-block) (export-snippet . org-html-export-snippet) (fixed-width . org-html-fixed-width) (footnote-reference . org-html-footnote-reference) (headline . org-html-headline) (horizontal-rule . org-html-horizontal-rule) (inline-src-block . org-html-inline-src-block) (inlinetask . org-html-inlinetask) (inner-template . org-html-inner-template) (italic . org-html-italic) (item . org-html-item) (keyword . org-html-keyword) (latex-environment . org-html-latex-environment) (latex-fragment . org-html-latex-fragment) (line-break . org-html-line-break) (link . org-html-link) (node-property . org-html-node-property) (paragraph . org-html-paragraph) ...) :exported-data #<hash-table eq 7/4001 0x1ff234c3b921> :input-buffer "demo.org" :input-file "/Users/yuchen/Notes/data/4..." :html-doctype "xhtml-strict" :html-container "div" :description nil :keywords nil :html-html5-fancy nil :html-link-use-abs-url nil :html-link-home "" ...))
#f(compiled-function (element) #<bytecode 0x1ff23520f339>)((section (:begin 3391 :end 5408 :contents-begin 3391 :contents-end 5408 :post-blank 0 :post-affiliated 3391 :parent (org-data nil #1)) (export-block (:type "HTML" :begin 3391 :end 3480 :value "<div style="column-rule-st..." :post-blank 0 :post-affiliated 3391 :parent #1)) (paragraph (:begin 3480 :end 3549 :contents-begin 3480 :contents-end 3548 :post-blank 1 :post-affiliated 3480 :parent #1) (link ... ...) (link ...) #("\n" 0 1 ...)) (paragraph (:begin 3549 :end 3585 :contents-begin 3549 :contents-end 3584 :post-blank 1 :post-affiliated 3549 :parent #1) #("Pop-quiz: How does " 0 19 ...) (link ...) #("work?\n" 0 6 ...)) (export-block (:type "HTML" :begin 3585 :end 3628 :value "\n" :post-blank 3 :post-affiliated 3585 :parent #1)) (export-block (:type "HTML" :begin 3628 :end 4318 :value "<details class="code-detai..." :post-blank 0 :post-affiliated 3628 :parent #1)) (paragraph (:begin 4318 :end 4395 :contents-begin 4318 :contents-end 4394 :post-blank 1 :post-affiliated 4318 :parent #1) (link ...) #("\nSyntactically, " 0 16 ...) (code ...) #(".\n" 0 2 ...)) (paragraph (:begin 4395 :end 4431 :contents-begin 4395 :contents-end 4429 :post-blank 2 :post-affiliated 4395 :parent #1) (link ... ...) #("\n" 0 1 ...)) (export-block (:type "HTML" :begin 4431 :end 4591 :value "<style> #g54 {color: aqua;..." :post-blank 0 :post-affiliated 4431 :parent #1)) (paragraph (:begin 4591 :end 4701 :contents-begin 4591 :contents-end 4700 :post-blank 1 :post-affiliated 4591 :parent #1) #("That is, " 0 9 ...) (link ... ... ... ...) #("\n" 0 1 ...)) (export-block (:type "HTML" :begin 4701 :end 4738 :value "\n" :post-blank 3 :post-affiliated 4701 :parent #1)) (export-block (:type "HTML" :begin 4738 :end 4800 :value "\n ..." :post-blank 2 :post-affiliated 4738 :parent #1)) (keyword (:key "HTML" :value "
" :begin 4800 :end 4814 :post-blank 1 :post-affiliated 4800 :parent #1)) (export-block (:type "HTML" :begin 4814 :end 4997 :value "<div style="padding: 1em; ..." :post-blank 0 :post-affiliated 4814 :parent #1)) (paragraph (:begin 4997 :end 5059 :contents-begin 4997 :contents-end 5058 :post-blank 1 :post-affiliated 4997 :parent #1) (link ...) #("Note that " 0 10 ...) (link ...) #("evaluates a Lisp form!\n" 0 23 ...)) (export-block (:type "HTML" :begin 5059 :end 5101 :value "\n" :post-blank 2 :post-affiliated 5059 :parent #1)) (keyword (:key "LATEX_HEADER" :value "\usepackage{multicol}" :begin 5101 :end 5139 :post-blank 0 :post-affiliated 5101 :parent #1)) (keyword (:key "LATEX_HEADER" :value "\usepackage{tcolorbox}" :begin 5139 :end 5178 :post-blank 0 :post-affiliated 5139 :parent #1)) (keyword (:key "LATEX" :value "In the LaTeX output, we ha..." :begin 5178 :end 5229 :post-blank 1 :post-affiliated 5178 :parent #1)) (paragraph (:begin 5229 :end 5244 :contents-begin 5229 :contents-end 5243 :post-blank 1 :post-affiliated 5229 :parent #1) (link ...) #("\n" 0 1 ...)) (paragraph (:begin 5244 :end 5408 :contents-begin 5244 :contents-end 5408 :post-blank 0 :post-affiliated 5244 :parent #1) (link ...) #("\n" 0 1 ...) (link ...) #("\n" 0 1 ...) (link ...) #("coffee|gray|" 0 12 ...) (link ...) #("\n" 0 1 ...))))
mapconcat(#f(compiled-function (element) #<bytecode 0x1ff23520f339>) ((section (:begin 3391 :end 5408 :contents-begin 3391 :contents-end 5408 :post-blank 0 :post-affiliated 3391 :parent (org-data nil . #2)) (export-block (:type "HTML" :begin 3391 :end 3480 :value "<div style="column-rule-style: n..." :post-blank 0 :post-affiliated 3391 :parent #3)) (paragraph (:begin 3480 :end 3549 :contents-begin 3480 :contents-end 3548 :post-blank 1 :post-affiliated 3480 :parent #3) (link ... ...) (link ...) #("\n" 0 1 ...)) (paragraph (:begin 3549 :end 3585 :contents-begin 3549 :contents-end 3584 :post-blank 1 :post-affiliated 3549 :parent #3) #("Pop-quiz: How does " 0 19 ...) (link ...) #("work?\n" 0 6 ...)) (export-block (:type "HTML" :begin 3585 :end 3628 :value "\n" :post-blank 3 :post-affiliated 3585 :parent #3)) (export-block (:type "HTML" :begin 3628 :end 4318 :value "<details class="code-details"\n ..." :post-blank 0 :post-affiliated 3628 :parent #3)) (paragraph (:begin 4318 :end 4395 :contents-begin 4318 :contents-end 4394 :post-blank 1 :post-affiliated 4318 :parent #3) (link ...) #("\nSyntactically, " 0 16 ...) (code ...) #(".\n" 0 2 ...)) (paragraph (:begin 4395 :end 4431 :contents-begin 4395 :contents-end 4429 :post-blank 2 :post-affiliated 4395 :parent #3) (link ... ...) #("\n" 0 1 ...)) (export-block (:type "HTML" :begin 4431 :end 4591 :value "<style> #g54 {color: aqua; backg..." :post-blank 0 :post-affiliated 4431 :parent #3)) (paragraph (:begin 4591 :end 4701 :contents-begin 4591 :contents-end 4700 :post-blank 1 :post-affiliated 4591 :parent #3) #("That is, " 0 9 ...) (link ... ... ... ...) #("\n" 0 1 ...)) (export-block (:type "HTML" :begin 4701 :end 4738 :value "\n" :post-blank 3 :post-affiliated 4701 :parent #3)) (export-block (:type "HTML" :begin 4738 :end 4800 :value "\n \n" :post-blank 2 :post-affiliated 4738 :parent #3)) (keyword (:key "HTML" :value "
" :begin 4800 :end 4814 :post-blank 1 :post-affiliated 4800 :parent #3)) (export-block (:type "HTML" :begin 4814 :end 4997 :value "<div style="padding: 1em; backgr..." :post-blank 0 :post-affiliated 4814 :parent #3)) (paragraph (:begin 4997 :end 5059 :contents-begin 4997 :contents-end 5058 :post-blank 1 :post-affiliated 4997 :parent #3) (link ...) #("Note that " 0 10 ...) (link ...) #("evaluates a Lisp form!\n" 0 23 ...)) (export-block (:type "HTML" :begin 5059 :end 5101 :value "\n" :post-blank 2 :post-affiliated 5059 :parent #3)) (keyword (:key "LATEX_HEADER" :value "\usepackage{multicol}" :begin 5101 :end 5139 :post-blank 0 :post-affiliated 5101 :parent #3)) (keyword (:key "LATEX_HEADER" :value "\usepackage{tcolorbox}" :begin 5139 :end 5178 :post-blank 0 :post-affiliated 5139 :parent #3)) (keyword (:key "LATEX" :value "In the LaTeX output, we have a g..." :begin 5178 :end 5229 :post-blank 1 :post-affiliated 5178 :parent #3)) (paragraph (:begin 5229 :end 5244 :contents-begin 5229 :contents-end 5243 :post-blank 1 :post-affiliated 5229 :parent #3) (link ...) #("\n" 0 1 ...)) (paragraph (:begin 5244 :end 5408 :contents-begin 5244 :contents-end 5408 :post-blank 0 :post-affiliated 5244 :parent #3) (link ...) #("\n" 0 1 ...) (link ...) #("\n" 0 1 ...) (link ...) #("coffee|gray|" 0 12 ...) (link ...) #("\n" 0 1 ...)))) "")
org-export-data((org-data nil (section (:begin 3391 :end 5408 :contents-begin 3391 :contents-end 5408 :post-blank 0 :post-affiliated 3391 :parent #1) (export-block ...) (paragraph ... ... ... ...) (paragraph ... ... ... ...) (export-block ...) (export-block ...) (paragraph ... ... ... ... ...) (paragraph ... ... ...) (export-block ...) (paragraph ... ... ... ...) (export-block ...) (export-block ...) (keyword ...) (export-block ...) (paragraph ... ... ... ... ...) (export-block ...) (keyword ...) (keyword ...) (keyword ...) (paragraph ... ... ...) (paragraph ... ... ... ... ... ... ... ... ...))) (:export-options (subtree) :back-end #s(org-export-backend :name html :parent nil :transcoders (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :options (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :filters (... ... ...) :blocks nil :menu (104 "Export to HTML" ...)) :translate-alist ((bold . org-html-bold) (center-block . org-html-center-block) (clock . org-html-clock) (code . org-html-code) (drawer . org-html-drawer) (dynamic-block . org-html-dynamic-block) (entity . org-html-entity) (example-block . org-html-example-block) (export-block . org-html-export-block) (export-snippet . org-html-export-snippet) (fixed-width . org-html-fixed-width) (footnote-reference . org-html-footnote-reference) (headline . org-html-headline) (horizontal-rule . org-html-horizontal-rule) (inline-src-block . org-html-inline-src-block) (inlinetask . org-html-inlinetask) (inner-template . org-html-inner-template) (italic . org-html-italic) (item . org-html-item) (keyword . org-html-keyword) (latex-environment . org-html-latex-environment) (latex-fragment . org-html-latex-fragment) (line-break . org-html-line-break) (link . org-html-link) (node-property . org-html-node-property) (paragraph . org-html-paragraph) ...) :exported-data #<hash-table eq 7/4001 0x1ff234c3b921> :input-buffer "demo.org" :input-file "/Users/yuchen/Notes/data/4..." :html-doctype "xhtml-strict" :html-container "div" :description nil :keywords nil :html-html5-fancy nil :html-link-use-abs-url nil :html-link-home "" ...))
org-export-as(html t nil nil (:output-file "demo.html"))
org-export-to-file(html "demo.html" nil t nil nil nil)
org-html-export-to-html(nil t nil nil)
(org-open-file (org-html-export-to-html nil s v b))
(if a (org-html-export-to-html t s v b) (org-open-file (org-html-export-to-html nil s v b)))
(lambda (a s v b) (if a (org-html-export-to-html t s v b) (org-open-file (org-html-export-to-html nil s v b))))(nil t nil nil)
#f(compiled-function (&optional arg) "Export dispatcher for Org mode.\n\nIt provides an access to common export related tasks in a buffer.\nIts interface comes in two flavors: standard and expert.\n\nWhile both share the same set of bindings, only the former\ndisplays the valid keys associations in a dedicated buffer.\nScrolling (resp. line-wise motion) in this buffer is done with\nSPC and DEL (resp. C-n and C-p) keys.\n\nSet variable org-export-dispatch-use-expert-ui' to switch to one\nflavor or the other.\n\nWhen ARG is \[universal-argument]', repeat the last export action, with the same\nset of options used back then, on the current buffer.\n\nWhen ARG is \\[universal-argument] \\[universal-argument]', display the asynchronous export stack." (interactive "P") #<bytecode 0x1ff2486f6f85>)(nil) apply(#f(compiled-function (&optional arg) "Export dispatcher for Org mode.\n\nIt provides an access to common export related tasks in a buffer.\nIts interface comes in two flavors: standard and expert.\n\nWhile both share the same set of bindings, only the former\ndisplays the valid keys associations in a dedicated buffer.\nScrolling (resp. line-wise motion) in this buffer is done with\nSPC and DEL (resp. C-n and C-p) keys.\n\nSet variable org-export-dispatch-use-expert-ui' to switch to one\nflavor or the other.\n\nWhen ARG is \\[universal-argument]', repeat the last export action, with the same\nset of options used back then, on the current buffer.\n\nWhen ARG is \[universal-argument] \[universal-argument]', display the asynchronous export stack." (interactive "P") #<bytecode 0x1ff2486f6f85>) nil)
org-export-dispatch(nil)
funcall-interactively(org-export-dispatch nil)
call-interactively(org-export-dispatch nil nil)
command-execute(org-export-dispatch)

I use doom-emacs, but try this package in doom/sandbox vanilla emacs. Also, I can export normal org-mode contents to html.

SYSTEM  type       darwin
        config     x86_64-apple-darwin19.6.0
        shell      /bin/zsh
        uname      Darwin 19.6.0 Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64 x86_64
        version    27.1
        build      Jan 15, 2021
        buildopts  --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs-mac/emacs-27.1-mac-8.1/share/info/emacs --prefix=/usr/local/Cellar/emacs-mac/emacs-27.1-mac-8.1 --with-mac --enable-mac-app=/usr/local/Cellar/emacs-mac/emacs-27.1-mac-8.1 --with-gnutls --with-modules
        features   NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS JSON PDUMPER GMP
        traits     (gui server-running envvar-file)
DOOM    dir        ~/.doom.d/
        version    2.0.9
        theme      doom-peacock
        build      HEAD -> develop b03fdabe4 2021-01-13 14:07:47 -0500

Org mode version 9.5

Support ox-hugo export backend

I try to use ox-hugo as an export backend the exporter however does not recognize the parameter values of the special blocks. After a discussion on reddit the ox-hugo creator/maintainer mentioned to raise an issue here, as this seems to be something that he cannot fix on his end.

Problem

When doing a LaTeX export, the stutter example works and repeats 5 times, however on ox-hugo export the repeat only happens 2 times, as seems to be the function default. The presumption is that the parameters of the #begin_noteblock block are ignored by org-special-block-extras when exporting using ox-hugo.

Configuration

The package configuration looks like:

 (use-package org-special-block-extras
       :ensure t
       :after org
       :hook (org-mode . org-special-block-extras-mode)
       ;; All relevant Lisp functions are prefixed ‘o-’; e.g., `o-docs-insert'.

       :config
       (o-defblock noteblock (title "Note") (title-color "primary")
		   "Define noteblock export for docsy ox hugo"
		   (apply #'concat
			  (pcase backend
			    (`latex `("\\begin{noteblock}", contents, "\\end{noteblock}"))
			    (`hugo `("{{% alert title=\"", title, "\" color=\"", title-color, "\" %}}\n", contents, "\n{{% /alert %}}"))
			    )
			  )
		   )
       (o-defblock cautionblock (title "Caution") (title-color "warning")
		   "Awesomebox caution"
		   (apply #'concat
			  (pcase backend
			    (`latex `("\\begin{cautionblock}", contents, "\\end{cautionblock}"))
			    (`hugo `("{{% alert title=\"", title, "\" color=\"", title-color, "\" %}}\n", contents, "\n{{% /alert %}}"))
			    )
			  )
		   )
       )

The org parts in using them look like:

  #+begin_noteblock
  This is a noteblock info environment from the awesomebox LaTeX package.
  #+end_noteblock

  #+begin_stutter 5
  gaga
  #+end_stutter
 
  Some blabla blabli and a little bit of a plantuml file, make sure to put the code to render the image and also add some attributes on top of the =#RESULTS:= line under which the generated image is displayed. You can control the image layout with these attributes when rendered to LaTeX.

  #+begin_cautionblock 
  Danger, Will Robinson!

  It is possible to use the blocks
  #+end_cautionblock

A screenshot of how this currently renders:

From left to right (org source, ox-hugo output using the docsy theme, LaTeX output)

Screenshot 2021-12-15 at 22 35 59

Dependency from string library (s) version 1.12.0 I believe its wrong

I have installed org-special-block-extras (both version 2 and the latest 20210806.154) and they state that one of their dependencies is s-1.12.0 as per (;; Package-Requires: ((s "1.12.0") (dash "2.18.0") (emacs "26.1") (org "9.1"))).

The problem here is they required a function called 's-replace-regexp' which is not present in version 1.12.0 (which I installed from MELPA-STABLE) but at least on the latest version in MELPA (20210616.619). That one worked for me.

This is not a huge issue but it needs to be stated somewhere that the correct version of the dependency.

Problems when exporting to latex

Hi,

first thanks for another great org-package (I really need it!). I have some regarding the export formats (HTML and latex). When i try HTML page correctly displayed, but got the followings errors:

Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid key
Fill column set to 80 (was 70) [2 times]
user-error: Unable to resolve link: "notmuch:id:[email protected]"Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Fill column set to 80 (was 70) [2 times]
user-error: Unable to resolve link: "notmuch:id:[email protected]"Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Fill column set to 80 (was 70) [3 times]
Saving file /Users/enricopirani/org-special-block-extras/mwe.html...
Wrote /Users/enricopirani/org-special-block-extras/mwe.html
Running open /Users/enricopirani/org-special-block-extras/mwe.html...done
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: orange
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure
Invalid face reference: colour
Invalid face reference: %s
Invalid face reference: format
Invalid face reference: quote
Invalid face reference: list
Invalid face reference: colour
Invalid face reference: t
Invalid face reference: magenta
Invalid face reference: o-label
Invalid face reference: o-description
Invalid face reference: closure

As with the latex export I get this error

cond: Symbol’s value as variable is void: labelInvalid face reference: colour

Is there a problem with my latex config ?
Enrico

Support LaTeX's `\blockcquote`

I'd love to have a LaTeX special block which would correctly export to the respective \blockcquote command. For example,

#+begin_bquote :key zermelo1908 :pages 20-22

    This is a blockquote.

#+end_bquote

should export to \blockcquote[20-22]{zermelo1908}{This is a quote.}. Could you implement it, or does anyone have an idea how to do it?

Any interest in proposing this package for inclusion in either GNU or NonGNU ELPA?

Packages in NonGNU Elpa can only depend on packages in core Emacs, GNU Elpa, and NonGNU Elpa. As such, currently, no package that depends on org-special-block-extras can be included in NonGNU Elpa (nor GNU Elpa).

Adding this package to either NonGNU Elpa or GNU Elpa would alleviate that. Additionally, both GNU Elpa and NonGNU Elpa are enabled by default in recent Emacsen, so adding this package to either would also reduce the friction for new-users.

For situational awareness: Contributions to GNU Elpa require copyright assignment paperwork to be completed. Contributions to NonGNU Elpa don't require copyright assignment.

Support for dirlocal

This is a great package and I would love to use it with my collaborators! But in the current form, there needs to be some kind of "copy this config to your emacs." I think it would lower the adoption friction if this package could mark its own macros as safe so that we could check in a dirlocals file with all the shared macros.

Unwanted newlines in LaTeX export

Consider the following custom block:

#+begin_blockquote :citekey key :pages pages
*This* is a /try/.
#+end_blockquote

which was defined like this

(org-defblock blockquote nil (citekey "" pages "") "This is just an attempt."
(format (if (equal backend 'latex)
"\\blockcquote[%s]{%s}{%s}" nil)
pages citekey contents))

What it should print:

\blockcquote[pages]{key}{\textbf{This} is a \emph{try}.}

What it does print:

\blockcquote[pages]{key}{
\textbf{This} is a \emph{try}.

}

The problem is that, due to the added whitespace, the custom block just shown produces the latter output. If this is exported to LaTeX, instead of "**This** is a _try_", you get " **This** is a _try_ ". regexp-replacement does not work here, adding % only for the first line. Any ideas what to do?

can use defblock define block like cheatsheet ....

I like 'org-special-block-extras' and I also like your cheatsheet repo, these a question that whether can use defblock define a block like cheatsheet/mindmap/timeline .... then used in org document for embed contents ?

special blocks end lists

It seems that the blocks created by this package cause lists to stop when exporting, as well as generally leaving empty lines after the content in the exported file. Would it be possible to have the blocks remain inside the list?

An example:

1. builtin block
   #+begin_src latex
   \uline{does not end lists}
   #+end_src
2. org-special-blocks
   #+begin_proposition
   does not end lists
   #+end_proposition
3. org-special-block-extras builtin block
   #+begin_stutter 5
   this ends lists
   #+end_stutter
4. org-special-block-extras custom defblock
   #+begin_thm
   this ends lists
   #+end_thm

becomes

\begin{enumerate}
\item builtin block
\begin{verbatim}
   \uline{does not end lists}
\end{verbatim}
\item org-special-blocks
\begin{proposition}
does not end lists
\end{proposition}
\item org-special-block-extras builtin block
\end{enumerate}

this ends lists


this ends lists


this ends lists


this ends lists


this ends lists


\begin{enumerate}
\item org-special-block-extras custom defblock
\end{enumerate}
\begin{theorem}
this ends lists


\end{theorem}

and similarly in HTML.

Specifying column widths

The site under parallel mentions defining percentage-width columns being possible.

Any thoughts on how that might be achieved, or might be "hacked in," even if I have to go and edit the HTML? I need 3 columns, with the middle column being much wider and the outside columns being much thinner--the effect would be something like a main text with commentaries on the side.

It's possible to hack this into CSS when there are just 2 columns (by making the first column very large) but I cannot find anyway to do it all with more than two.

Wrong type argument on `margin`, `kbd` links

This is a wonderful package! I am hoping to take this and make a nice blog.

Reproduce:

  1. Doom Emacs (largely default doom)
  2. Open an Org File
  3. Type in a double-bracketed link for a deflink where :display full, e.g. [[margin:bluhhh]]
  4. Now, many evil-mode functions will no longer work, and the org buffer will slowly degrade in rendering consistency.
  5. This issue will be resolved only after deleting the offending link, closing, then re-opening the buffer.

Whenever I DD delete a line, x delete a char, org-export-dispatch, this appears in *Messages* buffer:

org-fold-core--property-symbol-get-create:` Wrong type argument: symbolp, 'full

This issue is unique to the double-bracketed link form. it DOES NOT affect:

  • implicit links e.g. margin:bluhh or kbd:C-x
  • begin_X style blocks e.g.
#+begin_margin red
green blue
#+end_margin

GNU Emacs 28.2 (build 2, x86_64-w64-mingw32) of 2022-09-13
Doom core v3.0.0-pre HEAD -> master 07fca786 2023-05-30 19:39:04 -0400
Doom modules v23.03.0-pre HEAD -> master 07fca786 2023-05-30 19:39:04 -0400
Org mode version 9.6.1 (9.6.1-??-fe92a3c @ $HOME/.emacs.d/.local/straight/build-28.2/org/)

default keymap overrides frequently used org-mode shortcuts: `C-n`, `C-p`and `C-h`

The default keymap built into o-deflink overrides C-n, C-p and C-h, the former two of which greatly degrade navigation when I'm not trying to skip to the next link type (which is most of the time). I frequently find myself miles away from the desired line in a document when trying to move up or down a single line or a handful of lines with C-n or C-p.

  1. Is there a way to configure this keymap with a few lines (something like the below)?
  2. I'd like to suggest that the defaults be moved to something which does not override C-n, C-p and C-h, given that they get in the way.

The following code is just an example of what it could look like for someone who wanted to use the current key-chords. I would probably change them to C-c C-b and C-c C-p for my own usage. I haven't tried to get this working yet as I don't really know where to start or how to go about doing so.

(define-key org-special-block-extras-mode-map (kbd "C-n") 'o-this-link-next) 
;; where `o-this-link-next` does the same as `(lambda nil (interactive) (re-search-forward "link-value:" nil t))`
(define-key org-special-block-extras-mode-map (kbd "C-p") 'o-this-link-previous) 
;; where `o-this-link-previous` does the same as `(lambda nil (interactive) (re-search-backward "link-value:" nil t))`
(define-key org-special-block-extras-mode-map (kbd "C-h") 'org-special-block-extras-show-docs)
;; or with the `keydef` package
(keydef (org-special-block-extras "C-n") o-this-link-next)
(keydef (org-special-block-extras "C-p") o-this-link-previous)
(keydef (org-special-block-extras "C-h") o-show-docs)

Has anyone else found a better way around this? The functionality could be useful bound diferently, but since I make much more use of C-n, C-p and C-h than the arrow keys or <f1> k it really just gets in the way most of the time.

An additional gripe with the current version of C-h is that it opens in a dedicated, read-writeable buffer, so that a quick C-x o q switches to that buffer and inserts a q rather than calling quit-window:

'C-h `(-let [max-mini-window-height 0] ;; i.e., insist on displaying in a dedicated buffer
                                           (display-message-or-buffer ,msg))

Again, I'm not sure how to fix this and I don't have the time to spend on it just now, but I figured it'd be worth mentioning alongside the above.

Avoiding wrap with export block

Thanks for creating this wonderful package!

I have used org-defblock which returns a string I want to process more later. I export the buffer, and most times it just inserts the string like i expect. But if a line in the string starts with "* " it gets wrapped in an export block:
#+begin_export org/latex/html (depending on backend)
string
#+end_export

I see there is something in the docstring about an "ORG-EXPORT" function doing this, but I'm not good enough yet at elisp to figure out a way to control this behaviour.

Any tips?

Improve documentation & reference matter & motivating examples & how-to sections

  1. The current motivating example rremark is not really a hot-sell 😞 There are much better motivating examples elsewhere in the article, mention those first ---e.g., by having a whirlwind of features/special-blocks/links presented first, then talking about the machinery required to make them happen.

  2. Top-level sections that are relatively short, such as sec 2, sec 3, & sec 8 can be converted into "(advanced) exercises" of section 1.5, or otherwise can be mentioned along the way in section 1? Something to consider.

  3. There is a difference between "tutorial" and "reference" and "theory". It seems that the webpage is trying to do "theory" in section 1, then "tutorial" in section 1.5, then "how-to-guide/recipes" in sections 2-13, and the "reference" is happening in the github readme. None of these is done specifically well.

    • Please make the intent of each of these super clear & explicit, then actually follow through.
    • E.g., the github readme should have just a reference of the links/blocks defined, their args, and a link to the webpage for more info. Aside: The readme looks like trash ‿︵(ಥ﹏ಥ)‿︵

defblock fails to export output when using latex derived backend

Consider some latex derived backend:

(org-export-define-derived-backend
    'mybackend
    'latex
 ;; implementation detail ... 
)

And a custom special block myblock to go with it

(defblock  myblock
  (when  (or (equals 'latex) (equals 'mybackend)) 
    (concat
     "\\my-latex-command\n"
     raw-contents
     "\n\\my-latex-command")))

Use mybloc in some test.org file:

#+begin_myblock
<some content goes here>
#+end_myblock

Now the issue is myblock is never rendered when exporting test.org to latex

(org-export-to-buffer 'mybackend  "*Export Result Buffer*)

Is there a proper way to make defblock work with latex dervied backends?

Currently overriding org-latex-special-block from my-backend translation table
and fixing org-export-current-backend to point to latex during export seems to
work.

(defun ox-mybackend-special-block ( special-block contents info )
  (let ((org-export-current-backend 'latex))
         (org-latex-special-block special-block contents info))) 

Add beamer support

Exporting to LaTeX using org-beamer does not work. This is because beamer as a backend is not provided for. This could easily be solved by changing lines like (equal backend 'latex) to (or (equal backend 'beamer) (equal backend 'latex)); it accounts for both LaTeX and beamer. Any chance you could make these changes? Your blocks are too great not to be used in org-beamer!

Syntax highlighting in custom blocks are not working :(

Thanks a lot for taking on this arduous task to bring such cool stuff.

There were no mention to this in the manual or anything on the issues about highlighting. That's why I am opening this issue.

Latex blocks in column blocks:
image

Code blocks in demo blocks:
image

Is it possible to bring highligting back to special blocks?

Best, B

Versions:
GNU Emacs 28.2 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars) of 2023-05-14, modified by Debian
GNU Emacs v28.2 nil
Doom core v3.0.0-pre HEAD -> master 07fca786 2023-05-30 19:39:04 -0400
Doom modules v23.03.0-pre HEAD -> master 07fca786 2023-05-30 19:39:04 -0400

Org mode version 9.6.1 (9.6.1-??-fe92a3ced @ /home/bar/.emacs.d/.local/straight/build-28.2/org/)

org-special-block-extras version 4.0.2

Special blocks for `.docx` export

I am desperately trying to get special blocks to export to .docx, but it won't work. At first I thought I was missing the right backend, but then I came to realize the problem lays deeper. Even defining this custom block did not yield any result:

(org-defblock satz nil (name "" label "") "Custom block for the custom satz-environment in LaTeX."
(print "hello!"))

For all .tex and .html, it is replaced by "hello!" every time.

It seems to me that something is converting the block before the formatting function of org-special-blocks-extra comes into play. What could the reason for that be, and what could you do about it?

How can I prevent org from adding a paragraph inside the div?

Hi, thanks for making the great package.

I was messing around a bit to be able to create a theorem environment for mathematics. It is quite common to write these as

Theorem n. bla bla

However, in the produced html code, a paragraph <p> bla bla </p> environment is added inside the div. How can I prevent this from happening?

My current code is
(o-defblock theorem (format "<div class=\"theorem\">%s</div>" contents))

Org-mode doesn't expand special blocks properly.

Hi @alhassy, I've got an issue where org-mode does not seem to expand the blocks properly,

It used to work until recently (couple days ago) but now the special blocks are expanded incorrectly and it errors out.

Minimal example,

#+title: This is a title
#+author: ME

* Introduction

Next, writing in the margin.

#+begin_margin note
this is a margin note
#+end_margin

* END

This used to expand to a \marginpar such as shown into the docs :

(o-defblock margin
  (marker nil
          :display 'full
          :face '(:foreground "grey" :weight bold
          :underline "orange" :overline "orange"))
  (color "gray!80"
          counter "footnote"
          width "\\paperwidth - \\textwidth - \\oddsidemargin - 1in - 3ex")
          ;; Width: https://tex.stackexchange.com/a/101861/69371
  :please-inline__no-extra-newlines__k-thx-bye!
  "Produce an HTML tooltip or a LaTeX margin note.

The ‘margin’ block is intended for “one-off” (mostly optional) remarks.

For notes that you want to use repeatedly, in multiple articles
or in multiple locations in the same article, consider using
‘documentation’ to declare them and ‘doc’ to invoke them.

For LaTeX, place ‘#+resize:’ to have the remainder of a block be
resized, for now 1.3 the margin width ---requires \\usepackage{adjustbox}.

----------------------------------------------------------------------

WIDTH, COUNTER, and COLOR are LaTeX specfic.

When no label, marker, is used for a marginal note, we rely
on a COUNTER, such as ‘footnote’ (default) or ‘sidenote.’
Since HTML has no margin per se, we use “∘” as default marker:
Users hover over it to read the marginal note.

Marginal notes have their labels, markers, in black
and the notes themselves have COLOR being grey!80.
In Emacs, margin links appear grey with an orange tinted boarder.

Regarding LaTeX, since verbatim environments do not in general work well
as arguments to other commands, such as ‘\\marginpar’, we save the contents
of the special block in a ‘minipage’ within a LaTeX ‘box’; then we can unfold such
a box in the margin. Hence, ‘src’ blocks can appear within ‘margin’ blocks (•̀ᴗ•́)و

The WIDTH argument is the width of the margin; i.e., the width of the underlying
minipage.

One could use \\maxsizebox{.25\\textwidth}{\\textheight}{ ... }
which only resizes the content if its natural size is larger than
the given 〈width〉 or 〈height〉.  We don't use this, since
maxsizebox does not natively allow linebreaks
(e.g., one would wrap contents in a tabular environment then use
\\\\’, two backslashes, to request a line break; but this
crashes if one wants to also use verbatim environments.)

In LaTeX, it may be useful to invoke ‘\\dotfill’."
  (-let [stepcounter (if marker "" (format "\\stepcounter{%s}" counter))]
    (pcase backend
      (`latex
       (setq marker (or marker (format "{\\the%s}" counter))) ;; "\\circ"
       (format "\\!\\!${}^{\\textnormal{%s}}$
               \\newsavebox{\\OrgSpecialBlockExtrasMarginBox}
               \\begin{lrbox}{\\OrgSpecialBlockExtrasMarginBox}
               \\begin{minipage}{%s}
               \\raggedright \\iffalse Otherwise default alignment is fully justified. \\fi
               \\footnotesize
               \\setminted{fontsize=\\footnotesize, breaklines} \\iffalse HACK! \\fi
               \\color{%s}
               {\\color{black}${}^{\\textnormal{%s}}$}\n\\normalfont\n %s
               \\end{minipage}
               \\end{lrbox}
               \\marginpar{\\usebox{\\OrgSpecialBlockExtrasMarginBox}%s}
               \\hspace{-1.9ex}
               \\global\\let\\OrgSpecialBlockExtrasMarginBox\\relax"
               marker
               width
               color
               marker
               (if (s-contains? "#+resize:" contents)
                   (s-concat
                    (s-replace "#+resize:"
                               "#+latex: \\maxsizebox{1.3\\textwidth}{\\textheight}{\\begin{tabular}{l}\n"
                               (s-trim contents))
                    "\n\\end{tabular}}")
                 (s-trim contents))
               stepcounter))
      (_ (setq marker (or marker "°"))
         (format "<abbr class=\"tooltip\" title=\"%s\">%s</abbr>&emsp13;"
                 (o-html-export-preserving-whitespace contents)
                 ; MA: FIXME: (org-export-string-as contents 'html :body-only-please)
                 marker)))))

But now, it simply expands to

\begin{margin}
this is a margin note
\end{margin}

Since there is no such thing as a margin environment, LaTeX compilation fails.

Relevant information :

  • Emacs version : GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6) of 2022-06-03

  • Org version : Org mode version 9.5.3 (release_9.5.3-6-gef41f3 @ /usr/local/share/emacs/29.0.50/lisp/org/)

  • org-special-block-extras version : 20220326.1432

This may be an issue because I'm using a very recent version of Emacs but until a couple days ago it worked fine.

Some javascript and css gets blocked by ublock

Hi,
Some javascript and css gets blocked by ublock.

2023-08-13.15-59-51.mp4

I suspect the issue is at
<link rel=\"stylesheet\" type=\"text/css\" href=\"https://alhassy.github.io/org-special-block-extras/tooltipster/dist/css/tooltipster.bundle.min.css\"/>

This can be solved by having these embedded or letting the user chose where they're loaded from or having them loaded from a relative path. Or some better solution I can't think of?

Please tick the following, by replacing [ ] with [X]

  1. I have checked some boxes without reading them.

Edit: I also noticed that these are inserted to document more than once (30 times):

2023-08-13.16-13-45.mp4

Edit2: This repeated insertion probably should be a seperate issue i guess. It can be seen at documentation page too:
view-source:http://alhassy.com/org-special-block-extras/

No way to disable tooltips and the extraneous code in HTML export.

The minor mode's definition adds a lot of extra HTML code that, first, may not be needed by everyone using this package, second, loads stuff from foreign websites.

I'm not a security analyst, but I guess this could easily be considered a security threat, especially since it's the default behaviour of the package and the documentation doesn't especially warn the user that they will need untrusted data from an untrusted website.

Doesn't work with RevealJS HTML Backend

I am using it as follows

#+begin_parallel
[[color:orange][Are you excited to learn some Lisp?]] [[blue:Yes!]]

Pop-quiz: How does doc:apply work?
#+end_parallel

In the HMTL backend,

it works fine.

However, when I export it to revealJS HTML

Using the org-reveal package, the generated HTML doesn't reflect the different columns as it does in plain HTML. As I inspect the generated HTML using the reveal backend, it has no special CSS inserted as it had in the plain HTML backend.

Please tick the following, by replacing [ ] with [X]

  1. I am aware of the extensive documentation at http://alhassy.com/org-special-block-extras/
  2. I have read the documentation of doc:org-defblock
  3. I have checked some boxes without reading them.
  4. I am aware that (org-defblock X ⋯) gives me a Lisp function org-block/X
    that I can play with; e.g., C-h o org-block/shout shows a function with its
    docstring and arguments. We can press C-u C-x C-e at the end of the
    closing parens of (org-block/shout 'html "*Hello*, /world/!") to see
    what Org sees when it rewrites a shout block with the given string as its contents.

Need help with making a block

I want to have python snippets in org thus:

#+begin_PYT
def foo(x):
# Some python code
#+end_PYT

where PYT is a latex environment for python code using (say) listings.

It should expand to

#+begin_export latex
\begin{PYT}
def foo(x):
# Some python code
\end{PYT}
#+end_export

Note 1. Python is just an example. Actually I want this for multiple languages including one that's not in org babel's list.
Note 2. A straight #+begin_pyt of course doesn't work because org transcodes (is that the word??) things like python's [[2]] into a link!!

I guess one should use o-thread-blockcall but I cant make out how!
Something like

(o-thread-blockcall 
   ('org-export-block 'latex-backend)
    'the-implied-block-begin-PYT)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.