From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Abrahams Subject: [patch] (was: [feature request] org-indirect-buffer-follow [7.7 (release_7.7.350.g9a179e)]) Date: Sat, 24 Sep 2011 15:29:16 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:43498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R7Xuo-0006Gn-9P for emacs-orgmode@gnu.org; Sat, 24 Sep 2011 15:29:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R7Xum-0005hw-US for emacs-orgmode@gnu.org; Sat, 24 Sep 2011 15:29:34 -0400 Received: from lo.gmane.org ([80.91.229.12]:55682) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R7Xum-0005hp-I3 for emacs-orgmode@gnu.org; Sat, 24 Sep 2011 15:29:32 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1R7Xul-0007a1-BT for emacs-orgmode@gnu.org; Sat, 24 Sep 2011 21:29:31 +0200 Received: from 207-172-223-249.c3-0.smr-ubr3.sbo-smr.ma.static.cable.rcn.com ([207.172.223.249]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 24 Sep 2011 21:29:31 +0200 Received: from dave by 207-172-223-249.c3-0.smr-ubr3.sbo-smr.ma.static.cable.rcn.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 24 Sep 2011 21:29:31 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Add-indirect-agenda-follow-mode.patch Content-Description: patch to implement the feature request >From 81ab272ab709c45e898831e5e019e02cfc6617fe Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Sat, 24 Sep 2011 15:21:53 -0400 Subject: [PATCH] Add indirect agenda follow mode By setting `org-agenda-follow-indirect' to a non-nil value, `org-agenda-follow-mode' will use an indirect buffer to display only the current item, rather than the whole agenda file in which it lives --- lisp/org-agenda.el | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index b1fa5f5..1b67153 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -872,6 +872,12 @@ Needs to be set before org.el is loaded." :group 'org-agenda-startup :type 'boolean) +(defcustom org-agenda-follow-indirect nil + "Non-nil means `org-agenda-follow-mode' displays only the +current item's tree, in an indirect buffer." + :group 'org-agenda + :type 'boolean) + (defcustom org-agenda-show-outline-path t "Non-nil means show outline path in echo area after line motion." :group 'org-agenda-startup @@ -6608,8 +6614,7 @@ so that the date SD will be in that range." (interactive) (setq org-agenda-follow-mode (not org-agenda-follow-mode)) (org-agenda-set-mode-name) - (if (and org-agenda-follow-mode (org-get-at-bol 'org-marker)) - (org-agenda-show)) + (org-agenda-do-context-action) (message "Follow mode is %s" (if org-agenda-follow-mode "on" "off"))) @@ -6771,7 +6776,9 @@ When called with a prefix argument, include all archive files as well." "Show outline path and, maybe, follow mode window." (let ((m (org-get-at-bol 'org-marker))) (if (and org-agenda-follow-mode m) - (org-agenda-show)) + (if org-agenda-follow-indirect + (org-agenda-tree-to-indirect-buffer) + (org-agenda-show))) (if (and m org-agenda-show-outline-path) (org-with-point-at m (org-display-outline-path t))))) -- 1.7.3.4 --=-=-= Content-Type: text/plain -- Dave Abrahams BoostPro Computing http://www.boostpro.com --=-=-=--