0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-27 19:32:52 +00:00

Direct export of only the current subtree

This commit is contained in:
Carsten Dominik 2009-12-11 08:47:28 +01:00
parent e8ec6d6d11
commit 3ada390dc9

View file

@ -843,8 +843,10 @@ ARG is a double universal prefix `C-u C-u', that means to inverse the
value of `org-export-run-in-background'." value of `org-export-run-in-background'."
(interactive "P") (interactive "P")
(let* ((bg (org-xor (equal arg '(16)) org-export-run-in-background)) (let* ((bg (org-xor (equal arg '(16)) org-export-run-in-background))
subtree-p
(help "[t] insert the export option template (help "[t] insert the export option template
\[v] limit export to visible part of outline tree \[v] limit export to visible part of outline tree
\[1] only export the current subtree
\[a] export as ASCII [A] to temporary buffer \[a] export as ASCII [A] to temporary buffer
@ -903,7 +905,11 @@ value of `org-export-run-in-background'."
(org-fit-window-to-buffer (get-buffer-window (org-fit-window-to-buffer (get-buffer-window
"*Org Export/Publishing Help*")) "*Org Export/Publishing Help*"))
(message "Select command: ") (message "Select command: ")
(setq r1 (read-char-exclusive)))) (setq r1 (read-char-exclusive))
(when (eq r1 ?1)
(setq subtree-p t)
(message "Select command (for subtree): ")
(setq r1 (read-char-exclusive)))))
(setq r2 (if (< r1 27) (+ r1 96) r1)) (setq r2 (if (< r1 27) (+ r1 96) r1))
(unless (setq ass (assq r2 cmds)) (unless (setq ass (assq r2 cmds))
(error "No command associated with key %c" r1)) (error "No command associated with key %c" r1))
@ -924,6 +930,7 @@ value of `org-export-run-in-background'."
(set-process-sentinel p 'org-export-process-sentinel) (set-process-sentinel p 'org-export-process-sentinel)
(message "Background process \"%s\": started" p)) (message "Background process \"%s\": started" p))
;; background processing not requested, or not possible ;; background processing not requested, or not possible
(if subtree-p (outline-mark-subtree))
(call-interactively (nth 1 ass))))) (call-interactively (nth 1 ass)))))
(defun org-export-process-sentinel (process status) (defun org-export-process-sentinel (process status)