summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Junke <christophe.junke@inria.fr>2012-05-25 11:40:47 +0200
committerBastien Guerry <bzg@altern.org>2012-05-26 00:19:01 +0200
commit993dd076fbe1dc62f2297a24a3f6acd8890e1af0 (patch)
treebeaa927db3fbcb44ecc45bf9c94beeb1fd1eff72
parentc49a0f9e40110226546dd242fde531aa46ec57c3 (diff)
downloadorg-mode-993dd076fbe1dc62f2297a24a3f6acd8890e1af0.tar.gz
Let org-agenda-time-grid control if the grid is displayed
* lisp/org-agenda.el (org-agenda-list): Ensures that the list returned by `org-agenda-add-time-grid-maybe' is appended to ̀rtnall' before checking if the latter is emtpy. In the case where `rtnall' is empty (no item for current day), we do not call `org-agenda-add-time-grid-maybe'. This seems bogus because that function is already computing whether the time grid must be included, and does so according to the user's preferences. In particular, the `org-agenda-time-grid' variable has a `require-timed' parameter controlling the visibility of the time grid. So, this patch : - removes the premature check for `rtnall' being empty, - inconditionally calls `org-agenda-add-time-grid-maybe', - appends the result to `rtnall', - and finally checks the emptiness of the resulting list before pretty printing. TINYCHANGE
-rw-r--r--lisp/org-agenda.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index cfd3e25..eebb66f 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -3886,10 +3886,11 @@ given in `org-agenda-start-on-weekday'."
(put-text-property s (1- (point)) 'org-day-cnt day-cnt)
(when todayp
(put-text-property s (1- (point)) 'org-today t))
+ (setq rtnall
+ (append rtnall
+ (org-agenda-add-time-grid-maybe rtnall ndays todayp)))
(if rtnall (insert ;; all entries
- (org-finalize-agenda-entries
- (org-agenda-add-time-grid-maybe
- rtnall ndays todayp))
+ (org-finalize-agenda-entries rtnall)
"\n"))
(put-text-property s (1- (point)) 'day d)
(put-text-property s (1- (point)) 'org-day-cnt day-cnt))))