Re: Multiline list entries / Is auto-fill-mode in org(roam) usual?

2022-04-04 Thread Tim Cross


c.bu...@posteo.jp writes:

> Dear Tim
>
> Am 04.04.2022 17:49 schrieb Tim Cross:
>> What is line-fill-mode? It isn't a 'standard' emacs mode, so must be
>> some add-on?
>
> Sorry this was a "typo".
>
>> At any rate, I don't see this problem when using standard
>> auto-fill-mode. With this mode, when lines wrap (because I've exceeded
>> the fill column) or if I use C-q to trigger filling, the wrapped lines
>> are indented correctly so that lists are preserved.
>
> This is not the case with me.
> Please see this screenrecording
> https://debianforum.de/forum/gallery/image/3641/source
>
> In the top window you see the relevant lines from my init.el.
> In the bottom you see a orgroam capture buffer while I am tiping a 
> loreipsum line and exceeding the fill column. It is not intended.
>
> And that is how it looks like in raw org
>
> :PROPERTIES:
> :ID:   7fe439ec-c46d-4da5-902a-3ba40cebb25e
> :END:
>
> #+title: test
> #+date: [2022-04-04 Mo 20:04]
>
> - Lorem ipsum dolro sit amet, consetetur sadipscing elitr, sed diam 
> nonumy
> eirmod tempor invidunt ut
> - second item
>second line in second item
> -
>
> The first list entry got its newline char automatically via 
> auto-fill-mode.
> The second entry got its newline by myself via pressing RET.

I cannot reproduce your issue using a clean Emacs. I suspect this is
either something incorrect in your init.el file or something caused by
org-roam (which is not part of org-mode).

I note from the screenshot you provided that you are explicitly setting
auto-fill-function. This is not the standard way to turn on
auto-fill-mode and it could break mode specific settings for
auto-filling. Instead, you should call auto-fill-mode in the appropriate
mode specific hook (as specified in the emacs manual).

I would suggest you try reproducing your issue in a clean Emacs e.g.

emacs -Q

open an org file

do M-x auto-fill-mode

do M-x org-capture

to start a data capture

do M-x auto-fill-mode to enable auto-filling in the capture buffer

Add list items to the capture buffer, some long, some short and let
auto-fill do the filling

complete the capture

When I do this, the lists are formatted correctly and long lines are
wrapped with the correct item indentation.

This is with

GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30,
cairo version 1.16.0) of 2022-04-05
Org mode version 9.5.2 (release_9.5.2-25-gaf6f12 @ 
/usr/local/share/emacs/29.0.50/lisp/org/)



Re: Multiline list entries / Is auto-fill-mode in org(roam) usual?

2022-04-04 Thread c . buhtz

Dear Tim

Am 04.04.2022 17:49 schrieb Tim Cross:

What is line-fill-mode? It isn't a 'standard' emacs mode, so must be
some add-on?


Sorry this was a "typo".


At any rate, I don't see this problem when using standard
auto-fill-mode. With this mode, when lines wrap (because I've exceeded
the fill column) or if I use C-q to trigger filling, the wrapped lines
are indented correctly so that lists are preserved.


This is not the case with me.
Please see this screenrecording
https://debianforum.de/forum/gallery/image/3641/source

In the top window you see the relevant lines from my init.el.
In the bottom you see a orgroam capture buffer while I am tiping a 
loreipsum line and exceeding the fill column. It is not intended.


And that is how it looks like in raw org

:PROPERTIES:
:ID:   7fe439ec-c46d-4da5-902a-3ba40cebb25e
:END:
#+title: test
#+date: [2022-04-04 Mo 20:04]
- Lorem ipsum dolro sit amet, consetetur sadipscing elitr, sed diam 
nonumy

eirmod tempor invidunt ut
- second item
  second line in second item
-

The first list entry got its newline char automatically via 
auto-fill-mode.

The second entry got its newline by myself via pressing RET.



Re: Multiline list entries / Is auto-fill-mode in org(roam) usual?

2022-04-04 Thread Tim Cross


c.bu...@posteo.jp writes:

> Thanks to the discussion I now can see and describe my problem clearer.
>
> When using line-fill-mode it does not take the current org list indention into
> account. Because of this org lines like this will appear.
>
> - one entry with a very long text ending in the second line
> end
> - second entry
>
> This is recognized (e.g. while html export) as two one-item-lists with a
> paragraph between them.
>
> When I press RET myself the point is correct indented but not when it is done
> automatically via line-fill-mode.
>
> Is there a solution for this?

What is line-fill-mode? It isn't a 'standard' emacs mode, so must be
some add-on?

