Christophe Weblog Wiki Code Publications Music
improve html export of org files
authorChristophe Rhodes <csr21@cantab.net>
Fri, 8 Oct 2010 11:01:30 +0000 (12:01 +0100)
committerChristophe Rhodes <csr21@cantab.net>
Fri, 8 Oct 2010 11:06:06 +0000 (12:06 +0100)
Allow ="foo"= to be exported as code.

BUGS.org
Makefile
org-export.el [new file with mode: 0644]

index 7ebda446147d6afe6ceaab4b10efa9ad54bba97f..5eedde0bcde094c2f1b2ffe844e897deb900582e 100644 (file)
--- a/BUGS.org
+++ b/BUGS.org
@@ -16,7 +16,7 @@
   only passes the buffer position in bytes (or maybe characters),
   whereas R's srcrefs work with lines and columns.
 * OPEN #4 multibyte characters corrupt slime connection              :NORMAL:
   only passes the buffer position in bytes (or maybe characters),
   whereas R's srcrefs work with lines and columns.
 * OPEN #4 multibyte characters corrupt slime connection              :NORMAL:
-  Not in all circumstances (e.g. "£" is OK) but 1:£ fails in
+  Not in all circumstances (e.g. ="£"= is OK) but =1:£= fails in
   slime-net-read-or-lose.
 * COMMENT:
 Local Variables:
   slime-net-read-or-lose.
 * COMMENT:
 Local Variables:
index a3e09b8801a680e4732c05752aa00986bf7a818f..07dfaa5ade8898d4080ad283949921a48d07ddab 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,10 +6,10 @@ webup: web
        scp $(WEBFILES) common-lisp.net:public_html/swankr/
 
 README.html: README
        scp $(WEBFILES) common-lisp.net:public_html/swankr/
 
 README.html: README
-       emacs --batch --visit README  --eval '(org-export-as-html nil)'
+       emacs --batch --visit README --load org-export.el
 
 %.html: %.org
 
 %.html: %.org
-       emacs --batch --visit $^ --eval '(org-export-as-html nil)'
+       emacs --batch --visit $^ --load org-export.el
 
 clean:
        -rm $(WEBFILES)
 
 clean:
        -rm $(WEBFILES)
diff --git a/org-export.el b/org-export.el
new file mode 100644 (file)
index 0000000..ecb16ee
--- /dev/null
@@ -0,0 +1,5 @@
+(let* ((orig org-emphasis-regexp-components)
+       (new `(,(nth 0 orig) ,(nth 1 orig) ,(remove ?\" (nth 2 orig))
+              ,(nth 3 orig) ,(nth 4 orig) ,(nth 5 orig))))
+  (org-set-emph-re 'org-emphasis-regexp-components new)
+  (org-export-as-html nil))