瀏覽代碼

make export dispatcher go away promptly

Following on from Stephen's recent post, a
thing-that-slightly-bothers-me is the way the export dispatcher window
doesn't go away until export is complete. I've briefly looked at the
code twice now and it wasn't obvious to me why the save-window-excursion
(line 941 org-exp.el) wasn't already doing what I wanted. However, the
change below seems to have the effect I wanted. While this particular
solution may be a hack, I wonder whether people would prefer its
behaviour? E.g. try exporting this:

#+title: title

#+begin_src sh :exports results
sleep 5 && echo hello
#+end_src

export can often take several seconds and it's nice to be able to zone
out looking at your org document rather than the dispatcher window.

	Modified lisp/org-exp.el

(I see that (sit-for .0001) is used in a couple of places in Org for
this effect, so maybe that should be used instead.)

Dan
Dan Davison 14 年之前
父節點
當前提交
123f3b774c
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      lisp/org-exp.el

+ 1 - 0
lisp/org-exp.el

@@ -963,6 +963,7 @@ value of `org-export-run-in-background'."
 		  (setq r1 (read-char-exclusive)))
 		  (setq r1 (read-char-exclusive)))
 	      (error "No enclosing node with LaTeX_CLASS or EXPORT_FILE_NAME")
 	      (error "No enclosing node with LaTeX_CLASS or EXPORT_FILE_NAME")
 	      )))))
 	      )))))
+    (redisplay)
     (and bpos (goto-char bpos))
     (and bpos (goto-char bpos))
     (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))