At any rate, I don't see this problem when using standard
auto-fill-mode. With this mode, when lines wrap (because I've exceeded
the fill column) or if I use C-q to trigger filling, the wrapped lines
are indented correctly so that lists are preserved.




Re: Multiline list entries / Is auto-fill-mode in org(roam) usual?

2022-04-04 Thread Tim Cross


c.bu...@posteo.jp writes:

> Am 04.04.2022 09:16 schrieb c.bu...@posteo.jp:
>> Am 04.04.2022 06:06 schrieb Ihor Radchenko:
>>> A list item continues until
>>> there are _2_ blank lines or until the subsequent line is not indented  >=
>>> current list item indentation:
>> Intereseting. What 2 lines not 1 like in paragraphs. Am I right to say
>> that a paragraph ends with one blank line?
>
> Sorry, this was misunderstanding.
>
> I would like to know why does a list need 2 blank lines instead of 1? For what
> reason exists this rule?


Main reason is because you might want a list item which consists of
multiple paragraphs. A possible alternative would be to require that
lists are indented and flag a list item has ended either by a new list
item marker or by text which is no longer indented. However, not
everyone wants to be forced to indent their lists and like to have the
list item start in the '0' column so we need some other way to mark the
end and 2 blank lines seems a reasonable compromise.
.




Re: Multiline list entries / Is auto-fill-mode in org(roam) usual?

2022-04-04 Thread Kaushal Modi
On Mon, Apr 4, 2022 at 10:34 AM  wrote:

>
> I would like to know why does a list need 2 blank lines instead of 1?
> For what reason exists this rule?
>

- 1 blank line in a list item with create a paragraph break as I showed in
my example earlier. It will not end the list item or list.
- So we need 2 blank lines if we mean to end the list.


Example:

- list 1 item 1

  second paragraph in list 1 item 1
- list 1 item 2


- list 2 item 1 because there are 2 blank lines before this item.


Re: Multiline list entries / Is auto-fill-mode in org(roam) usual?

2022-04-04 Thread c . buhtz

Am 04.04.2022 09:16 schrieb c.bu...@posteo.jp:

Am 04.04.2022 06:06 schrieb Ihor Radchenko:

A list item continues until
there are _2_ blank lines or until the subsequent line is not indented 
>=

current list item indentation:


Intereseting. What 2 lines not 1 like in paragraphs. Am I right to say
that a paragraph ends with one blank line?


Sorry, this was misunderstanding.

I would like to know why does a list need 2 blank lines instead of 1? 
For what reason exists this rule?




Re: Multiline list entries / Is auto-fill-mode in org(roam) usual?

2022-04-04 Thread c . buhtz

Thanks to the discussion I now can see and describe my problem clearer.

When using line-fill-mode it does not take the current org list 
indention into account. Because of this org lines like this will appear.


- one entry with a very long text ending in the second line
end
- second entry

This is recognized (e.g. while html export) as two one-item-lists with a 
paragraph between them.


When I press RET myself the point is correct indented but not when it is 
done automatically via line-fill-mode.


Is there a solution for this?



Re: Multiline list entries / Is auto-fill-mode in org(roam) usual?

2022-04-04 Thread Ihor Radchenko
c.bu...@posteo.jp writes:

> Am 04.04.2022 06:06 schrieb Ihor Radchenko:
>> A list item continues until
>> there are _2_ blank lines or until the subsequent line is not indented 
>> >=
>> current list item indentation:
>
> Intereseting. What 2 lines not 1 like in paragraphs. Am I right to say 
> that a paragraph ends with one blank line?

Yes, you are right. Blank line indicates end of a paragraph.

>> Everything is described in the manual. See
>> https://orgmode.org/manual/Plain-Lists.html#Plain-Lists
>
> I showed you a worg-link. Again this is a good example why worg hurts 
> more then it helps; newbies. The site looked very official.

WORG is also official, though serves more like a wiki and not as
official as the manual. In your particular case, we are currently in the
process of updating the WORG syntax page.
https://orgmode.org/worg/dev/org-syntax.html is an old page explicitly
stating that it is a draft ("Org Syntax (draft)"). I recommend using
https://orgmode.org/worg/dev/org-syntax-edited.html#Items if you want to
check more up-to-date formal syntax description.

Best,
Ihor




Re: Multiline list entries / Is auto-fill-mode in org(roam) usual?

2022-04-04 Thread c . buhtz

Dear Ihor,

thanks for your feedback.

Am 04.04.2022 06:06 schrieb Ihor Radchenko:

A list item continues until
there are _2_ blank lines or until the subsequent line is not indented 
>=

current list item indentation:


Intereseting. What 2 lines not 1 like in paragraphs. Am I right to say 
that a paragraph ends with one blank line?



Everything is described in the manual. See
https://orgmode.org/manual/Plain-Lists.html#Plain-Lists


I showed you a worg-link. Again this is a good example why worg hurts 
more then it helps; newbies. The site looked very official.




Re: Multiline list entries / Is auto-fill-mode in org(roam) usual?

2022-04-03 Thread Kaushal Modi
On Mon, Apr 4, 2022, 12:06 AM Ihor Radchenko  wrote:

>
> I think your examples are a bit misleading.


I have the indentations correct in my three examples.

A list item continues until
> there are _2_ blank lines or until the subsequent line is not indented >=
> current list item indentation:
>

The whole list ends after 2 blank lines. But I didn't demonstrate this rule
in my examples. I was just focusing on plain single new line char vs a
blank line (2 consecutive newlines) in my examples.

1. list item 1
> not a list item because it not indented
> 2. completely new list
>
> Also,
>
> 1. list item 1
>
>Still a list item - new paragraph inside the list
>
>
>Indented, but not a list item because there are two blank lines above
>
> Everything is described in the manual. See
> https://orgmode.org/manual/Plain-Lists.html#Plain-Lists


+1

>
>


Re: Multiline list entries / Is auto-fill-mode in org(roam) usual?

2022-04-03 Thread Ihor Radchenko
Kaushal Modi  writes:

>> Do I understand it correct that the end of a list is marked by an empty
>> line?
>>
>
> Yes. I think that the list items follow the same rules as Paragraphs [1]
> i.e. A list item continues until it sees a blank line. This is identical to
> Markdown.
>

I think your examples are a bit misleading. A list item continues until
there are _2_ blank lines or until the subsequent line is not indented >=
current list item indentation:

1. list item 1
not a list item because it not indented
2. completely new list

Also,

1. list item 1

   Still a list item - new paragraph inside the list


   Indented, but not a list item because there are two blank lines above

Everything is described in the manual. See 
https://orgmode.org/manual/Plain-Lists.html#Plain-Lists

Best,
Ihor



Re: Multiline list entries / Is auto-fill-mode in org(roam) usual?

2022-04-03 Thread Kaushal Modi
On Sun, Apr 3, 2022, 4:29 PM  wrote:

> Hello togehter,
>
> is it usual to have auto-fill-mode (automatic new-line after n
> characters) turned on in org or org-roam (including fill-column set e.g.
> to 80)?
>

I cannot comment on that. Enabling auto-fill-mode is user preference.

Or let me ask from another point of view: Is it usual to have multiline
> list entries?
>

Yes, if auto-fill-mode is enabled in org-mode.

I know that org is not markdown but I tried some markdown editors to
> test it. They still recognize the linebreak in my first example and
> rendered it "correct" as a 3 item list.
> I checked the syntax docu [1] about it but I couldn't find a hint or
> didn't understand.
>
> Do I understand it correct that the end of a list is marked by an empty
> line?
>

Yes. I think that the list items follow the same rules as Paragraphs [1]
i.e. A list item continues until it sees a blank line. This is identical to
Markdown.

Below, you have 2 list items:

- item 1
- item 2

Below is also 2 list items:

- item 1
  item 1 continued
- item 2

Below is also 2 list items, but the first item has 2 paragraphs:

- item 1

  second paragraph in item 1
- item 2

I hope that helps.

[1]: https://orgmode.org/manual/Paragraphs.html#Paragraphs


Re: Multiline list entries / Is auto-fill-mode in org(roam) usual?

2022-04-03 Thread c . buhtz

I found org-export-as-html and tested this

- one
  eins
ens

This as html is


one
eins


ens



Am 03.04.2022 22:28 schrieb c.bu...@posteo.jp:

Hello togehter,

is it usual to have auto-fill-mode (automatic new-line after n
characters) turned on in org or org-roam (including fill-column set
e.g. to 80)?
Or let me ask from another point of view: Is it usual to have
multiline list entries?

- first list entry
- second list entry with more then 80 chars/columns two with Lorem 
ipsum dolor

sit amet, consetetur sadipscing elitr
- third entry

Without auto-fill-mode it would look like this, without any linebreak
in an entry:

- first list entry
- second list entry with more then 80 chars/columns two with Lorem
ipsum dolor sit amet, consetetur sadipscing elitr
- third entry

I know that org is not markdown but I tried some markdown editors to
test it. They still recognize the linebreak in my first example and
rendered it "correct" as a 3 item list.
I checked the syntax docu [1] about it but I couldn't find a hint or
didn't understand.

Do I understand it correct that the end of a list is marked by an empty 
line?


[1] --