emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Feature request (org-empty-line-terminates-plain-lists)
@ 2009-03-23 21:28 Matthew Lundin
  2009-03-23 23:08 ` Matthew Lundin
  2009-03-25  6:49 ` Samuel Wales
  0 siblings, 2 replies; 8+ messages in thread
From: Matthew Lundin @ 2009-03-23 21:28 UTC (permalink / raw)
  To: Org Mode List

Hi Carsten,

If I may be so bold, I'd like to request an additional setting for
org-empty-line-terminates-plain-lists. Namely, I was wondering if it
would be possible to add an option whereby 2 empty lines would terminate
a plain list.

My rationale is as follows: I very much like to set
org-blank-before-new-entry to auto for plain lists. The extra line in
the org source increases legibility, and I can have single-spaced or
double-spaced lists depending on my mood. :)

But I also like the ability to determine where a plain list should end.
For instance, if I have a table that directly follows a list item, the
table is currently folded into the list in the exported html unless
org-empty-line-terminates-plain-lists is set to t. (But, of course, if I
set the latter variable to t, then any list containing a blank line is
not exported correctly.)

Right now org-blank-before-new-entry and
org-empty-line-terminates-plain-lists are mutually exclusive. By adding
the option of two lines terminating a plain list, would it perhaps be
possible to enjoy the functionality of both at the same time?

Thanks in advance for considering this. And feel free to tell me if this
is a ridiculously fussy request. :)

Matt

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

* Re: Feature request (org-empty-line-terminates-plain-lists)
  2009-03-23 21:28 Feature request (org-empty-line-terminates-plain-lists) Matthew Lundin
@ 2009-03-23 23:08 ` Matthew Lundin
  2009-03-24  6:15   ` Baoqiu Cui
  2009-03-25  6:49 ` Samuel Wales
  1 sibling, 1 reply; 8+ messages in thread
From: Matthew Lundin @ 2009-03-23 23:08 UTC (permalink / raw)
  To: Matthew Lundin; +Cc: Org Mode List

Carsten,

Matthew Lundin <mdl@imapmail.org> writes:

> If I may be so bold, I'd like to request an additional setting for
> org-empty-line-terminates-plain-lists. Namely, I was wondering if it
> would be possible to add an option whereby 2 empty lines would terminate
> a plain list.

Please disregard this request. I think I did not identify the problem
correctly. The problem, instead, lies in the html export.

When a plain list is followed by a paragraph, the list is closed in the
the export before the paragraph.

--8<---------------cut here---------------start------------->8---
- Item One

- Item Two

Here is the paragraph.
--8<---------------cut here---------------end--------------->8---

results in....

,----
| <ul>
| <li>
| Item One
| 
| </li>
| <li>
| Item Two
| 
| </li>
| </ul>
| 
| <p>Here is the paragraph.
| </p>
`----

But when a table follows the list, as in...

--8<---------------cut here---------------start------------->8---
- Item One

- Item Two

| Table cell | Another table cell |
--8<---------------cut here---------------end--------------->8---

...the table is enclosed in the list in the html:

,----
| <ul>
| <li>
| Item One
| 
| </li>
| <li>
| Item Two
| 
| <table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
| <caption></caption>
| <col align="left"></col><col align="left"></col>
| <tbody>
| <tr><td>Table cell</td><td>Another table cell</td></tr>
| </tbody>
| </table>
| 
| </li>
| </ul>
`----

In the latex output, by contrast, the list is closed before the table
appears.

,----
| \begin{itemize}
| \item Item One
| \item Item Two
| \end{itemize}
| 
| \begin{center}
| \begin{tabular}{ll}
|  Table cell  &  Another table cell  \\
| \end{tabular}
| \end{center}
`----

Would it be possible to make the html output consistent with the latex
output, so that the list is closed before the table?

Thanks, and sorry for making you read that earlier email about a
non-problem. :)

Matt

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

