From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jambunathan K Newsgroups: gmane.emacs.bugs Subject: bug#9914: 24.0.91; htmlfontify.el: Add support for code block fontification on ODT export Date: Mon, 12 Mar 2012 14:48:10 +0530 Message-ID: <81ipiadvot.fsf@gmail.com> References: <87vcmaxqtu.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1331543978 1103 80.91.229.3 (12 Mar 2012 09:19:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 12 Mar 2012 09:19:38 +0000 (UTC) Cc: Vivek Dasmohapatra , 9914@debbugs.gnu.org To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 12 10:19:36 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S71Pd-0000k0-Qu for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Mar 2012 10:19:30 +0100 Original-Received: from localhost ([::1]:52444 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S71Pd-00080z-3q for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Mar 2012 05:19:29 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57564) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S71PS-0007zW-Vg for bug-gnu-emacs@gnu.org; Mon, 12 Mar 2012 05:19:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S71PM-0003xw-J8 for bug-gnu-emacs@gnu.org; Mon, 12 Mar 2012 05:19:18 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39195) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S71PM-0003xr-DM for bug-gnu-emacs@gnu.org; Mon, 12 Mar 2012 05:19:12 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1S71sD-0008Ab-Nr for bug-gnu-emacs@gnu.org; Mon, 12 Mar 2012 05:49:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jambunathan K Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Mar 2012 09:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9914 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 9914-submit@debbugs.gnu.org id=B9914.133154570731365 (code B ref 9914); Mon, 12 Mar 2012 09:49:01 +0000 Original-Received: (at 9914) by debbugs.gnu.org; 12 Mar 2012 09:48:27 +0000 Original-Received: from localhost ([127.0.0.1]:46027 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S71rf-00089p-5a for submit@debbugs.gnu.org; Mon, 12 Mar 2012 05:48:27 -0400 Original-Received: from mail-pz0-f44.google.com ([209.85.210.44]:58363) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S71rQ-00089V-PT for 9914@debbugs.gnu.org; Mon, 12 Mar 2012 05:48:26 -0400 Original-Received: by dakl33 with SMTP id l33so4367189dak.3 for <9914@debbugs.gnu.org>; Mon, 12 Mar 2012 02:18:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=WA7P/6DzbIYfwOyIJALR3lh+B25d5+nCtW2yy8zkbm4=; b=rvw2bfJHRmoa5YTjyBcCTe3PfqP9MtEBCQEN8l/qeglzRgYYij6dzRnNYQXoDfzWEB RTCSA4SoXpeJowVUPMWZjWCAsn/mgHYXtgwIdCmvWVpgNJh0rgORZBeJEeXFiymZczVK M5QEofR8vOhZjbXKOSdem6QbJhs/RaXAs9dXfgWjxDR7l+qk68KNIVEjIKVE7Z2huTR7 ioXG1vboX+nAhjuWCGOsN6F8W9q4rXiGbMTgz2XFXmu4aHWWYN9EtvKzjpLNPuDCQ3tJ 90WP5Uoeb36PELz6/pCQNY77BxcJBYxjSRUBLoxF0J+6MmHH+iYJxobIWtkrIfjjEeky hO0g== Original-Received: by 10.68.236.73 with SMTP id us9mr1010056pbc.116.1331543902129; Mon, 12 Mar 2012 02:18:22 -0700 (PDT) Original-Received: from JAMBU-NETBOOK ([101.63.187.254]) by mx.google.com with ESMTPS id q8sm9702699pbi.1.2012.03.12.02.18.17 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 12 Mar 2012 02:18:21 -0700 (PDT) In-Reply-To: <87vcmaxqtu.fsf@gnu.org> (Chong Yidong's message of "Mon, 12 Mar 2012 14:42:53 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (windows-nt) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:57704 Archived-At: Thanks Chong. > Jambunathan: Could you write a ChangeLog entry for these changes? There are 5 patches. The patches are generated with "git format-patch" so the changelogs are embedded within the patch themselves. I had downloaded htmlfontify separately and put it under local git before generating the patches. Vivek org-odt.el is part of regular Emacs-24.1 pretest builds. You will find it convenient to proceed as follows. 0. Put the modified htmlfontify.el in to load-path. 1. Export test.org file to ODT with C-c C-e O (or you can use the test.odt file used in the bug report) Open the test.odt with LibreOffice, if you need some visual cues on what the patch does. 2. Open the test.odt file in archive-mode or equivalently you can unzip it. 3. Under test.odt/content.xml file you can see the OpenDocument tags used for markup. 4. Under test.odt/styles.xml you can see the various style-names (the css equivalent) for the various faces. For some insight in to how these changes in htmlfontify are used, 1. Changes in content.xml is being generated by `org-odt-format-source-code-or-example-colored'. The main entry point in to htmlfontify library is `htmlfontify-string' - Fontification happens line by line as opposed to en-bloc. 2. Changes in styles.xml is being generated by `org-odt-insert-custom-styles-for-srcblocks'. An Orgmode file can have multiple src blocks of different languages. So a single export of Org file can potentially run multiple htmlfontifys. As a result styles are collected, duplicates eliminated and unique stylenames dumped to styles.xml at the end of the export. I will be happy to provide further clarifications. Jambunathan K.