From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Suggestion: Jump points Date: Mon, 3 Sep 2007 18:21:38 +0200 Message-ID: References: <468E11C4.50604@calicojack.co.uk> <6da9122d5b79844f2856186565289598@science.uva.nl> <468E1D59.6030006@calicojack.co.uk> <468E6DAF.1040100@calicojack.co.uk> <4694C483.2060708@calicojack.co.uk> Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ISFDD-0003rn-LI for emacs-orgmode@gnu.org; Mon, 03 Sep 2007 12:55:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ISFDC-0003rD-He for emacs-orgmode@gnu.org; Mon, 03 Sep 2007 12:55:42 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ISFDC-0003r5-9e for emacs-orgmode@gnu.org; Mon, 03 Sep 2007 12:55:42 -0400 Received: from korteweg.uva.nl ([146.50.98.70]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ISFDB-00038d-R7 for emacs-orgmode@gnu.org; Mon, 03 Sep 2007 12:55:42 -0400 In-Reply-To: <4694C483.2060708@calicojack.co.uk> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rick Moynihan Cc: org-mode Hi Rick, I have not found a good and general way to introduce the feature you are asking for. In 5.08 there will be a new hook `org-agenda-after-show-hook'. This hook will be run after the agenda has exposed an entry, either by an interactive command like TAB or RET, or by follow mode. I guess you could try to get a function in there that will search for your marker, something like (untested) (defun find-ricks-marker () "FIXME" (let ((pos (point)) beg end) (org-back-to-heading t) (setq beg (point)) (org-end-of-subtree t) (setq end (point)) (goto-char beg) (if (re-search-forward "\\+\\+" end t) (goto-char (match-beginning 0)) (goto-char pos)))) Hope this helps. - Carsten On Jul 11, 2007, at 13:52, Rick Moynihan wrote: > Carsten Dominik wrote: >> On Jul 6, 2007, at 18:28, Rick Moynihan wrote: >>> Agreed. My gut feeling is that they fulfill largely different >>> purposes. The problem is that I tend to make a decision to >>> structure something with lists & checkboxes, and later on discover I >>> want an item in the list to appear inside the agenda. >> In such a case I usually make the headline above the checkbox >> list a TODO and have that show up in the agenda. From there >> it is only one or two TAB presses to the checkboxes. >> - Carsten > > I too have tried this, but it means if you start editing your lists > (and if they're numbered) the list numbers get reset which can be > annoying. > > I sometimes have quite long lists within outlines, and I guess the > problem is that I know what project I want to work on yet I want to > quickly find the item within it which I'd previously identified as > tackling next. Sometimes when returning to such a list it takes me a > while to figure out which task I was supposed to tackling next. > > So here's a suggestion. Why not support jump points (or jump lines), > which would be essentially be a syntactic marker that would tell > org-mode to jump to a specific line within an outline when visiting > from the agenda e.g. via follow mode. > > * My main project outline. > blah blah blah... > ... > > - [ ] do something > - [ ] do this ++ > - [ ] do something else > ... > > I'm not too bothered about the syntax, but here the ++ indicates the > line which the point should be placed on within that outline. > > Some simple interactive commands could be written to reset the jump > point to a new line within that outline. This would simply remove any > existing jump-point and insert a new one at the point. Naturally this > command might want to alert you about jump-point removal, and if there > were multiple points (accidentally) defined within a single outline it > might warn you of this, perhaps moving you into an interactive mode to > clean them up and set the point to where you wanted. > > Is this something people might find useful? I personally find I spend > a lot of time trying to re-acquire my previous context within a > particular task, something like this might help. > > Actually, after thinking about this; I realise that Emacs has > bookmarks (a feature I've not yet put to use) perhaps a better idea > would be to integrate these with org-mode and visiting the file via > the agenda? > > What do people think? > > R. > > -- Carsten Dominik Sterrenkundig Instituut "Anton Pannekoek" Universiteit van Amsterdam Kruislaan 403 NL-1098SJ Amsterdam phone: +31 20 525 7477