* Re: Feature request (org-empty-line-terminates-plain-lists)
  2009-03-23 23:08 ` Matthew Lundin
@ 2009-03-24  6:15   ` Baoqiu Cui
  2009-03-24  8:48     ` Carsten Dominik
  0 siblings, 1 reply; 8+ messages in thread
From: Baoqiu Cui @ 2009-03-24  6:15 UTC (permalink / raw)
  To: emacs-orgmode

Matthew Lundin <mdl@imapmail.org> writes:

> Carsten,
>
> Matthew Lundin <mdl@imapmail.org> writes:
>
>> If I may be so bold, I'd like to request an additional setting for
>> org-empty-line-terminates-plain-lists. Namely, I was wondering if it
>> would be possible to add an option whereby 2 empty lines would terminate
>> a plain list.
>
> Please disregard this request. I think I did not identify the problem
> correctly. The problem, instead, lies in the html export.
>
> When a plain list is followed by a paragraph, the list is closed in the
> the export before the paragraph.
>
> --8<---------------cut here---------------start------------->8---
> - Item One
>
> - Item Two
>
> Here is the paragraph.
> --8<---------------cut here---------------end--------------->8---
>
> results in....
>
> ,----
> | <ul>
> | <li>
> | Item One
> | 
> | </li>
> | <li>
> | Item Two
> | 
> | </li>
> | </ul>
> | 
> | <p>Here is the paragraph.
> | </p>
> `----
>
> But when a table follows the list, as in...
>
> --8<---------------cut here---------------start------------->8---
> - Item One
>
> - Item Two
>
> | Table cell | Another table cell |
> --8<---------------cut here---------------end--------------->8---

In my opinion, whether this table should terminate the list or be
included in "Item Two" has to be decided by the indentation level of the
table.  In this case, since there is no indentation at all for the
table, it should terminate the list.  The table would be considered part
of "Item Two" if it is written in the following way

------------------------------------------------------------------------
- Item One

- Item Two

  | Table cell | Another table cell |
------------------------------------------------------------------------

I ran into this little ambiguity problem when I was testing the DocBook
exporter, but have not got chance to resolve this problem.  Similar
problem also exists for literal examples (and maybe other types of
blocks):


------------------------------------------------------------------------
- Item One

- Item Two

  : Some example from a text file
  : Another line in the example
------------------------------------------------------------------------

In this case, the literal example lines should be considered part of
"Item Two".  If the two spaces before ':' do not exist, this literal
example will terminate the list.

Is this reasonable?

Baoqiu

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

* Re: Re: Feature request (org-empty-line-terminates-plain-lists)
  2009-03-24  6:15   ` Baoqiu Cui
@ 2009-03-24  8:48     ` Carsten Dominik
  2009-03-24 23:13       ` Matthew Lundin
  2009-03-25  6:37       ` Baoqiu Cui
  0 siblings, 2 replies; 8+ messages in thread
From: Carsten Dominik @ 2009-03-24  8:48 UTC (permalink / raw)
  To: Baoqiu Cui, Matthew Lundin; +Cc: emacs-orgmode Mailinglist

Hi Matt, Baoqiu,

this is a difficult issue.

Indentation is what governs the end of lists.  However, this concept
conflicts with the face that some constructs in Org cannot be indented
at all, in particular things like #+begin_example ena the like.

You are both right that tables and ": ..." examples could be written
with correct indentation, but this is only a partial solution.

Currently, the HTML exporter handles all these constructs as
"indentation irrelevant" and puts them into the list structure.
Given the fact that some special constructs cannot be indented,
this is the only way to have a source code example or a blockquote
as part of a list item.

As you noted correctly, LaTeX export does treat indentation of examples
and tables significantly and terminates list.  Clearly inconsistent.

Possible solutions:

1. Allow #+begin_example and friends to be indented and remove the same
    amount of whitespace from all example lines as the #+begin line has.
    This is possible, but would require a lot of work in the LaTeX  
exporter.
    It would also cause a lot of problems with the edit-source-code  
stuff
    with "C-c '", because we could then no longer use indentation
    functionality while editing the examples.

2. Adapt the LaTeX exporter to work like the HTML exporter, ignoring
    indentation of tables and example.  The, introduce a special list
    item like "- ___" to explicitly terminate a list if this should be  
necessary.

I welcome comments on this issue.

- Carsten

On Mar 24, 2009, at 7:15 AM, Baoqiu Cui wrote:

