emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Request to patch the =org-html-fontify-code= function in =ox-html.el=
@ 2014-07-20 14:55 Kaushal
  2014-07-20 18:15 ` Nick Dokos
  0 siblings, 1 reply; 3+ messages in thread
From: Kaushal @ 2014-07-20 14:55 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 762 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 3335 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Request to patch the =org-html-fontify-code= function in =ox-html.el=
  2014-07-20 14:55 Request to patch the =org-html-fontify-code= function in =ox-html.el= Kaushal
@ 2014-07-20 18:15 ` Nick Dokos
  2014-07-28  9:07   ` Bastien
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Dokos @ 2014-07-20 18:15 UTC (permalink / raw)
  To: emacs-orgmode

Kaushal <kaushal.modi@gmail.com> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Request to patch the =org-html-fontify-code= function in =ox-html.el=
  2014-07-20 18:15 ` Nick Dokos
@ 2014-07-28  9:07   ` Bastien
  0 siblings, 0 replies; 3+ messages in thread
From: Bastien @ 2014-07-28  9:07 UTC (permalink / raw)
  To: Nick Dokos; +Cc: emacs-orgmode

Nick Dokos <ndokos@gmail.com> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-28 17:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-20 14:55 Request to patch the =org-html-fontify-code= function in =ox-html.el= Kaushal
2014-07-20 18:15 ` Nick Dokos
2014-07-28  9:07   ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).