From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: Re: HTML export and blogging to blogger.com Date: Wed, 17 Nov 2010 12:47:16 +0100 Message-ID: <4CE3C0C4.8020503@christianmoe.com> References: <83eial4my9.fsf@yahoo.it> Reply-To: mail@christianmoe.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=39566 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PIgSW-0006fK-5L for emacs-orgmode@gnu.org; Wed, 17 Nov 2010 06:45:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PIgSV-0004ny-1X for emacs-orgmode@gnu.org; Wed, 17 Nov 2010 06:45:52 -0500 Received: from mars.hitrost.net ([91.185.193.39]:29601) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PIgSU-0004i7-Ro for emacs-orgmode@gnu.org; Wed, 17 Nov 2010 06:45:50 -0500 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 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

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. (defun my-org-postprocess-blog-post () "Adapt exported HTML to blogs that get confused by

and newlines." (let ((fill-column (point-max))) ; h/t Chris Lowry ;; p tags (goto-char (point-min)) (while (re-search-forward "" nil t) (replace-match "")) ;; unfill (fill-region start end nil) ; with fill-column set really huge ;; delete superfluous blank lines (is there a better way?) (goto-char (point-min)) (while (re-search-forward "\n\n+" nil t) (previous-line) (delete-blank-lines)))) (org-add-hook 'org-export-html-final-hook 'my-org-postprocess-blog-post) > 2) anybody has a way for the HTML to instruct the browser to /ignore > newlines/ I don't think that's a viable option across platforms. Yours, Christian