> Matthew Lundin <mdl@imapmail.org> writes:
>
>> Carsten,
>>
>> Matthew Lundin <mdl@imapmail.org> writes:
>>
>>> If I may be so bold, I'd like to request an additional setting for
>>> org-empty-line-terminates-plain-lists. Namely, I was wondering if it
>>> would be possible to add an option whereby 2 empty lines would  
>>> terminate
>>> a plain list.
>>
>> Please disregard this request. I think I did not identify the problem
>> correctly. The problem, instead, lies in the html export.
>>
>> When a plain list is followed by a paragraph, the list is closed in  
>> the
>> the export before the paragraph.
>>
>> --8<---------------cut here---------------start------------->8---
>> - Item One
>>
>> - Item Two
>>
>> Here is the paragraph.
>> --8<---------------cut here---------------end--------------->8---
>>
>> results in....
>>
>> ,----
>> | <ul>
>> | <li>
>> | Item One
>> |
>> | </li>
>> | <li>
>> | Item Two
>> |
>> | </li>
>> | </ul>
>> |
>> | <p>Here is the paragraph.
>> | </p>
>> `----
>>
>> But when a table follows the list, as in...
>>
>> --8<---------------cut here---------------start------------->8---
>> - Item One
>>
>> - Item Two
>>
>> | Table cell | Another table cell |
>> --8<---------------cut here---------------end--------------->8---
>
> In my opinion, whether this table should terminate the list or be
> included in "Item Two" has to be decided by the indentation level of  
> the
> table.  In this case, since there is no indentation at all for the
> table, it should terminate the list.  The table would be considered  
> part
> of "Item Two" if it is written in the following way
>
> ------------------------------------------------------------------------
> - Item One
>
> - Item Two
>
>  | Table cell | Another table cell |
> ------------------------------------------------------------------------
>
> I ran into this little ambiguity problem when I was testing the  
> DocBook
> exporter, but have not got chance to resolve this problem.  Similar
> problem also exists for literal examples (and maybe other types of
> blocks):
>
>
> ------------------------------------------------------------------------
> - Item One
>
> - Item Two
>
>  : Some example from a text file
>  : Another line in the example
> ------------------------------------------------------------------------
>
> In this case, the literal example lines should be considered part of
> "Item Two".  If the two spaces before ':' do not exist, this literal
> example will terminate the list.
>
> Is this reasonable?
>
> Baoqiu
>
>
>
> _______________________________________________
> 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] 8+ messages in thread

* Re: Re: Feature request (org-empty-line-terminates-plain-lists)
  2009-03-24  8:48     ` Carsten Dominik
@ 2009-03-24 23:13       ` Matthew Lundin
  2009-03-25  6:37       ` Baoqiu Cui
  1 sibling, 0 replies; 8+ messages in thread
From: Matthew Lundin @ 2009-03-24 23:13 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode Mailinglist, Baoqiu Cui


Hi Carsten,

Carsten Dominik <carsten.dominik@gmail.com> writes:

>
> 2. Adapt the LaTeX exporter to work like the HTML exporter, ignoring
>    indentation of tables and example.  The, introduce a special list
>    item like "- ___" to explicitly terminate a list if this should be
> necessary.

I'm fine with this solution (and I see that you've already implemented
the special list item). It provides a simple and unobtrusive way of
separating lists and tables (without, I hope, creating too much work for
you!).

Best,
Matt

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

* Re: Feature request (org-empty-line-terminates-plain-lists)
  2009-03-24  8:48     ` Carsten Dominik
  2009-03-24 23:13       ` Matthew Lundin
@ 2009-03-25  6:37       ` Baoqiu Cui
  2009-06-08 17:59         ` Carsten Dominik
  1 sibling, 1 reply; 8+ messages in thread
From: Baoqiu Cui @ 2009-03-25  6:37 UTC (permalink / raw)
  To: emacs-orgmode

Hi Carsten,

Carsten Dominik <carsten.dominik@gmail.com> writes:

> Possible solutions:
>
> 1. Allow #+begin_example and friends to be indented and remove the same
>    amount of whitespace from all example lines as the #+begin line has.
>    This is possible, but would require a lot of work in the LaTeX
> exporter.
>    It would also cause a lot of problems with the edit-source-code
> stuff
>    with "C-c '", because we could then no longer use indentation
>    functionality while editing the examples.
>
> 2. Adapt the LaTeX exporter to work like the HTML exporter, ignoring
>    indentation of tables and example.  The, introduce a special list
>    item like "- ___" to explicitly terminate a list if this should be
> necessary.
>
> I welcome comments on this issue.

Thanks for looking into this problem!  Personally I would prefer option
1) if it does not require too much work.  Supporting indented tables and
#+begin_example etc. in Org-mode plain lists not only makes list
structure look cleaner, but also fits well in Org-mode's powerful
structure editing functionality (org-do-promote/demote already supports
lot of automatic indentation today, including tables and ": ..."
example lines.).

Option 2) is a very good compromise, because it is cheap to implement,
and, for *most* of the times, people do not need to use "- ___" in their
lists.

