From: Nicolas Goaziou <n.goaziou@gmail.com>
To: nicholas.dokos@hp.com
Cc: emacs-orgmode@gnu.org, Derek Thomas <derekcthomas@gmail.com>
Subject: Re: Convert list to paragraph
Date: Sat, 27 Aug 2011 02:59:51 +0200 [thread overview]
Message-ID: <87ippjmzy0.fsf@gmail.com> (raw)
In-Reply-To: <5350.1314394027@alphaville.americas.hpqcorp.net> (Nick Dokos's message of "Fri, 26 Aug 2011 17:27:07 -0400")
Hello,
Nick Dokos <nicholas.dokos@hp.com> 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
next prev parent reply other threads:[~2011-08-27 1:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-26 20:01 Convert list to paragraph Derek Thomas
2011-08-26 21:27 ` Nick Dokos
2011-08-27 0:59 ` Nicolas Goaziou [this message]
2011-08-27 14:16 ` Derek Thomas
2011-08-27 16:32 ` Nick Dokos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ippjmzy0.fsf@gmail.com \
--to=n.goaziou@gmail.com \
--cc=derekcthomas@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=nicholas.dokos@hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.