On Wed, Nov 17, 2010 at 5:47 AM, Christian Moe <m...@christianmoe.com>wrote:

> Hi,
>
> Samuel Wales wrote:
>
>> So I guess I'd like to know if:
>>
>>   1) anybody has a /hook in the exporter/ to unfill paragraphs, or
>>
>
> This is what I've come up with for posting comments on WordPress blogs,
> without <p> tags and linebreaks. It can probably be written more elegantly,
> but it does what I need. Haven't tried Blogger but possibly it works for you
> as well.
> ,----

| code
> `-----
>
>
I didn't try yours, but I found many similar functions and sent them out
last night. I'm hoping they did not get missed! It looks like many have
written functions to do just what Samuel is looking for
(unfill-region/paragraph). Here is the code again which worked like so:

- write a bunch of stuff and highlight it
- M-x unfill-region (command provided by the code below)
- C-u C-c C-e R
- M-< C-space M-> M-w
- Paste in blogger box

>From http://blog.bookworm.at/2007/08/emacs-unfill-region.html:

> ,-----
> | (defun unfill-region (begin end)
> | "Remove all linebreaks in a region but leave paragraphs, indented text
> | (quotes, code) and lines starting with an asterisk (lists) intact"
> | (interactive "r")
> | (replace-regexp "\\([^\n]\\)\n\\([^ *\n]\\)" "\\1 \\2" nil begin end))
> `-----
>

And several links with additional very similar looking code:
 - http://blog.chrislowis.co.uk/2010/03/03/unfill-region-emacs.html
 - http://xahlee.org/emacs/emacs_unfill-paragraph.html
 - http://nolan.eakins.net/node/208


John


> Yours,
> Christian
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to