all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Whitespace and outline structure...
@ 2007-12-11 11:47 Daniel Pittman
  2007-12-11 13:39 ` Bastien
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Pittman @ 2007-12-11 11:47 UTC (permalink / raw)
  To: emacs-orgmode

G'day.

I have found org mode incredibly good and useful so far, to my surprise,
as I usually find outlining tools in Emacs very frustrating.  This is a
really pleasant change -- and great, since it fills a gap in my task and
project management requirements.

I do have one gripe, though, that I hope someone can suggest something
to help with; the manual and google have not given me much help.


I like to lay out my large todo list nicely; visible whitespace between
sections make their relationships much clearer to me at a glance, and
the overall structure much easier to read.

This works fine with org-mode in most cases: if I put a line between
items it is swallowed by the folding, but if I put multiple lines then
it remains as a single line of visible white-space.


The problem comes when I restructure the file and when I add items
through the `remember' package: whitespace adds up, or is moved, and
generally doesn't just "do what I mean."


There are two specific problems:

I put multiple blank lines before a top level heading to get visible
whitespace, in this sort of structure:

* Some Stuff
** A first item.
** Blah Blah


* Other Stuff -- with a line even when 'Some Stuff' is folded.
** Another Item.


If I was then to move '** Blah Blah' under the 'Other Stuff' heading
using the built-in structure management tools those extra blank lines
move with it.

This means that 'Other Stuff' is now joined up, visually, to 'A First
Item', which I didn't want, and that there is visible whitespace between
'Blah Blah' and 'Another Item' as well...


The second is that the insert command from `remember' tends to end up
building up blank lines between my 'Tasks' heading (where it inserts the
items) and the new items themselves.

This one is less of an issue, and something that I am going to work on
understanding better before I complain more; at the moment I suspect my
templates or use of `remember' may be the root cause.

Regards,
        Daniel
-- 
Daniel Pittman <daniel@cybersource.com.au>           Phone: 03 9428 6922
1/130-132 Stawell St, Richmond              Web: http://www.cyber.com.au
Cybersource: Australia's Leading Linux and Open Source Solutions Company

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

* Re: Whitespace and outline structure...
  2007-12-11 11:47 Whitespace and outline structure Daniel Pittman
@ 2007-12-11 13:39 ` Bastien
  2007-12-11 13:55   ` Phil Jackson
  0 siblings, 1 reply; 9+ messages in thread
From: Bastien @ 2007-12-11 13:39 UTC (permalink / raw)
  To: Daniel Pittman; +Cc: emacs-orgmode

Hi Daniel,

Daniel Pittman <daniel@rimspace.net> writes:

> There are two specific problems:
>
> I put multiple blank lines before a top level heading to get visible
> whitespace, in this sort of structure:
>
> * Some Stuff
> ** A first item.
> ** Blah Blah
>
>
> * Other Stuff -- with a line even when 'Some Stuff' is folded.
> ** Another Item.
>
>
> If I was then to move '** Blah Blah' under the 'Other Stuff' heading
> using the built-in structure management tools those extra blank lines
> move with it.
>
> This means that 'Other Stuff' is now joined up, visually, to 'A First
> Item', which I didn't want, and that there is visible whitespace between
> 'Blah Blah' and 'Another Item' as well...

The problem is that there is no way to tell that the two blank lines
after "** Blah blah" are part of "** Blah blah" or part of "* Some
stuff".  If they are part of "** Blah blah" they should move with it.
If they are part of "* Some stuff" then they should move with this
first-level tree, not with the second-level tree.

But instead of trying to decide to what subtree blank lines belong, we
should instead let the user define how many blank lines he wants to
allow after headings / list items.

(setq org-allow-blank-lines
         '((org-level-1 . 2)
           (org-level-2 . 1)
           (list-item   . 1))

This way we would have:

  M-x org-delete-trailing-blank-lines 

which would delete blank lines that are not allowed.

And possibly a way to decide whether trailing lines at the end of a
subtree should move with the subtree or not. 

What do you think?

-- 
Bastien

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

