org-clock: Preserve narrowing when building clock table
* lisp/org-clock.el (org-dblock-write:clocktable): Preserve current narrowing, if any, when building the table. Reported-by: Christof Musik <ml-orgmode@litephone.org> <http://permalink.gmane.org/gmane.emacs.orgmode/112872>
This commit is contained in:
parent
a08dd527d9
commit
df0c7d96a2
|
@ -2409,6 +2409,7 @@ the currently selected interval size."
|
||||||
(org-clock-get-table-data file params)))))
|
(org-clock-get-table-data file params)))))
|
||||||
files)
|
files)
|
||||||
;; Get the right restriction for the scope.
|
;; Get the right restriction for the scope.
|
||||||
|
(save-restriction
|
||||||
(cond
|
(cond
|
||||||
((not scope)) ;use the restriction as it is now
|
((not scope)) ;use the restriction as it is now
|
||||||
((eq scope 'file) (widen))
|
((eq scope 'file) (widen))
|
||||||
|
@ -2428,7 +2429,7 @@ the currently selected interval size."
|
||||||
level)
|
level)
|
||||||
(throw 'exit nil))))
|
(throw 'exit nil))))
|
||||||
(org-narrow-to-subtree))))
|
(org-narrow-to-subtree))))
|
||||||
(list (org-clock-get-table-data nil params))))
|
(list (org-clock-get-table-data nil params)))))
|
||||||
(multifile
|
(multifile
|
||||||
;; Even though `file-with-archives' can consist of
|
;; Even though `file-with-archives' can consist of
|
||||||
;; multiple files, we consider this is one extended file
|
;; multiple files, we consider this is one extended file
|
||||||
|
|
Loading…
Reference in New Issue