diff options
| author | smerten <smerten@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2011-01-23 19:58:46 +0000 |
|---|---|---|
| committer | smerten <smerten@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2011-01-23 19:58:46 +0000 |
| commit | 707fbc9d9b719fca627b2ef980bd05d2e42eef77 (patch) | |
| tree | d26855169d8ec47974318b033b06e3c5400f8a0d /docutils/tools | |
| parent | 341a72b2808120cfe7678c8185ff3fddd6f56a90 (diff) | |
| download | docutils-707fbc9d9b719fca627b2ef980bd05d2e42eef77.tar.gz | |
Compilation commands use and remove temporary files. Fixes bug
#2912890.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@6647 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/tools')
| -rw-r--r-- | docutils/tools/editors/emacs/rst.el | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/docutils/tools/editors/emacs/rst.el b/docutils/tools/editors/emacs/rst.el index f88563bf0..2b1a3d695 100644 --- a/docutils/tools/editors/emacs/rst.el +++ b/docutils/tools/editors/emacs/rst.el @@ -2616,7 +2616,6 @@ backwards in the file (default is to use 1)." ;; Functions to work on item lists (e.g. indent/dedent, enumerate), which are ;; always 2 or 3 characters apart horizontally with rest. -;; (FIXME: there is currently a bug that makes the region go away when we do that.) (defvar rst-shift-fill-region nil "If non-nil, automatically re-fill the region that is being shifted.") @@ -2738,6 +2737,7 @@ of (COLUMN-NUMBER . LINE) pairs." (defvar rst-shift-basic-offset 2 "Basic horizontal shift distance when there is no preceding alignment tabs.") +;; FIXME Doesn't keep the region (defun rst-shift-region-guts (find-next-fun offset-fun) "(See `rst-shift-region-right' for a description)." (let* ((mbeg (set-marker (make-marker) (region-beginning))) @@ -2795,7 +2795,6 @@ of (COLUMN-NUMBER . LINE) pairs." (fill-region mbeg mend)) )) -;; FIXME Doesn't keep the region ;; FIXME Should work more like `indent-rigidly' (defun rst-shift-region-right (pfxarg) "Indent region ridigly, by a few characters to the right. @@ -3661,12 +3660,11 @@ or of the entire buffer, if the region is not selected." (defun rst-compile-pdf-preview () "Convert the document to a PDF file and launch a preview program." (interactive) - ;; FIXME: Should use `make-temp-file' - see bug #2912890 - (let* ((tmp-filename "/tmp/out.pdf") - (command (format "%s %s %s && %s %s" + (let* ((tmp-filename (make-temp-file "rst_el" nil ".pdf")) + (command (format "%s %s %s && %s %s ; rm %s" (cadr (assq 'pdf rst-compile-toolsets)) buffer-file-name tmp-filename - rst-pdf-program tmp-filename))) + rst-pdf-program tmp-filename tmp-filename))) (start-process-shell-command "rst-pdf-preview" nil command) ;; Note: you could also use (compile command) to view the compilation ;; output. @@ -3678,18 +3676,16 @@ or of the entire buffer, if the region is not selected." (defun rst-compile-slides-preview () "Convert the document to an S5 slide presentation and launch a preview program." (interactive) - ;; FIXME: Should use `make-temp-file' - see bug #2912890 - (let* ((tmp-filename "/tmp/slides.html") - (command (format "%s %s %s && %s %s" + (let* ((tmp-filename (make-temp-file "rst_el" nil ".html")) + (command (format "%s %s %s && %s %s ; rm %s" (cadr (assq 's5 rst-compile-toolsets)) buffer-file-name tmp-filename - rst-slides-program tmp-filename))) + rst-slides-program tmp-filename tmp-filename))) (start-process-shell-command "rst-slides-preview" nil command) ;; Note: you could also use (compile command) to view the compilation ;; output. )) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Generic text functions that are more convenient than the defaults. |