* Re: Whitespace and outline structure...
  2007-12-11 13:39 ` Bastien
@ 2007-12-11 13:55   ` Phil Jackson
  2007-12-11 14:36     ` Bastien
  0 siblings, 1 reply; 9+ messages in thread
From: Phil Jackson @ 2007-12-11 13:55 UTC (permalink / raw)
  To: Bastien; +Cc: Daniel Pittman, emacs-orgmode

Bastien <bzg@altern.org> writes:

>> I put multiple blank lines before a top level heading to get visible
>> whitespace, in this sort of structure:
>>
>> * Some Stuff
>> ** A first item.
>> ** Blah Blah

[...]

>> If I was then to move '** Blah Blah' under the 'Other Stuff' heading
>> using the built-in structure management tools those extra blank lines
>> move with it.

[...]

> The problem is that there is no way to tell that the two blank lines
> after "** Blah blah" are part of "** Blah blah" or part of "* Some
> stuff".

[...]

> What do you think?

I suffer this problem too. I can't think of a situation where blank
lines would be useful attached to an item.... but maybe I'm doing it
wrong.

Cheers,
Phil

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

* Re: Whitespace and outline structure...
  2007-12-11 13:55   ` Phil Jackson
@ 2007-12-11 14:36     ` Bastien
  2007-12-12 12:17       ` Daniel Pittman
  0 siblings, 1 reply; 9+ messages in thread
From: Bastien @ 2007-12-11 14:36 UTC (permalink / raw)
  To: emacs-orgmode

Phil Jackson <phil@shellarchive.co.uk> writes:

>> The problem is that there is no way to tell that the two blank lines
>> after "** Blah blah" are part of "** Blah blah" or part of "* Some
>> stuff".
>
> [...]
>
>> What do you think?
>
> I suffer this problem too. I can't think of a situation where blank
> lines would be useful attached to an item.... but maybe I'm doing it
> wrong.

No, I feel the same.  I think I don't usually need more one or two blank
lines.  Hence my proposal about org-delete-trailing-blank-lines based on
allowed values...

-- 
Bastien

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

* Re: Whitespace and outline structure...
  2007-12-11 14:36     ` Bastien
@ 2007-12-12 12:17       ` Daniel Pittman
  2007-12-12 15:17         ` Bastien
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Pittman @ 2007-12-12 12:17 UTC (permalink / raw)
  To: emacs-orgmode

Bastien <bzg@altern.org> writes:
> Phil Jackson <phil@shellarchive.co.uk> writes:
>
>>> The problem is that there is no way to tell that the two blank lines
>>> after "** Blah blah" are part of "** Blah blah" or part of "* Some
>>> stuff".
>>
>> [...]
>>
>>> What do you think?
>>
>> I suffer this problem too. I can't think of a situation where blank
>> lines would be useful attached to an item.... but maybe I'm doing it
>> wrong.
>
> No, I feel the same.  I think I don't usually need more one or two
> blank lines.  Hence my proposal about org-delete-trailing-blank-lines
> based on allowed values...

Something like that might be good -- for my use a single blank line is
part of the entry, the second one is not, ever.  So, for me, a simple
rule.

Also, to me, it seems that since org-mode explicitly takes multiple
blank lines into account in the folding process -- it displays
whitespace -- it considers them to be "special" as well.


That said, I have my answer: there is no easy way to make this work the
way I think about outlines and whitespace, so I should dig in the
code.[1]

Regards,
        Daniel

Footnotes: 
[1]  Well, hope that one of the developers takes pity on me for the next
     week, anyway, and then dig in the code when I have time again.

-- 
Daniel Pittman <daniel@cybersource.com.au>           Phone: 03 9428 6922
1/130-132 Stawell St, Richmond              Web: http://www.cyber.com.au
Cybersource: Australia's Leading Linux and Open Source Solutions Company

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

* Re: Re: Whitespace and outline structure...
  2007-12-12 12:17       ` Daniel Pittman
@ 2007-12-12 15:17         ` Bastien
  2007-12-12 16:24           ` Carsten Dominik
  0 siblings, 1 reply; 9+ messages in thread
