From 77006082d020f26147e9412e10d07a9a2ac50cb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Cadilhac?= Date: Sun, 10 Mar 2019 19:05:10 +0000 Subject: [PATCH 1/3] org-clock.el: Add an option to not show the file column in clock report * lisp/org-clock.el (org-clocktable-defaults): Add `hidefiles'. (org-dblock-write:clocktable): Implement not showing files when `hidefiles' is true. * lisp/org-pcomplete.el: Add `hidefiles'. --- lisp/org-clock.el | 5 ++++- lisp/org-pcomplete.el | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index bf9053ec2..8af59e705 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -304,6 +304,7 @@ string as argument." :link nil :narrow '40! :indent t + :hidefiles nil :formula nil :timestamp nil :level nil @@ -2391,6 +2392,7 @@ the currently selected interval size." (ws (plist-get params :wstart)) (ms (plist-get params :mstart)) (step (plist-get params :step)) + (hide-files (plist-get params :hidefiles)) (formatter (or (plist-get params :formatter) org-clock-clocktable-formatter 'org-clocktable-write-default)) @@ -2445,7 +2447,8 @@ the currently selected interval size." ;; Even though `file-with-archives' can consist of ;; multiple files, we consider this is one extended file ;; instead. - (and (consp files) (not (eq scope 'file-with-archives))))) + (and (not hide-files) + (consp files) (not (eq scope 'file-with-archives))))) (funcall formatter origin diff --git a/lisp/org-pcomplete.el b/lisp/org-pcomplete.el index 70a8173d8..9e68c7dc1 100644 --- a/lisp/org-pcomplete.el +++ b/lisp/org-pcomplete.el @@ -430,8 +430,9 @@ switches." ":tstart" ":tend" ":block" ":step" ":stepskip0" ":fileskip0" ":emphasize" ":link" ":narrow" ":indent" - ":tcolumns" ":level" ":compact" ":timestamp" - ":formula" ":formatter" ":wstart" ":mstart")))) + ":hidefiles" ":tcolumns" ":level" ":compact" + ":timestamp" ":formula" ":formatter" + ":wstart" ":mstart")))) ;;; Finish up -- 2.22.0