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:34:28 -0600 Message-ID: References: <83eial4my9.fsf@yahoo.it> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1200106223==" Return-path: Received: from [140.186.70.92] (port=51821 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PIZj5-0008UV-33 for emacs-orgmode@gnu.org; Tue, 16 Nov 2010 23:34:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PIZj3-00079R-RO for emacs-orgmode@gnu.org; Tue, 16 Nov 2010 23:34:31 -0500 Received: from mail-wy0-f169.google.com ([74.125.82.169]:36958) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PIZj3-00079L-Fq for emacs-orgmode@gnu.org; Tue, 16 Nov 2010 23:34:29 -0500 Received: by wyf23 with SMTP id 23so1596347wyf.0 for ; Tue, 16 Nov 2010 20:34:28 -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 --===============1200106223== Content-Type: multipart/alternative; boundary=0016e659f5cc53d5620495383047 --0016e659f5cc53d5620495383047 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Nov 16, 2010 at 6:17 PM, Samuel Wales wrote: > OK, more: > > I appreciate your considerable effort and I know that your perl > solution works for you, but debugging it so that it works for my box > also is not the approach that will work for all of us, and is not > something I can do at this time. A dependency on a specific version > of perl or another part of the external environment is not a universal > solution. > Good points. Didn't mean to be pushy! Just wanted to toss it out one more time. Consider it more that I empathize with your frustration and since I've been so happy with it I was hoping it could make your life easier as well. > A native solution is best for everybody if we can implement it. > Perhaps this is right. Maybe my fix was more hackish and non-robust and it's better to put in the effort to find a more universal solution for those in this situation. > My questions again are, is there a hook that can unfill, can HTML be > made to unfill, or is there an unfill-region that works on subtrees. > 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 --0016e659f5cc53d5620495383047 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Tue, Nov 16, 2010 at 6:17 PM, Samuel Wales <samologist@gmai= l.com> wrote:
OK, more:

I appreciate your considerable effort and I know that your perl
solution works for you, but debugging it so that it works for my box
also is not the approach that will work for all of us, and is not
something I can do at this time. =A0A dependency on a specific version
of perl or another part of the external environment is not a universal
solution.

Good points. Didn't mean = to be pushy! Just wanted to toss it out one more time. Consider it more tha= t I empathize with your frustration and since I've been so happy with i= t I was hoping it could make your life easier as well.
=A0
A native solution is best for everybody if we can implement it.

Perhaps this is right. Maybe my fix was more hacki= sh and non-robust and it's better to put in the effort to find a more u= niversal solution for those in this situation.
=A0
My questions again are, is there a hook that can unfill, can HTML be
made to unfill, or is there an unfill-region that works on subtrees.

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

,-----<= /div>
| (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


= --0016e659f5cc53d5620495383047-- --===============1200106223== 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 --===============1200106223==--