emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* orgalist and refill a paragraph
@ 2019-04-22 16:26 Uwe Brauer
  2019-04-22 18:21 ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Uwe Brauer @ 2019-04-22 16:26 UTC (permalink / raw)
  To: emacs-orgmode


Hi 

I am using orgalist-mode in mail buffers via.

(add-hook 'mail-mode-hook #'orgalist-mode)
(add-hook 'message-mode-hook #'orgalist-mode)


The filling works nicely if I start like this 

    1.  Akja kjkajsdk fjadkfjaksdjfa kajskfj sajflksajdf lkjsaljfksadjf
        ksajfdkajsd fkjsadlkfj


However if I have already some long text say 


Ajdfkaj fkasjdkfjasf akjasjfkajslkfj aslkjf asdkj flks ajfk ajslkfj
sakfjksa 

And put the cursor on the first word and insert intent + a number like
this



    1.  Ajdfkaj fkasjdkfjasf akjasjfkajslkfj aslkjf asdkj flks ajfk ajslkfj
sakfjksa 


Then the filling M-q and friends does not result in 

    1.  Akja kjkajsdk fjadkfjaksdjfa kajskfj sajflksajdf lkjsaljfksadjf
        ksajfdkajsd fkjsadlkfj


Any idea how to achieve this desired filling?

Thanks and regards

Uwe Brauer 

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

* Re: orgalist and refill a paragraph
  2019-04-22 16:26 orgalist and refill a paragraph Uwe Brauer
@ 2019-04-22 18:21 ` Nicolas Goaziou
  2019-04-22 20:44   ` Tim Cross
  2019-04-23  9:03   ` Uwe Brauer
  0 siblings, 2 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2019-04-22 18:21 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

Uwe Brauer <oub@mat.ucm.es> writes:

> I am using orgalist-mode in mail buffers via.
>
> (add-hook 'mail-mode-hook #'orgalist-mode)
> (add-hook 'message-mode-hook #'orgalist-mode)
>
>
> The filling works nicely if I start like this 
>
>     1.  Akja kjkajsdk fjadkfjaksdjfa kajskfj sajflksajdf lkjsaljfksadjf
>         ksajfdkajsd fkjsadlkfj
>
>
> However if I have already some long text say 
>
>
> Ajdfkaj fkasjdkfjasf akjasjfkajslkfj aslkjf asdkj flks ajfk ajslkfj
> sakfjksa 
>
> And put the cursor on the first word and insert intent + a number like
> this
>
>
>
>     1.  Ajdfkaj fkasjdkfjasf akjasjfkajslkfj aslkjf asdkj flks ajfk ajslkfj
> sakfjksa 
>
>
> Then the filling M-q and friends does not result in 
>
>     1.  Akja kjkajsdk fjadkfjaksdjfa kajskfj sajflksajdf lkjsaljfksadjf
>         ksajfdkajsd fkjsadlkfj
>
>
> Any idea how to achieve this desired filling?

Use TAB on the second line. In any case, I don't think orgalist should
do it. The second line doesn't belong to the list, by definition.

Regards,

-- 
Nicolas Goaziou

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

* Re: orgalist and refill a paragraph
  2019-04-22 18:21 ` Nicolas Goaziou
