diff options
author | blais <blais@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2007-03-29 02:24:10 +0000 |
---|---|---|
committer | blais <blais@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2007-03-29 02:24:10 +0000 |
commit | 298b9ecc2a34d13a360a30eaf2df875747efe9b4 (patch) | |
tree | afdc793312e8b9f335dd17b51d5693fa80f9df78 | |
parent | c8c8d824115fa18361ceb3b9417a7b8c52e8ae2a (diff) | |
download | docutils-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.el | 15 |
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. + )) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |