summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2013-02-16 23:09:57 +0100
committerBastien Guerry <bzg@altern.org>2013-02-16 23:09:57 +0100
commitaa0e0068de109eef2ac7897c4659d545b351de01 (patch)
tree7a18b2f0304017815d482d942dd7e762bd079188
parentc4d8d26d1d3891a0f7aa6a380f0a8c875d4614d2 (diff)
downloadorg-mode-aa0e0068de109eef2ac7897c4659d545b351de01.tar.gz
org-agenda.el (org-agenda-set-restriction-lock): Put the overlay until the end of the subtree
* org-agenda.el (org-agenda-set-restriction-lock): Put the overlay until the end of the subtree, not the end of the headline. When the agenda restriction is on, user expect agenda views to check every entry in the subtree. If a user add an entry outside of the overlay without noticing it, this entry will not be checked and the user will wonder why. Put the end of the overlay at the end of the subtree so that the user always knows if the entries she is adding are within the current restriction. We might need to find a less instrusive overlay color, though.
-rw-r--r--lisp/org-agenda.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 00594a0..3f86d82 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -7164,7 +7164,8 @@ in the file. Otherwise, restriction will be to the current subtree."
(put 'org-agenda-files 'org-restrict
(list (buffer-file-name (buffer-base-buffer))))
(org-back-to-heading t)
- (move-overlay org-agenda-restriction-lock-overlay (point) (point-at-eol))
+ (move-overlay org-agenda-restriction-lock-overlay
+ (point) (save-excursion (outline-next-heading) (point)))
(move-marker org-agenda-restrict-begin (point))
(move-marker org-agenda-restrict-end
(save-excursion (org-end-of-subtree t)))