@ 2019-04-22 20:44   ` Tim Cross
  2019-04-23  8:59     ` Uwe Brauer
  2019-04-23  9:03   ` Uwe Brauer
  1 sibling, 1 reply; 6+ messages in thread
From: Tim Cross @ 2019-04-22 20:44 UTC (permalink / raw)
  To: emacs-orgmode


Just in case it is relevant, if your using a recent emacs, you might be
running into a bug which was recently reported to do with changes in
text-mode. The bug was found by an orglist user and affected subsequent
line indentation. See the emacs devel list archives for details (was
within the last 2 weeks from memory).

Tim

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> Uwe Brauer <oub@mat.ucm.es> writes:
>
>> I am using orgalist-mode in mail buffers via.
>>
>> (add-hook 'mail-mode-hook #'orgalist-mode)
>> (add-hook 'message-mode-hook #'orgalist-mode)
>>
>>
>> The filling works nicely if I start like this 
>>
>>     1.  Akja kjkajsdk fjadkfjaksdjfa kajskfj sajflksajdf lkjsaljfksadjf
>>         ksajfdkajsd fkjsadlkfj
>>
>>
>> However if I have already some long text say 
>>
>>
>> Ajdfkaj fkasjdkfjasf akjasjfkajslkfj aslkjf asdkj flks ajfk ajslkfj
>> sakfjksa 
>>
>> And put the cursor on the first word and insert intent + a number like
>> this
>>
>>
>>
>>     1.  Ajdfkaj fkasjdkfjasf akjasjfkajslkfj aslkjf asdkj flks ajfk ajslkfj
>> sakfjksa 
>>
>>
>> Then the filling M-q and friends does not result in 
>>
>>     1.  Akja kjkajsdk fjadkfjaksdjfa kajskfj sajflksajdf lkjsaljfksadjf
>>         ksajfdkajsd fkjsadlkfj
>>
>>
>> Any idea how to achieve this desired filling?
>
> Use TAB on the second line. In any case, I don't think orgalist should
> do it. The second line doesn't belong to the list, by definition.
>
> Regards,


-- 
Tim Cross

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

* Re: orgalist and refill a paragraph
  2019-04-22 20:44   ` Tim Cross
@ 2019-04-23  8:59     ` Uwe Brauer
  0 siblings, 0 replies; 6+ messages in thread
From: Uwe Brauer @ 2019-04-23  8:59 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 439 bytes --]

>>> "TC" == Tim Cross <theophilusx@gmail.com> writes:

   > Just in case it is relevant, if your using a recent emacs, you might be
   > running into a bug which was recently reported to do with changes in
   > text-mode. The bug was found by an orglist user and affected subsequent
   > line indentation. See the emacs devel list archives for details (was
   > within the last 2 weeks from memory).

Thanks I found it. I will try it out.

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5025 bytes --]

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

* Re: orgalist and refill a paragraph
  2019-04-22 18:21 ` Nicolas Goaziou
  2019-04-22 20:44   ` Tim Cross
@ 2019-04-23  9:03   ` Uwe Brauer
  2019-04-24  0:11     ` Samuel Wales
  1 sibling, 1 reply; 6+ messages in thread
From: Uwe Brauer @ 2019-04-23  9:03 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 654 bytes --]


   > Hello,
   > Uwe Brauer <oub@mat.ucm.es> writes:


   > Use TAB on the second line. In any case, I don't think orgalist should
   > do it. The second line doesn't belong to the list, by definition.

Well the question is, if you already typed some text and want to make a
list out of it, ogalist cannot deal it. The point is this scenario to
transform some paragraph to a list, occurs to me frequently and that is
why I would like to have some function which would do the job.

I tried out to unfill the region, that is to make a very long line, then
insert a list item and then refill, with adaptive fill, that somehow
works, but is not error free.

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5025 bytes --]

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

* Re: orgalist and refill a paragraph
  2019-04-23  9:03   ` Uwe Brauer
