From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: HTML export and blogging to blogger.com Date: Thu, 11 Nov 2010 17:40:23 -0600 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0221763537==" Return-path: Received: from [140.186.70.92] (port=44192 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGgkl-0000ah-0A for emacs-orgmode@gnu.org; Thu, 11 Nov 2010 18:40:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PGgkj-0001D2-EJ for emacs-orgmode@gnu.org; Thu, 11 Nov 2010 18:40:26 -0500 Received: from mail-bw0-f41.google.com ([209.85.214.41]:36804) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PGgkj-0001CP-2b for emacs-orgmode@gnu.org; Thu, 11 Nov 2010 18:40:25 -0500 Received: by bwz16 with SMTP id 16so2582550bwz.0 for ; Thu, 11 Nov 2010 15:40:24 -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 --===============0221763537== Content-Type: multipart/alternative; boundary=001636c5995a6ddf830494cf7fff --001636c5995a6ddf830494cf7fff Content-Type: text/plain; charset=ISO-8859-1 On Thu, Nov 11, 2010 at 5:18 PM, Samuel Wales wrote: > Hi John, > > On 2010-11-11, John Hendy wrote: > > #+options: author:nil email:nil > > That should be in your actual .org file. See below. > I presume that this is the same as what I tried in elisp. That did not > work. > > Thanks for your detail of your publishing routine. That helps me know > what the state of the art is. > > It looks like org can't yet export to whatever it is that Blogger > requires. So I will just paste in plain text and forget about > formatting and emphasis for now. I am limited in typing so doing that > by hand is beyond what I can do. > > Your call. I really don't endure much with this. Also, see below as your comment actually refreshed my mind about how easy this really is. > > - C-c C-e R to export the region > > A documentation note: the manual has me confused about these: > > === > C-c C-e H > Export to a temporary buffer, do not create a file. > C-c C-e R > Export the active region to a temporary buffer. With a > prefix argument, do not produce the file header and > footer, but just the plain HTML section for the region. > This is good for cut-and-paste operations. > === > > I expected the former to detect an active region. Also it wasn't > clear at first that it operated on the whole file instead of a > subtree. I expected something like "subtree unless prefix arg or > active region" for a single command. > > Yes! I didn't remember this. The "prefix argument" is C-u (in case you did not know that... I had no idea when I first saw that). This works fantastically. *That's* how I was doing it when I was really in the groove. So, here's my updated method: - Write some stuff - Select it (move to beginning of what you want, C-space, move to end of what you want) - C-u C-c C-e R to export that region with no preamble to a separate buffer - C-x C-w export.txt - to terminal: perl -pi -e ' s/\R/ /g; s/\//g; s/\<\/p\>/\n\n/g;' export.txt - back to emacs: C-x C-f export.txt; type "yes" - M-< to go to front of buffer, C-space, M-> to go to end, M-w to copy - Paste into basic blogger edit box - Done Re. the first part... just take this and save it as an org file in an emacs buffer. ------- #+AUTHOR: Samuel Wales #+OPTIONS: toc:nil *:t tags:nil author:nil email:nil * Heading 1 ** Sub Heading 1 Start. Here is some text that I am writing to test exporting. Here is some text that I am writing to test exporting. Here is some text that I am writing to test exporting. Here is some text that I am writing to test exporting. Here is some text that I am writing to test exporting. Here is some text that I am writing to test exporting. Here is some text that I am writing to test exporting. End. -------------- Then do the above with the blob from: "Start. Here is..." ---> "...to test exporting. End." John Thanks. > > > Samuel > --001636c5995a6ddf830494cf7fff Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Thu, Nov 11, 2010 at 5:18 PM, Samuel Wales <samologist@gmai= l.com> wrote:
Hi John,

On 2010-11-11, John Hendy <jw.hend= y@gmail.com> wrote:
> #+options: author:nil email:nil


That should be in your actual .o= rg file. See below.
=A0
I presume that this is the same as what I tried in elisp. =A0That did= not work.

Thanks for your detail of your publishing routine. =A0That helps me know what the state of the art is.

It looks like org can't yet export to whatever it is that Blogger
requires. =A0So I will just paste in plain text and forget about
formatting and emphasis for now. =A0I am limited in typing so doing that by hand is beyond what I can do.


Your call. I really don't endure m= uch with this. Also, see below as your comment actually refreshed my mind a= bout how easy this really is.
=A0
> - C-c C-e R to export the region

A documentation note: the manual has me confused about these:

=3D=3D=3D
C-c C-e H
=A0 =A0Export to a temporary buffer, do not create a file.
C-c C-e R
=A0 =A0Export the active region to a temporary buffer. With a
=A0 =A0prefix argument, do not produce the file header and
=A0 =A0footer, but just the plain HTML section for the region.
=A0 =A0This is good for cut-and-paste operations.
=3D=3D=3D

I expected the former to detect an active region. =A0Also it wasn't
clear at first that it operated on the whole file instead of a
subtree. =A0I expected something like "subtree unless prefix arg or active region" for a single command.


Yes! I didn't remember this. The &= quot;prefix argument" is C-u (in case you did not know that... I had n= o idea when I first saw that). This works fantastically. That's= =A0how I was doing it when I was really in the groove. So, here's my up= dated method:

- Write some stuff
- Select it (move to begin= ning of what you want, C-space, move to end of what you want)
- C= -u C-c C-e R to export that region with no preamble to a separate buffer
- C-x C-w export.txt
- to terminal:=A0perl -pi -e ' s/\R/ /g; s/\<p\>//g; s/\<= ;\/p\>/\n\n/g;' =A0export.txt
- back to emacs: C-x C-f = export.txt; type "yes"
- M-< to go to front of buffer, C-space, M-> to g= o to end, M-w to copy
- Paste into basic blogge= r edit box
- = Done

Re. the first part... just take t= his and save it as an org file in an emacs buffer.

-------
#+AUTHOR: = =A0 =A0Samuel Wales
#+OPTIONS: =A0 toc:nil *:t tags:nil author:nil emai= l:nil

<= span class=3D"Apple-style-span" style=3D"border-collapse: collapse;">* Head= ing 1
** Sub Heading = 1
Start. Here is some text that I am writing to test exporting. Here is= some
text that I am = writing to test exporting. Here is some text that I am
<= div> writing to test expo= rting. Here is some text that I am writing to test
= exporting. Here is s= ome text that I am writing to test exporting. Here
is some text th= at I am writing to test exporting. Here is some text
that I am writin= g to test exporting. End.
--------------

Then do the above with the= blob from: "Start. Here is..." ---> "...to test exportin= g. End."


John


=
Thanks.


Samuel

--001636c5995a6ddf830494cf7fff-- --===============0221763537== 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 --===============0221763537==--