Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2015-08-12 14:53:56 +02:00
commit 128c132c60
1 changed files with 10 additions and 8 deletions

View File

@ -680,11 +680,14 @@ around it."
fmt)) fmt))
(defun org-columns-goto-top-level () (defun org-columns-goto-top-level ()
(when (condition-case nil (org-back-to-heading) (error nil)) "Move to the beginning of the column view area.
(org-entry-get nil "COLUMNS" t)) Also sets `org-columns-top-level-marker' to the new position."
(if (marker-position org-entry-property-inherited-from) (goto-char
(move-marker org-columns-top-level-marker org-entry-property-inherited-from) (move-marker
(move-marker org-columns-top-level-marker (point)))) org-columns-top-level-marker
(cond ((org-before-first-heading-p) (point-min))
((org-entry-get nil "COLUMNS" t) org-entry-property-inherited-from)
(t (org-back-to-heading) (point))))))
;;;###autoload ;;;###autoload
(defun org-columns (&optional columns-fmt-string) (defun org-columns (&optional columns-fmt-string)
@ -703,9 +706,8 @@ When COLUMNS-FMT-STRING is non-nil, use it as the column format."
(save-excursion (save-excursion
(save-restriction (save-restriction
(narrow-to-region (narrow-to-region
org-columns-top-level-marker (point)
(or (ignore-errors (org-end-of-subtree t t)) (point-max))) (if (org-at-heading-p) (org-end-of-subtree t t) (point-max)))
(goto-char (point-min))
(when (assoc "CLOCKSUM" org-columns-current-fmt-compiled) (when (assoc "CLOCKSUM" org-columns-current-fmt-compiled)
(org-clock-sum)) (org-clock-sum))
(when (assoc "CLOCKSUM_T" org-columns-current-fmt-compiled) (when (assoc "CLOCKSUM_T" org-columns-current-fmt-compiled)