summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2012-05-06 09:17:53 +0200
committerBastien Guerry <bzg@altern.org>2012-05-06 09:17:53 +0200
commitfe0641a0fbef7b70834cbfefc61b42f188098d6d (patch)
treeab2cd1d76c1fc7bacbdf03f6afb211fdf0d15b93
parente70068feedc7dfec15d055eb22dd29c75b76b1a2 (diff)
parente8d291bc76370a1af0cdc289523bf1f5500b4e97 (diff)
downloadorg-mode-fe0641a0fbef7b70834cbfefc61b42f188098d6d.tar.gz
Merge branch 'master' of orgmode.org:org-mode
-rw-r--r--contrib/lisp/org-drill.el85
-rw-r--r--contrib/lisp/org-e-latex.el2
2 files changed, 36 insertions, 51 deletions
diff --git a/contrib/lisp/org-drill.el b/contrib/lisp/org-drill.el
index 7d32176..793d6b4 100644
--- a/contrib/lisp/org-drill.el
+++ b/contrib/lisp/org-drill.el
@@ -1976,23 +1976,6 @@ visible content of the card."
(org-drill-hide-subheadings-if 'org-drill-entry-p)))))
-;;; The following macro is necessary because `org-save-outline-visibility'
-;;; currently discards the value returned by its body and returns a garbage
-;;; value instead. (as at org mode v 7.5)
-
-(defmacro org-drill-save-visibility (&rest body)
- "Store the current visibility state of the org buffer, and restore it
-after executing BODY. Return the value of the last expression
-in BODY."
- (let ((retval (gensym)))
- `(let ((,retval nil))
- (org-save-outline-visibility t
- (setq ,retval
- (progn
- ,@body)))
- ,retval)))
-
-
(defun org-drill-entry ()
"Present the current topic for interactive review, as in `org-drill'.
Review will occur regardless of whether the topic is due for review or whether
@@ -2012,38 +1995,41 @@ See `org-drill' for more details."
;; (org-back-to-heading))
(let ((card-type (org-entry-get (point) "DRILL_CARD_TYPE"))
(answer-fn 'org-drill-present-default-answer)
- (cont nil))
- (org-drill-save-visibility
- (save-restriction
- (org-narrow-to-subtree)
- (org-show-subtree)
- (org-cycle-hide-drawers 'all)
-
- (let ((presentation-fn (cdr (assoc card-type org-drill-card-type-alist))))
- (if (listp presentation-fn)
- (psetq answer-fn (or (second presentation-fn)
- 'org-drill-present-default-answer)
- presentation-fn (first presentation-fn)))
- (cond
- ((null presentation-fn)
- (message "%s:%d: Unrecognised card type '%s', skipping..."
- (buffer-name) (point) card-type)
- (sit-for 0.5)
- 'skip)
- (t
- (setq cont (funcall presentation-fn))
- (cond
- ((not cont)
- (message "Quit")
- nil)
- ((eql cont 'edit)
- 'edit)
- ((eql cont 'skip)
- 'skip)
- (t
- (save-excursion
- (funcall answer-fn
- (lambda () (org-drill-reschedule)))))))))))))
+ (cont nil)
+ ;; fontification functions in `outline-view-change-hook' can cause big
+ ;; slowdowns, so we temporarily bind this variable to nil here.
+ (outline-view-change-hook nil))
+ (org-save-outline-visibility t
+ (save-restriction
+ (org-narrow-to-subtree)
+ (org-show-subtree)
+ (org-cycle-hide-drawers 'all)
+
+ (let ((presentation-fn (cdr (assoc card-type org-drill-card-type-alist))))
+ (if (listp presentation-fn)
+ (psetq answer-fn (or (second presentation-fn)
+ 'org-drill-present-default-answer)
+ presentation-fn (first presentation-fn)))
+ (cond
+ ((null presentation-fn)
+ (message "%s:%d: Unrecognised card type '%s', skipping..."
+ (buffer-name) (point) card-type)
+ (sit-for 0.5)
+ 'skip)
+ (t
+ (setq cont (funcall presentation-fn))
+ (cond
+ ((not cont)
+ (message "Quit")
+ nil)
+ ((eql cont 'edit)
+ 'edit)
+ ((eql cont 'skip)
+ 'skip)
+ (t
+ (save-excursion
+ (funcall answer-fn
+ (lambda () (org-drill-reschedule)))))))))))))
(defun org-drill-entries-pending-p ()
@@ -3013,4 +2999,3 @@ returns its return value."
(provide 'org-drill)
-
diff --git a/contrib/lisp/org-e-latex.el b/contrib/lisp/org-e-latex.el
index 77edae4..6476db6 100644
--- a/contrib/lisp/org-e-latex.el
+++ b/contrib/lisp/org-e-latex.el
@@ -1489,7 +1489,7 @@ used as a communication channel."
\\centering
\\includegraphics[%s]{%s}
%s\\end{wrapfigure}" placement attr path caption))
- (mulicolumn (format "\\begin{figure*}%s
+ (multicolumn (format "\\begin{figure*}%s
\\centering
\\includegraphics[%s]{%s}
%s\\end{figure*}" placement attr path caption))