Re: [Orgmode] Text Formatting?

2006-10-20 Thread Xiao-Yong Jin
Ed Hirgelt [EMAIL PROTECTED] writes:

 On 10/19/06, Xiao-Yong Jin [EMAIL PROTECTED] wrote:

 Hi, how do you usually format the text body?  I found it frustrating
 if I just want to paste something from somewhere else.

 * List
   1. list
   2. list
   3. list

 indent-region doesn't seem to work very well except the list was
 format as the way that there's no space before the bullet

 You probably want to look at filladapt.  This provides ways to fill lists of
 various types.

Org-Mode is already doing this, I guess.  When you press M-RET, it
inserts the prefix automatically.  I just want to find a way that is
similar to M-C-\ (indent-region) so that I can paste a block of text
and reformat it easily.

 

 * QUOTE Carsten said
   : blah blah blah...
   : and blah blah blah...

 Something like this you can also handle by setting the prefix string (^X . is
 bound to set-fill-prefix)

 C-x . runs `set-fill-prefix'

 `set-fill-prefix' is an interactive compiled Lisp function
   -- loaded from /usr/src/xemacs-21.4.19/.build/lisp/fill.elc
 (set-fill-prefix)

 Documentation:
 Set the fill prefix to the current line up to point.
 Filling expects lines to start with the fill prefix and
 reinserts the fill prefix in each resulting line.

This is good.  Make it much easier to write some thing.  However, it
doesn't help for reformatting.

 

 --
 Ed Hirgelt  

 Discovery consists of seeing what everybody has seen
 and thinking what nobody has thought.

 ___
 Emacs-orgmode mailing list
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode

-- 
   ,,,
  (o o)
---ooO-(_)-Ooo---


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Another GTD question.

2006-10-20 Thread Carsten Dominik

Hi Piotr,

thanks for sticking my head into that dark hole again :-)

Yes, the issues of headlines and plain list items have been bugging me 
for a long time, and am I glad to share my thoughts here - if only to 
grab this chance to organize them again.  Maybe some kind of solution 
will present itself eventually.


First of all, there is one subtle but critical structural difference
between the two concepts of outline headlines and items.

A headline starts a new subsection in a tree.  The body below the 
headline

only ends at the next headline.  This is, in fact sometimes unfortunate,
because you can never go back to the level of text where you were.
For example:

   * level one
 some text
   ** item1
   ** item2
 And now I would like to continue with the thought started with 
some text

 but I cannot!

Items allow you to do just that

   * level one
 some text
 - item1
 - item2
 And here we continue after some text

I see this problem as the single most frustrating issue.  When I want to
record a TODO in the middle of some longish text, I - cannot reaaly
do so.  Therefore, allowing plain list items to become TODO entries is
something I *really* want.

I am not sure if *anyone* has actually noticed, but org-mode does not 
provide proper outlining support for plain list items.  If you set 
org-cycle-include-plain-lists, org-mode is cheating.  Items are 
temporarily (for the duration of an org-cycle command) treated as 
outline headings.  So in the example above, And here we continue... 
is actually treated as part of item2, betraying the true structure.


So one thing to be fixed is definitely this: proper cycle functionality 
for plain lists.  The reason why this is more difficult is that to find 
the end of an item, you cannot simply use a regular expression search 
for the next heading, you have to walk down line by line to find the 
next line with the proper indentation.  That is why the handling code 
for promotion etc is separate.


If you are looking for common handling code for things like promotion 
and demotion, you can go one level up and use function like 
org-shiftmetaleft, which do the proper dispatching.


About checklists and TODO items, I think that it makes sense to have 
both, one lightweight, and a more heavy one for use in agenda buffers.


But what would be nice is to have the possibility to make a plain list 
item a TODO entry.  I'd really like this.  Here are the problems with 
it:


- A lot of the code handling TODOs was written early when there were
  no plain lists.  That code often explicitly assumes that TODO is 
preceded
  by the beginning of a line and a few stars.  Several regular 
expressions
  that are used all over the place implicitly make this assumption.  
This is
  just bad programming, but there you are, org-mode has been growing 
instead of

  having been designed from top to bottom.

- To make TODO in plain list items fully useful, I'd have to be able to
  apply tags to them.  However, other than headlines, the first line of 
a

  plain list item does not have a defined end, it can be filled and
  wrapped - so where would a good place be, where should TAGS be stored?
  Any good proposals?

- Another issue would be:  If I have a deadline or a scheduled item,
  should it refer to plain list item of which it is a part, or should
  it (as it does now) always refer to the nearest headline?  I guess
  the former would make more sense, greately increasing the complexity
  when scanning files for the agenda.  This would slow down creation
  of the agenda - maybe a price we could pay, I don't know.

The most important obstacle is that I would need something like 3
consecutive days with nothing else on my mind to make the changes
without introducing too many new bugs.  These I currently don't have,
they are very difficult to find.

Anyway, if there is ever a version 5 of org-mode, it will have these 
features

and require intensive testing. :-)




1. As opposed to headings, plain list items can consists of more than
  one line.  On the other hand, they cannot be assigned tags or
  marked TODO.  So, sometimes, one has to use one or the other.  This
  is especially problematic, if you would like a TODO item below a
  multi-line plain list item.  It would be great if the features of
  headings and plain lists could be, at least to some extent,
  combined.

2. Code duplication.  At the moment, AFAIK, you need to write separate
  code for headings and plain lists.  Also, some features exist for
  both but in different forms, for example, TODO/DONE for headings is
  essentially the same as [ ]/[X] for plain lists.  I don't mind
  having different representation for the same concept as long as
  their share the same handling code.

However, I feel that any attempt at integrating integrating headings
and plain lists would require a significant rewrite.  Carsten, could
you please comment on the main difficulties of such integration?

Thanks,
Piotr