emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: [feature request] org-indirect-buffer-follow [7.7 (release_7.7.350.g9a179e)]
@ 2011-09-24 17:46 Dave Abrahams
  2011-09-24 19:29 ` [patch] (was: [feature request] org-indirect-buffer-follow [7.7 (release_7.7.350.g9a179e)]) Dave Abrahams
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Abrahams @ 2011-09-24 17:46 UTC (permalink / raw)
  To: emacs-orgmode



Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.
------------------------------------------------------------------------

In org-agenda-follow-mode, it scrolls me around a big, messy Org file
that has way more information than I'm actually interested in.  What I
really want is the effect of hitting `SPC' automatically whenever I
visit an agenda item.

Emacs  : GNU Emacs 23.3.1 (x86_64-apple-darwin10.8.0, Carbon Version 1.6.0 AppKit 1038.36)
 of 2011-09-12 on pluto.luannocracy.com
Package: Org-mode version 7.7 (release_7.7.350.g9a179e)
-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [patch] (was: [feature request] org-indirect-buffer-follow [7.7 (release_7.7.350.g9a179e)])
  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
  2011-10-08  7:03   ` Carsten Dominik
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Abrahams @ 2011-09-24 19:29 UTC (permalink / raw)
  To: emacs-orgmode

[-- 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] (was: [feature request] org-indirect-buffer-follow [7.7 (release_7.7.350.g9a179e)])
  2011-09-24 19:29 ` [patch] (was: [feature request] org-indirect-buffer-follow [7.7 (release_7.7.350.g9a179e)]) Dave Abrahams
@ 2011-10-08  7:03   ` Carsten Dominik
  0 siblings, 0 replies; 3+ messages in thread
From: Carsten Dominik @ 2011-10-08  7:03 UTC (permalink / raw)
  To: Dave Abrahams; +Cc: emacs-orgmode

Accepted.  THanks.

- Carsten

On 24.9.2011, at 21:29, Dave Abrahams wrote:

> 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
> 
> 
> 
> -- 
> Dave Abrahams
> BoostPro Computing
> http://www.boostpro.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-08  7:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [patch] (was: [feature request] org-indirect-buffer-follow [7.7 (release_7.7.350.g9a179e)]) Dave Abrahams
2011-10-08  7:03   ` Carsten Dominik

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).