summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2012-03-23 14:07:13 +0100
committerBastien Guerry <bzg@altern.org>2012-03-23 14:07:13 +0100
commit1a81418320dcd4b949d094cde42eca5e53a67a5c (patch)
tree8d646439687e587ea62ee9fc2a1d979733f6ab18
parentc2c0a43a6085d37a86a90682e789a40926564b40 (diff)
parentfe7d69bdea7d41b98e1d00cbac6bfe91481b93b4 (diff)
downloadorg-mode-1a81418320dcd4b949d094cde42eca5e53a67a5c.tar.gz
Merge branch 'hotfix-7.8.06'
-rw-r--r--lisp/org-habit.el13
1 files changed, 11 insertions, 2 deletions
diff --git a/lisp/org-habit.el b/lisp/org-habit.el
index 4274aae..6b47766 100644
--- a/lisp/org-habit.el
+++ b/lisp/org-habit.el
@@ -336,7 +336,14 @@ current time."
(let ((inhibit-read-only t) l c
(buffer-invisibility-spec '(org-link))
(moment (time-subtract (current-time)
- (list 0 (* 3600 org-extend-today-until) 0))))
+ (list 0 (* 3600 org-extend-today-until) 0)))
+ disabled-overlays)
+ ;; Disable filters; this helps with alignment if there are links.
+ (mapc (lambda (ol)
+ (when (overlay-get ol 'invisible)
+ (overlay-put ol 'invisible nil)
+ (setq disabled-overlays (cons ol disabled-overlays))))
+ (overlays-in (point-min) (point-max)))
(save-excursion
(goto-char (if line (point-at-bol) (point-min)))
(while (not (eobp))
@@ -352,7 +359,9 @@ current time."
(time-subtract moment (days-to-time org-habit-preceding-days))
moment
(time-add moment (days-to-time org-habit-following-days))))))
- (forward-line)))))
+ (forward-line)))
+ (mapc (lambda (ol) (overlay-put ol 'invisible t))
+ disabled-overlays)))
(defun org-habit-toggle-habits ()
"Toggle display of habits in an agenda buffer."