Honour existing restrictions when visiting tasks from the agenda
commit8f93a75cacbfffb120d5ce18c494e2b85afa8d74
authorBernt Hansen <bernt@norang.ca>
Fri, 30 Dec 2011 10:49:09 +0000 (30 05:49 -0500)
committerBastien Guerry <bzg@altern.org>
Wed, 11 Jan 2012 15:42:35 +0000 (11 16:42 +0100)
treedf82d7bbcb6b96595189852ee396854cf257426b
parentc41a6f5a333441ba68029c6f8792c9a9938fc57c
Honour existing restrictions when visiting tasks from the agenda

* lisp/org-agenda.el (org-agenda-switch-to): Widen org buffer only if point is
  outside the current restriction

Widen org buffer when visiting from agenda only if point is outside
current restriction.

Visiting a task with RET or TAB in the agenda should not affect the
org-mode buffer restriction unless the target task is not currently
visible due to the restriction.
lisp/org-agenda.el