From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Subject: Request to patch the =org-html-fontify-code= function in =ox-html.el= Date: Sun, 20 Jul 2014 10:55:40 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113363a88697fb04fea131a0 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X8sXL-0008H5-7Y for emacs-orgmode@gnu.org; Sun, 20 Jul 2014 10:56:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X8sXG-0000BF-EA for emacs-orgmode@gnu.org; Sun, 20 Jul 2014 10:56:27 -0400 Received: from mail-oa0-x236.google.com ([2607:f8b0:4003:c02::236]:62049) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X8sXG-0000B9-6K for emacs-orgmode@gnu.org; Sun, 20 Jul 2014 10:56:22 -0400 Received: by mail-oa0-f54.google.com with SMTP id n16so6056346oag.13 for ; Sun, 20 Jul 2014 07:56:21 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --001a113363a88697fb04fea131a0 Content-Type: text/plain; charset=ISO-8859-1 Hi, I have been using org for technical documentation and that involves inserted code snippets. The org to pdf export works great but I faced issues when exporting to html. After some digging around, I figured that having fci-mode enabled on a LANG-mode-hook caused insertion of some strange unicode characters in the html converted version. Full details are in my reddit post here: http://www.reddit.com/r/emacs/comments/2b5x5g/funny_characters_appended_at_new_line_to_source/ To fix this problem by adding the following code after the line (funcall lang-mode) in the org-html-fontify-code defun in ox-html.el. (when (require 'fill-column-indicator nil 'noerror) (fci-mode -1)) Can this fix be integrated into ox-html.el? Thanks. -- Kaushal Modi --001a113363a88697fb04fea131a0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,

I have been using org for technical documen= tation and that involves inserted code snippets. =A0The org to pdf export w= orks great but I faced issues when exporting to html.

After some di= gging around, I figured that having fci-mode enabled on a LANG-mode-hook ca= used insertion of some strange unicode characters in the html converted ver= sion.


To fix= this problem by adding the following code after the line=A0(funcall lang-mode)=A0in t= he=A0org-html-fontify-c= ode=A0defun in=A0ox-html.el.
(when (require 'fill-column-indicator nil 'noerr=
or)
    (fci-mode -1))

Can this fix be integrated into o= x-html.el?=A0


Thanks.


--
= Kaushal Modi
--001a113363a88697fb04fea131a0-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Request to patch the =org-html-fontify-code= function in =ox-html.el= Date: Sun, 20 Jul 2014 14:15:11 -0400 Message-ID: <87ha2bc2xc.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X8ve1-0006e7-BR for emacs-orgmode@gnu.org; Sun, 20 Jul 2014 14:15:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X8vdv-0007Lw-GS for emacs-orgmode@gnu.org; Sun, 20 Jul 2014 14:15:33 -0400 Received: from plane.gmane.org ([80.91.229.3]:49899) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X8vdv-0007Ls-6x for emacs-orgmode@gnu.org; Sun, 20 Jul 2014 14:15:27 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1X8vds-0006jb-DS for emacs-orgmode@gnu.org; Sun, 20 Jul 2014 20:15:24 +0200 Received: from pool-98-110-160-12.bstnma.fios.verizon.net ([98.110.160.12]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 20 Jul 2014 20:15:24 +0200 Received: from ndokos by pool-98-110-160-12.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 20 Jul 2014 20:15:24 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Kaushal writes: > Full details are in my reddit post here: > http://www.reddit.com/r/emacs/comments/2b5x5g/funny_characters_appended_at_new_line_to_source/ > > To fix this problem by adding the following code after the > line (funcall lang-mode) in the org-html-fontify-code defun > in ox-html.el. > > (when (require 'fill-column-indicator nil 'noerror) > (fci-mode -1)) > > Can this fix be integrated into ox-html.el?  > Not really: the above would cause an error if fci-mode is undefined. You'll have to add a bit more checking before calling it - check out the doc for fboundp: C-h f fboundp RET -- Nick From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Request to patch the =org-html-fontify-code= function in =ox-html.el= Date: Mon, 28 Jul 2014 11:07:28 +0200 Message-ID: <87oaw92y6s.fsf@bzg.ath.cx> References: <87ha2bc2xc.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBofp-0007Ws-PP for emacs-orgmode@gnu.org; Mon, 28 Jul 2014 13:25:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XBofY-0005jH-8o for emacs-orgmode@gnu.org; Mon, 28 Jul 2014 13:25:21 -0400 Received: from mail-s76.mailgun.info ([184.173.153.204]:55502) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBofY-0005NT-5t for emacs-orgmode@gnu.org; Mon, 28 Jul 2014 13:25:04 -0400 In-Reply-To: <87ha2bc2xc.fsf@gmail.com> (Nick Dokos's message of "Sun, 20 Jul 2014 14:15:11 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nick Dokos Cc: emacs-orgmode@gnu.org Nick Dokos writes: >> To fix this problem by adding the following code after the >> line (funcall lang-mode) in the org-html-fontify-code defun >> in ox-html.el. >> >> (when (require 'fill-column-indicator nil 'noerror) >> (fci-mode -1)) >> >> Can this fix be integrated into ox-html.el?  >> > > Not really: the above would cause an error if fci-mode is > undefined. You'll have to add a bit more checking before > calling it - check out the doc for fboundp: > > C-h f fboundp RET I added such a check in `org-html-fontify-code', thanks, -- Bastien