From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: How to define TODOs within continuous text the best way? Date: Mon, 30 Mar 2009 13:47:09 +0200 Message-ID: <51053970-C604-4B96-B3D5-B9F79BD0472C@gmail.com> References: <49CE32EC.5060508@gmx.de> Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LoFxW-0001EZ-Au for emacs-orgmode@gnu.org; Mon, 30 Mar 2009 07:47:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LoFxR-00018P-88 for emacs-orgmode@gnu.org; Mon, 30 Mar 2009 07:47:17 -0400 Received: from [199.232.76.173] (port=40855 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LoFxR-00018M-2b for emacs-orgmode@gnu.org; Mon, 30 Mar 2009 07:47:13 -0400 Received: from mail-ew0-f160.google.com ([209.85.219.160]:47084) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LoFxQ-0003m7-Gj for emacs-orgmode@gnu.org; Mon, 30 Mar 2009 07:47:12 -0400 Received: by ewy4 with SMTP id 4so2111685ewy.42 for ; Mon, 30 Mar 2009 04:47:11 -0700 (PDT) In-Reply-To: <49CE32EC.5060508@gmx.de> 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: Karl Maihofer , Sebastian Rose Cc: Org Mode List On Mar 28, 2009, at 3:23 PM, Karl Maihofer wrote: > > I'd like to define a TODO like in the example below. When there is a > task somewhere in my text (I want to look something up etc.) I want to > define this task at the relevant position in my text. So I can lookup > all TODOs using the agenda-view and jump directly to the position in > my > text. > > The problem is that a TODO is always a new heading and so it is > exported > in my html(latex)-version as a heading. Sometimes, miracles do happen. The question about non-outline tasks is, really, a FAQ. We have been over this question again and again, though not recently. Each time this question came up I thought it over again, each time with the same result: that this is not possible in a reasonable clean way in the framework of Org's hierarchical document structure. The ideas that were contemplated usually were things like adding a new syntax which is "only" for task management treated as a headline, but not otherwise. I remember proposals like #*** TODO my task or finding a way to add metadata it plain list items, or many other similar ideas. The trouble is, task management is much of Org, so new syntax would be a lot of work. It would destroy he cleanness of much of Org. So always the answer was it cannot be done. That is not to say that I do not appreciate the wish for such a structure. In an outline/list driven setting, one can always re-arrange things to make tasks a separate section. However, when writing a book or extensive notes, the text becomes dominant over the density of outline nodes, and then getting a task into the right place becomes an issue. This new thread, first greeted with a sigh on my side, somehow has changed the perception by focussing on *export* handling of nodes. And it is now clear to me that, in fact, there is a reasonable clean pass to "inline" tasks: Fool the user, not Org! We will make them just normal outline nodes with stars, metadata and all the rest. Full citizens. But then we treat them specially in just two situations: 1. For visibility cycling: We disqualify these tasks from being recognized during visibility cycling. Simply by setting a limit for the outline depth to be seen by cycling, treating any deeper levels as normal text. So if the parent opens, all these "disqualified" nodes are treated as text and open as well. 2. During export: We treat the node and its meta data as special and export it as some inline construct, and we do this in the export *preprocessor* already, so that the backends never know there was an outline node at all. This fixes any issues with section numbering, text and list continuation etc. 3. As icing on the cake we introduce special fontification which make inline tasks look deeply indented. I have put these features into a new add-on, org-inlinetask.el. Just (require 'org-inlinetask) should turn it on for you, and any headline with a level 15 or deeper (30 if you use odd levels only) will then be subject to the special treatment. I just pushed this file into the git repository. Read the file commentary for explanations and try it out - I think the mechanism work surprisingly well. I simply cannot believe that after all those years, we might be able to close this task. - Carsten > I would prefer to format a TODO > as a text box or at least to exclude it from the html(latex)-export so > that it is only visible in org-mode - not in the exported version. But > when I exclude the TODO so that it isn't exported anymore, not only > the > TODO itself but also the text below the TODO isn't exported until > there > is a new heading - because the TODO itself is a heading, too. > > I know that this is because Org-Mode is an outliner-mode, TODOs always > have to be defined with a beginning "*". But is there any > possibility to > solve the problem? How do you define TODOs within the text when you > use > Org-Mode as an authoring tool? > > Perhaps it is possible to define TODOs as a very deep-level heading, > that isn't needed, like "********** TODO text" and change the export > function that this level isn't exported as a heading but as a > "div"-Container? Or every heading that contains "TODO" is not exported > as a heading but as a div-container? > > What is the best way to handle TODOs within continuous text? > > Kind regards, > Karl > > ----------------------------------------------------------------------- > * Heading 1 > > Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam > nonumy > eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed > diam > voluptua. At vero eos et accusam et justo duo dolores et ea rebum. > Stet > clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor > sit > amet. > > * TODO Check again (or ********** TODO text?) > > This paragraph still belongs to heading 1. Lorem ipsum dolor sit amet, > consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut > labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos > et > accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, > no > sea takimata sanctus est Lorem ipsum dolor sit amet. > > * Heading 2 > > Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam > nonumy > eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed > diam > voluptua. At vero eos et accusam et justo duo dolores et ea rebum. > Stet > clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor > sit > amet. > > ----------------------------------------------------------------------- > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode