emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Re: HTML export and blogging to blogger.com


From: John Hendy
Subject: Re: [Orgmode] Re: HTML export and blogging to blogger.com
Date: Tue, 16 Nov 2010 22:45:26 -0600

It turns out that there are several hits for things like this. Those on the list who actually know elisp can perhaps decide which is the most robust implementation. Here's some more (did not try these... just digging them up and providing links):

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

There was also a reference in the original post below to longlines-mode which (from my quick skim) seems to do what fill mode does but with "soft" returns; it only appears to be filled but in reality is not altering actual file line breaks. I tried this and can verify that when I save from longlines mode it is not inserting actual line breaks (if I use "cat file.org" there are no line breaks) whereas with fill the line breaks are definitely inserted into the file... however it seems that org exports to html how the file appears in the buffer, not what's in the file. I did want to toss it out there in case someone knows how to integrate it somehow. 

http://www.gnu.org/software/emacs/manual/html_node/emacs/Longlines.html


Best regards,
John



On Tue, Nov 16, 2010 at 10:34 PM, John Hendy <address@hidden> wrote:

Before hitting send I decided to look around and see what I found. Check this out!! [1]

,-----
| (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))
`-----

I tried it out and it worked great (added to .emacs, reloaded, and used M-x unfill-region RET). I tried it with two headings each with multiple lines of text under them and unfilled the whole buffer. It leaves the headers on their own lines and turns each paragraph into a long line of text that exported perfectly to a run-on html blob with C-u C-c C-e R.

Would that work?



John


reply via email to

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