From: Bastien @ 2007-12-12 15:17 UTC (permalink / raw)
  To: emacs-orgmode

Daniel Pittman <daniel@rimspace.net> writes:

> Bastien <bzg@altern.org> writes:
>> Phil Jackson <phil@shellarchive.co.uk> writes:
>>
>>>> The problem is that there is no way to tell that the two blank lines
>>>> after "** Blah blah" are part of "** Blah blah" or part of "* Some
>>>> stuff".
>>>
>>> [...]
>>>
>>>> What do you think?
>>>
>>> I suffer this problem too. I can't think of a situation where blank
>>> lines would be useful attached to an item.... but maybe I'm doing it
>>> wrong.
>>
>> No, I feel the same.  I think I don't usually need more one or two
>> blank lines.  Hence my proposal about org-delete-trailing-blank-lines
>> based on allowed values...
>
> Something like that might be good -- for my use a single blank line is
> part of the entry, the second one is not, ever.  So, for me, a simple
> rule.

Yes.  Considering an option like:

(setq org-allow-blank-lines   ;; or org-allow-max-blank-lines
         '((org-level-1 . 2)
           (org-level-2 . 1)
           (list-item   . 1)    
           (t . delete)) 

The rule for handling trailing blank lines would be as follow : when
moving/cutting a subtree of level N, only allow a definite number of
trailing blank lines (L_n).  If there is more than L_n lines, try to
decide whether these additional blank lines are part of the subtree
above... etc.  If blank lines cannot be attached to a subtree, either
delete them, or reject them at the end of the subtree.

Not sure how this could be implemented, but I just wanted to clarify
what I had in mind.

-- 
Bastien

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

* Re: Re: Whitespace and outline structure...
  2007-12-12 15:17         ` Bastien
@ 2007-12-12 16:24           ` Carsten Dominik
  2007-12-12 17:07             ` Eric Schulte
  2007-12-12 17:36             ` Eric Schulte
  0 siblings, 2 replies; 9+ messages in thread
From: Carsten Dominik @ 2007-12-12 16:24 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

On Dec 12, 2007 4:17 PM, Bastien <bzg@altern.org> wrote:
> Yes.  Considering an option like:
>
> (setq org-allow-blank-lines   ;; or org-allow-max-blank-lines
>          '((org-level-1 . 2)
>            (org-level-2 . 1)
>            (list-item   . 1)
>            (t . delete))
>
> The rule for handling trailing blank lines would be as follow : when
> moving/cutting a subtree of level N, only allow a definite number of
> trailing blank lines (L_n).  If there is more than L_n lines, try to
> decide whether these additional blank lines are part of the subtree
> above... etc.  If blank lines cannot be attached to a subtree, either
> delete them, or reject them at the end of the subtree.
>
> Not sure how this could be implemented, but I just wanted to clarify
> what I had in mind.

I am not sure an option is the right thing here, because it will continue to
remain difficult to figure out where to put the boundaries.

The best might be to look *before* a heading and see how many empty
lines there are, and then include up to that many lines below the subtree.
It seems to me that this might get quite close to the right behavior,
but I am sure there will be cases where also this idea will not work
correctly.

- Carsten

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

