emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Convert list to paragraph


From: Nicolas Goaziou
Subject: Re: [O] Convert list to paragraph
Date: Sat, 27 Aug 2011 02:59:51 +0200

Hello,

Nick Dokos <address@hidden> writes:

> (defun org-list-to-paragraph ()
>   "Convert the list at point into a paragraph."
>   (interactive)
>   (insert (org-list-to-generic (org-list-parse-list t) '(:ustart "" :splice t 
> :isep " " :nobr t ))))
>
>
> (defun org-lists-to-paragraphs ()
>   (goto-char (point-min))
>   (condition-case nil
>       (while (org-list-search-forward "+ ")
>       (org-list-to-paragraph))
>     (error nil)))
>
> (add-hook 'org-export-preprocess-hook (function org-lists-to-paragraphs))

[...]

> ngz will probably suggest changes and improvements on this basic model.

Well, just that "^[ \t]*\\+\\($\\| +\\)" is a more accurate search
string. Otherwise, it could stop too early.

Now, this might also be a solution for Thomas S. Dye's
"paralistification" problem[1]: in an export hook, transform lists
without a preceding blank line into paralist forms, thanks to
`org-list-to-generic'.

Regards,

[1] http://permalink.gmane.org/gmane.emacs.orgmode/46151

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]