diff options
author | Bastien Guerry <bzg@altern.org> | 2013-04-29 19:02:26 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2013-04-29 19:02:26 +0200 |
commit | 3f81fe855b881138e9ac5d05817c5f8e4fbd28c6 (patch) | |
tree | c89796d76ccb7e9cafd1ecb1fd3155433dd22feb | |
parent | 188dc72b2d66391a3539b71604e4b595e33c9f72 (diff) | |
parent | a9f590e7b13f8f61651a1645b81d7520c589b310 (diff) | |
download | org-mode-3f81fe855b881138e9ac5d05817c5f8e4fbd28c6.tar.gz |
Merge branch 'maint'
-rw-r--r-- | lisp/org-agenda.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 1fd9ee8..fe2c743 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -2737,12 +2737,12 @@ Pressing `<' twice means to restrict to the current subtree or region (put 'org-agenda-files 'org-restrict (list bfn)) (cond ((eq restriction 'region) - (setq org-agenda-restrict t) + (setq org-agenda-restrict (current-buffer)) (move-marker org-agenda-restrict-begin (region-beginning)) (move-marker org-agenda-restrict-end (region-end))) ((eq restriction 'subtree) (save-excursion - (setq org-agenda-restrict t) + (setq org-agenda-restrict (current-buffer)) (org-back-to-heading t) (move-marker org-agenda-restrict-begin (point)) (move-marker org-agenda-restrict-end @@ -4557,7 +4557,7 @@ in `org-agenda-text-search-extra-files'." (let ((case-fold-search t)) (save-excursion (save-restriction - (if org-agenda-restrict + (if (eq buffer org-agenda-restrict) (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) @@ -4813,7 +4813,7 @@ The prefix arg TODO-ONLY limits the search to TODO entries." (error "Agenda file %s is not in `org-mode'" file)) (save-excursion (save-restriction - (if org-agenda-restrict + (if (eq buffer org-agenda-restrict) (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) @@ -5281,7 +5281,7 @@ the documentation of `org-diary'." (let ((case-fold-search nil)) (save-excursion (save-restriction - (if org-agenda-restrict + (if (eq buffer org-agenda-restrict) (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) @@ -7085,7 +7085,7 @@ in the file. Otherwise, restriction will be to the current subtree." (t 'file))) (if (eq type 'subtree) (progn - (setq org-agenda-restrict t) + (setq org-agenda-restrict (current-buffer)) (setq org-agenda-overriding-restriction 'subtree) (put 'org-agenda-files 'org-restrict (list (buffer-file-name (buffer-base-buffer)))) |