@ 2019-04-24  0:11     ` Samuel Wales
  0 siblings, 0 replies; 6+ messages in thread
From: Samuel Wales @ 2019-04-24  0:11 UTC (permalink / raw)
  To: emacs-orgmode

filladapt.el usually fills much better for org lists, and everything
else, but i don't think it would be better for this case.

(setq filladapt-token-table
  '(
    ;; this must be first
    ("^" beginning-of-line)
    ;; Included text in news or mail replies
    (">+" citation->)
    ;; Included text generated by SUPERCITE.  We can't hope to match all
    ;; the possible variations, your mileage may vary.
    ("\\(\\w\\|[0-9]\\)[^'`\"< \t\n]*>[ \t]*" supercite-citation)
    ;; Lisp comments
    ;; alpha -- this needs to treat ";;  (lisp)" as not a comment
    (";+" lisp-comment)
    ;; UNIX shell comments
    ;;
    ;; alpha might or might not need to fix org comments.
    ;; cf. comment-start.
    ;;
    ;;("\\(# ?\\)+" sh-comment)
    ("#+" sh-comment)
    ;; Postscript comments
    ("%+" postscript-comment)
    ;; C++ comments
    ("///*" c++-comment)
    ;; Texinfo comments
    ("@c[ \t]" texinfo-comment)
    ("@comment[ \t]" texinfo-comment)
    ;; Bullet types.
    ;;
    ;; LaTex \item
    ;;
    ("\\\\item[ \t]" bullet)
    ;;
    ;; 1. xxxxx
    ;;    xxxxx
    ;;alpha also org checkbox
    ("^[ 	]+[0-9]+\\.[ \t]\\[[ X]?\\] " bullet)
    ("^[ 	]+[0-9]+\\.[ \t]" bullet)
    ;;
    ;; 2.1.3  xxxxx xx x xx x
    ;;        xxx
    ;;
    ("^[ 	]+[0-9]+\\(\\.[0-9]+\\)+[ \t]" bullet)
    ;;
    ;; a. xxxxxx xx
    ;;    xxx xxx
    ;;alpha also org checkbox -- why a ? here?  fixme.
    ("^[ 	]+[A-Za-z]\\.[ \t]\\[[ X]?\\] " bullet)
    ("^[ 	]+[A-Za-z]\\.[ \t]" bullet)
    ;;
    ;; 1) xxxx x xx x xx   or   (1) xx xx x x xx xx
    ;;    xx xx xxxx                xxx xx x x xx x
    ;;
    ;;alpha also org checkbox
    ;;
    ("^[ 	]+(?[0-9]+)[ \t]\\[[ X]?\\] " bullet)
    ("^[ 	]+(?[0-9]+)[ \t]" bullet)
    ;;
    ;; a) xxxx x xx x xx   or   (a) xx xx x x xx xx
    ;;    xx xx xxxx                xxx xx x x xx x
    ;;alpha also org checkbox
    ("^[ 	]+(?[A-Za-z])[ \t]\\[[ X]?\\] " bullet)
    ("^[ 	]+(?[A-Za-z])[ \t]" bullet)
    ;;
    ;; 2a. xx x xxx x x xxx
    ;;     xxx xx x xx x
    ;;
    ("^[ 	]+[0-9]+[A-Za-z]\\.[ \t]" bullet)
    ;;
    ;; 1a) xxxx x xx x xx   or   (1a) xx xx x x xx xx
    ;;     xx xx xxxx                 xxx xx x x xx x
    ;;
    ("^[ 	]+(?[0-9]+[A-Za-z])[ \t]" bullet)
    ;;
    ;; -  xx xxx xxxx   or   *  xx xx x xxx xxx
    ;;    xxx xx xx             x xxx x xx x x x
    ;;alpha also org checkbox
    ("^[ 	]+[-~*+]+[ \t]\\[[ X]?\\] " bullet)
    ("^[ 	]+[-~*+]+[ \t]" bullet)
    ;;
    ;; o  xx xxx xxxx xx x xx xxx x xxx xx x xxx
    ;;    xxx xx xx
    ;;
    ("^[ 	]+o[ \t]" bullet)
    ;; don't touch
    ("[ \t]+" space)
    ("$" end-of-line)
    ))

On 4/23/19, Uwe Brauer <oub@mat.ucm.es> wrote:
>
>    > Hello,
>    > Uwe Brauer <oub@mat.ucm.es> writes:
>
>
>    > Use TAB on the second line. In any case, I don't think orgalist should
>    > do it. The second line doesn't belong to the list, by definition.
>
> Well the question is, if you already typed some text and want to make a
> list out of it, ogalist cannot deal it. The point is this scenario to
> transform some paragraph to a list, occurs to me frequently and that is
> why I would like to have some function which would do the job.
>
> I tried out to unfill the region, that is to make a very long line, then
> insert a list item and then refill, with adaptive fill, that somehow
> works, but is not error free.
>


-- 
The Kafka Pandemic

What is misopathy?
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.

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

end of thread, other threads:[~2019-04-24  0:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-22 16:26 orgalist and refill a paragraph Uwe Brauer
2019-04-22 18:21 ` Nicolas Goaziou
2019-04-22 20:44   ` Tim Cross
2019-04-23  8:59     ` Uwe Brauer
2019-04-23  9:03   ` Uwe Brauer
2019-04-24  0:11     ` 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).