From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: Can I publish one block of org file? Date: Tue, 15 Sep 2009 09:05:18 -0400 Message-ID: <87ocpctl2p.fsf@fastmail.fm> References: <83ljkglkkl.fsf@ymail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MnXdu-0004Ns-Ce for emacs-orgmode@gnu.org; Tue, 15 Sep 2009 09:00:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MnXdp-0004MO-3Y for emacs-orgmode@gnu.org; Tue, 15 Sep 2009 09:00:21 -0400 Received: from [199.232.76.173] (port=52895 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MnXdp-0004MJ-0x for emacs-orgmode@gnu.org; Tue, 15 Sep 2009 09:00:17 -0400 Received: from out1.smtp.messagingengine.com ([66.111.4.25]:57081) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MnXdo-0000xz-HJ for emacs-orgmode@gnu.org; Tue, 15 Sep 2009 09:00:16 -0400 In-Reply-To: <83ljkglkkl.fsf@ymail.com> (Water Lin's message of "Tue, 15 Sep 2009 15:43:22 +0800") 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: Water Lin Cc: emacs-orgmode@gnu.org Water Lin writes: > I am using org to write my draft. After finish the writing, I will copy > to my blog poster and edit something like linker, pictures. > > This way works but is a little slow and should be very careful or else > it is very easy to forget some linkers, pictures, etc. > > I am trying to find a way to write full text in org mode. I think it is > a good way to do following: > --------------------------- > After I finish the writing, I select the block of my article, then use a > command to publish it to basic html and copy the html code into memory. > > > I don't need whole html elements, just need the customized html code for > the block. > > I try to read the org help doc but can't find anything related to > it. Please give me a start stone, thanks....... C-u M-x org-export-region-as-html or C-u C-c C-e R >From the doc-string: ,---- | org-export-region-as-html is an interactive compiled Lisp function in | `org-html.el'. | | (org-export-region-as-html beg end &optional body-only buffer) | | Convert region from beg to end in org-mode buffer to HTML. | If prefix arg body-only is set, omit file header, footer, and table of | contents, and only produce the region of converted text, useful for | cut-and-paste operations. | If buffer is a buffer or a string, use/create that buffer as a target | of the converted HTML. If buffer is the symbol `string', return the | produced HTML as a string and leave not buffer behind. For example, | a Lisp program could call this function in the following way: | | (setq html (org-export-region-as-html beg end t 'string)) | | When called interactively, the output buffer is selected, and shown | in a window. A non-interactive call will only return the buffer. `---- Best, Matt