emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Dave Abrahams <dave@boostpro.com>
To: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <m2zkhtpwmr.fsf@pluto.luannocracy.com> (raw)
In-Reply-To: <m239flsui9.fsf@pluto.luannocracy.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: patch to implement the feature request --]
[-- Type: text/x-patch, Size: 1929 bytes --]

From 81ab272ab709c45e898831e5e019e02cfc6617fe Mon Sep 17 00:00:00 2001
From: Dave Abrahams <dave@boostpro.com>
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


[-- Attachment #2: Type: text/plain, Size: 63 bytes --]



-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

  reply	other threads:[~2011-09-24 19:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-24 17:46 Bug: [feature request] org-indirect-buffer-follow [7.7 (release_7.7.350.g9a179e)] Dave Abrahams
2011-09-24 19:29 ` Dave Abrahams [this message]
2011-10-08  7:03   ` [patch] (was: [feature request] org-indirect-buffer-follow [7.7 (release_7.7.350.g9a179e)]) Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2zkhtpwmr.fsf@pluto.luannocracy.com \
    --to=dave@boostpro.com \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: [patch] (was: [feature request] org-indirect-buffer-follow [7.7 (release_7.7.350.g9a179e)])' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).