summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblais <blais@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2007-03-29 02:24:10 +0000
committerblais <blais@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2007-03-29 02:24:10 +0000
commit298b9ecc2a34d13a360a30eaf2df875747efe9b4 (patch)
treeafdc793312e8b9f335dd17b51d5693fa80f9df78
parentc8c8d824115fa18361ceb3b9417a7b8c52e8ae2a (diff)
downloaddocutils-298b9ecc2a34d13a360a30eaf2df875747efe9b4.tar.gz
emacs support: added S5 preview (submitted to me by Jeff Rush)
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@5039 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
-rw-r--r--tools/editors/emacs/rst.el15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/editors/emacs/rst.el b/tools/editors/emacs/rst.el
index e702420a9..69ed23a9a 100644
--- a/tools/editors/emacs/rst.el
+++ b/tools/editors/emacs/rst.el
@@ -256,6 +256,7 @@
("C" . rst-compile-alt-toolset)
("x" . rst-compile-pseudo-region)
("q" . rst-compile-pdf-preview)
+ ("Q" . rst-compile-slides-preview)
))
(define-key rst-prefix-map (car m) (cdr m)))
@@ -3315,6 +3316,20 @@ of the entire buffer, if the region is not selected."
;; output.
))
+(defvar rst-slides-program "firefox"
+ "Program used to preview S5 slides.")
+
+(defun rst-compile-slides-preview ()
+ "Convert the document to an S5 slide presentation and launch a preview program."
+ (interactive)
+ (let* ((tmp-filename "/tmp/slides.html")
+ (command (format "rst2s5.py %s %s && %s %s"
+ buffer-file-name tmp-filename
+ rst-slides-program tmp-filename)))
+ (start-process-shell-command "rst-slides-preview" nil command)
+ ;; Note: you could also use (compile command) to view the compilation
+ ;; output.
+ ))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;