From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: Re: HTML export and blogging to blogger.com Date: Tue, 16 Nov 2010 22:45:26 -0600 Message-ID: References: <83eial4my9.fsf@yahoo.it> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0548561051==" Return-path: Received: from [140.186.70.92] (port=41754 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PIZti-0003R7-3x for emacs-orgmode@gnu.org; Tue, 16 Nov 2010 23:45:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PIZtg-0008P9-Dx for emacs-orgmode@gnu.org; Tue, 16 Nov 2010 23:45:30 -0500 Received: from mail-ww0-f49.google.com ([74.125.82.49]:46029) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PIZtg-0008Oo-6p for emacs-orgmode@gnu.org; Tue, 16 Nov 2010 23:45:28 -0500 Received: by wwc33 with SMTP id 33so1618865wwc.30 for ; Tue, 16 Nov 2010 20:45:27 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Samuel Wales Cc: emacs-orgmode@gnu.org --===============0548561051== Content-Type: multipart/alternative; boundary=0016e6dd975093dd6a04953857ce --0016e6dd975093dd6a04953857ce Content-Type: text/plain; charset=ISO-8859-1 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 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? > > [1] http://blog.bookworm.at/2007/08/emacs-unfill-region.html > > > John > --0016e6dd975093dd6a04953857ce Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 i= mplementation. Here's some more (did not try these... just digging them= up and providing links):

-=A0http://xahlee.org/emacs/emacs_unfill-paragraph.html

There was also a reference in the = original post below to longlines-mode which (from my quick skim) seems to d= o 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 insertin= g actual line breaks (if I use "cat file.o= rg" there are no line breaks) whereas with fill the line breaks ar= e 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 someho= w.=A0



B= est regards,
John



On = Tue, Nov 16, 2010 at 10:34 PM, John Hendy <jw.hendy@gmail.com> 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 linebr= eaks in a region but leave paragraphs, indented text
| (quotes, c= ode) and lines starting with an asterisk (lists) intact"
| (interactive "r")
| (replace-regexp "\\([^\n]\\)= \n\\([^ *\n]\\)" "\\1 \\2" nil begin end))
`-----<= /div>

I tried it out and it worked great (added to .emac= s, 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 lo= ng line of text that exported perfectly to a run-on html blob with C-u C-c = C-e R.

Would that work?



John

--0016e6dd975093dd6a04953857ce-- --===============0548561051== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============0548561051==--