* Re: Re: Whitespace and outline structure...
  2007-12-12 16:24           ` Carsten Dominik
@ 2007-12-12 17:07             ` Eric Schulte
  2007-12-12 17:36             ` Eric Schulte
  1 sibling, 0 replies; 9+ messages in thread
From: Eric Schulte @ 2007-12-12 17:07 UTC (permalink / raw)
  To: emacs-orgmode

I'm not sure if this is the case for others as well, but I care more
about the number of lines of whitespace preceding headings in folded
org files. I would find an option like...

(setq org-preceding-blank-lines
      '((org-level-1 . 2)
	(org-level-2 . 1)
	(list-item   . 1)
	(t . delete)))

to be more helpful. Then when folding a subtree Orgmode would check
the next header following the subtree, and count back.

Just throwing this out there,
Thanks,
Eric

On Wednesday, December 12, at 17:24, Carsten Dominik wrote:
 > On Dec 12, 2007 4:17 PM, Bastien <bzg@altern.org> wrote:
 > > Yes.  Considering an option like:
 > >
 > > (setq org-allow-blank-lines   ;; or org-allow-max-blank-lines
 > >          '((org-level-1 . 2)
 > >            (org-level-2 . 1)
 > >            (list-item   . 1)
 > >            (t . delete))
 > >
 > > The rule for handling trailing blank lines would be as follow : when
 > > moving/cutting a subtree of level N, only allow a definite number of
 > > trailing blank lines (L_n).  If there is more than L_n lines, try to
 > > decide whether these additional blank lines are part of the subtree
 > > above... etc.  If blank lines cannot be attached to a subtree, either
 > > delete them, or reject them at the end of the subtree.
 > >
 > > Not sure how this could be implemented, but I just wanted to clarify
 > > what I had in mind.
 > 
 > I am not sure an option is the right thing here, because it will continue to
 > remain difficult to figure out where to put the boundaries.
 > 
 > The best might be to look *before* a heading and see how many empty
 > lines there are, and then include up to that many lines below the subtree.
 > It seems to me that this might get quite close to the right behavior,
 > but I am sure there will be cases where also this idea will not work
 > correctly.
 > 
 > - Carsten
 > 
 > 
 > _______________________________________________
 > 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

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

* Re: Re: Whitespace and outline structure...
  2007-12-12 16:24           ` Carsten Dominik
  2007-12-12 17:07             ` Eric Schulte
@ 2007-12-12 17:36             ` Eric Schulte
  1 sibling, 0 replies; 9+ messages in thread
From: Eric Schulte @ 2007-12-12 17:36 UTC (permalink / raw)
  To: emacs-orgmode

I'm not sure if this is the case for others as well, but I care more
about the number of lines of whitespace preceding headings in folded
org files. I would find an option like...

(setq org-preceding-blank-lines
      '((org-level-1 . 2)
	(org-level-2 . 1)
	(list-item   . 1)
	(t . delete)))

to be more helpful. Then when folding a subtree Orgmode would check
the next header following the subtree, and count back.

Just throwing this out there,
Thanks,
Eric

On Wednesday, December 12, at 17:24, Carsten Dominik wrote:
 > On Dec 12, 2007 4:17 PM, Bastien <bzg@altern.org> wrote:
 > > Yes.  Considering an option like:
 > >
 > > (setq org-allow-blank-lines   ;; or org-allow-max-blank-lines
 > >          '((org-level-1 . 2)
 > >            (org-level-2 . 1)
 > >            (list-item   . 1)
 > >            (t . delete))
 > >
 > > The rule for handling trailing blank lines would be as follow : when
 > > moving/cutting a subtree of level N, only allow a definite number of
 > > trailing blank lines (L_n).  If there is more than L_n lines, try to
 > > decide whether these additional blank lines are part of the subtree
 > > above... etc.  If blank lines cannot be attached to a subtree, either
 > > delete them, or reject them at the end of the subtree.
 > >
 > > Not sure how this could be implemented, but I just wanted to clarify
 > > what I had in mind.
 > 
 > I am not sure an option is the right thing here, because it will continue to
 > remain difficult to figure out where to put the boundaries.
 > 
 > The best might be to look *before* a heading and see how many empty
 > lines there are, and then include up to that many lines below the subtree.
 > It seems to me that this might get quite close to the right behavior,
 > but I am sure there will be cases where also this idea will not work
 > correctly.
 > 
 > - Carsten
 > 
 > 
 > _______________________________________________
 > 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

-- 
schulte

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

end of thread, other threads:[~2007-12-12 17:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-11 11:47 Whitespace and outline structure Daniel Pittman
2007-12-11 13:39 ` Bastien
2007-12-11 13:55   ` Phil Jackson
2007-12-11 14:36     ` Bastien
2007-12-12 12:17       ` Daniel Pittman
2007-12-12 15:17         ` Bastien
2007-12-12 16:24           ` Carsten Dominik
2007-12-12 17:07             ` Eric Schulte
2007-12-12 17:36             ` Eric Schulte

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.