summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2013-02-19 10:33:07 +0100
committerBastien Guerry <bzg@altern.org>2013-02-19 10:33:07 +0100
commit66cba1c51f0d0c71f1bc2698d764401347646233 (patch)
treea3a903d7908ccb23206e1db4b9403ac01e4e1abc
parentefb2ce9c12feee122e61e153e65503a43b5138bf (diff)
downloadorg-mode-66cba1c51f0d0c71f1bc2698d764401347646233.tar.gz
org-agenda.el (org-agenda-set-restriction-lock): Fix restriction
* org-agenda.el (org-agenda-set-restriction-lock): Fix restriction so that it ends at the beginning of the next headline at the same level.
-rw-r--r--lisp/org-agenda.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 9371d30..0030082 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -7166,10 +7166,10 @@ in the file. Otherwise, restriction will be to the current subtree."
(list (buffer-file-name (buffer-base-buffer))))
(org-back-to-heading t)
(move-overlay org-agenda-restriction-lock-overlay
- (point) (save-excursion (org-end-of-subtree t) (point)))
+ (point) (save-excursion (org-end-of-subtree t t) (point)))
(move-marker org-agenda-restrict-begin (point))
(move-marker org-agenda-restrict-end
- (save-excursion (org-end-of-subtree t)))
+ (save-excursion (org-end-of-subtree t t)))
(message "Locking agenda restriction to subtree"))
(put 'org-agenda-files 'org-restrict
(list (buffer-file-name (buffer-base-buffer))))