summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2018-07-07 09:27:04 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2018-07-07 09:27:04 +0200
commit445dc6af6f6de08ab5542cee6bd3c4ae295cd324 (patch)
treeb3bb84cc3b9c6674c5f1857796950e5a9636bddb
parent1d8616023d6ba0079118bcd548c98778b128fdde (diff)
downloadorg-mode-445dc6af6f6de08ab5542cee6bd3c4ae295cd324.tar.gz
org-colview: Do not move point when initializing columns
* lisp/org-colview.el (org-columns): Do not move point. Reported-by: Benjamin Motz <benni.motz@gmail.com> <http://lists.gnu.org/r/emacs-orgmode/2018-07/msg00040.html>
-rw-r--r--lisp/org-colview.el22
1 files changed, 11 insertions, 11 deletions
diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index 82a0ae0..9322758 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -808,17 +808,17 @@ view for the whole buffer unconditionally.
When COLUMNS-FMT-STRING is non-nil, use it as the column format."
(interactive "P")
(org-columns-remove-overlays)
- (when global (goto-char (point-min)))
- (if (markerp org-columns-begin-marker)
- (move-marker org-columns-begin-marker (point))
- (setq org-columns-begin-marker (point-marker)))
- (org-columns-goto-top-level)
- ;; Initialize `org-columns-current-fmt' and
- ;; `org-columns-current-fmt-compiled'.
- (let ((org-columns--time (float-time (current-time))))
- (org-columns-get-format columns-fmt-string)
- (unless org-columns-inhibit-recalculation (org-columns-compute-all))
- (save-excursion
+ (save-excursion
+ (when global (goto-char (point-min)))
+ (if (markerp org-columns-begin-marker)
+ (move-marker org-columns-begin-marker (point))
+ (setq org-columns-begin-marker (point-marker)))
+ (org-columns-goto-top-level)
+ ;; Initialize `org-columns-current-fmt' and
+ ;; `org-columns-current-fmt-compiled'.
+ (let ((org-columns--time (float-time (current-time))))
+ (org-columns-get-format columns-fmt-string)
+ (unless org-columns-inhibit-recalculation (org-columns-compute-all))
(save-restriction
(when (and (not global) (org-at-heading-p))
(narrow-to-region (point) (org-end-of-subtree t t)))