The only problem with option 2) is that, to terminate an ordered list
that has N items, do we have to use something like "(N+1). ___"?  Number
N+1 here makes the list look a little bad.  Also, "+ ___" and "* ___"
may be required for list item starting with `+' or `*'.

Baoqiu

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

* Re: Feature request (org-empty-line-terminates-plain-lists)
  2009-03-23 21:28 Feature request (org-empty-line-terminates-plain-lists) Matthew Lundin
  2009-03-23 23:08 ` Matthew Lundin
@ 2009-03-25  6:49 ` Samuel Wales
  1 sibling, 0 replies; 8+ messages in thread
From: Samuel Wales @ 2009-03-25  6:49 UTC (permalink / raw)
  To: Matthew Lundin; +Cc: Org Mode List

On Mon, Mar 23, 2009 at 14:28, Matthew Lundin <mdl@imapmail.org> wrote:
> If I may be so bold, I'd like to request an additional setting for
> org-empty-line-terminates-plain-lists. Namely, I was wondering if it
> would be possible to add an option whereby 2 empty lines would terminate
> a plain list.

I am a little confused by this thread.

Is this a request like this?

  - top
    - 1
this is some stuff pasted into 1

and this is too
    - 2
but this

is different


because this line does not get folded when 2 is cycled.

?

-- 
Myalgic encephalomyelitis denialism is causing death (decades early;
Jason et al. 2006) and severe suffering (worse than nearly all other
diseases studied; e.g. Schweitzer et al. 1995) and grossly corrupting
science.  http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm

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

* Re: Re: Feature request (org-empty-line-terminates-plain-lists)
  2009-03-25  6:37       ` Baoqiu Cui
@ 2009-06-08 17:59         ` Carsten Dominik
  0 siblings, 0 replies; 8+ messages in thread
From: Carsten Dominik @ 2009-06-08 17:59 UTC (permalink / raw)
  To: Baoqiu Cui; +Cc: emacs-orgmode


On Mar 25, 2009, at 7:37 AM, Baoqiu Cui wrote:

> Hi Carsten,
>
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> Possible solutions:
>>
>> 1. Allow #+begin_example and friends to be indented and remove the  
>> same
>>   amount of whitespace from all example lines as the #+begin line  
>> has.
>>   This is possible, but would require a lot of work in the LaTeX
>> exporter.
>>   It would also cause a lot of problems with the edit-source-code
>> stuff
>>   with "C-c '", because we could then no longer use indentation
>>   functionality while editing the examples.

Option (1) will be implemented in 6.28, option (2), which was  
implemented
temporarily is deprecated or may be removed.

- Carsten

>>
>> 2. Adapt the LaTeX exporter to work like the HTML exporter, ignoring
>>   indentation of tables and example.  The, introduce a special list
>>   item like "- ___" to explicitly terminate a list if this should be
>> necessary.
>>
>> I welcome comments on this issue.
>
> Thanks for looking into this problem!  Personally I would prefer  
> option
> 1) if it does not require too much work.  Supporting indented tables  
> and
> #+begin_example etc. in Org-mode plain lists not only makes list
> structure look cleaner, but also fits well in Org-mode's powerful
> structure editing functionality (org-do-promote/demote already  
> supports
> lot of automatic indentation today, including tables and ": ..."
> example lines.).
>
> Option 2) is a very good compromise, because it is cheap to implement,
> and, for *most* of the times, people do not need to use "- ___" in  
> their
> lists.
>
> The only problem with option 2) is that, to terminate an ordered list
> that has N items, do we have to use something like "(N+1). ___"?   
> Number
> N+1 here makes the list look a little bad.  Also, "+ ___" and "* ___"
> may be required for list item starting with `+' or `*'.
>
> Baoqiu
>
>
>
> _______________________________________________
> 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] 8+ messages in thread

end of thread, other threads:[~2009-06-08 17:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-23 21:28 Feature request (org-empty-line-terminates-plain-lists) Matthew Lundin
2009-03-23 23:08 ` Matthew Lundin
2009-03-24  6:15   ` Baoqiu Cui
2009-03-24  8:48     ` Carsten Dominik
2009-03-24 23:13       ` Matthew Lundin
2009-03-25  6:37       ` Baoqiu Cui
2009-06-08 17:59         ` Carsten Dominik
2009-03-25  6:49 ` Samuel Wales

Code repositories for project(s) associated with this public 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).