From: Kaushal <kaushal.modi@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>,
emacs-orgmode@gnu.org, bzg@altern.org
Subject: Re: Bug: Export to html inserts strange unicode characters at line breaks because of fci-mode [8.2.7c (8.2.7c-64-g01f736-elpa @ /home/kmodi/.emacs.d/elpa/org-20140915/)]
Date: Thu, 04 Jun 2015 20:10:43 +0000 [thread overview]
Message-ID: <CAFyQvY1DE05LhYvPPD3jpUt8LvtixufyfeJkUE=GGDkbkAp7-A@mail.gmail.com> (raw)
In-Reply-To: <87lhp4n9wa.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2740 bytes --]
Hi all,
I was finally able to solve this problem without tweaking anything inside
ox-html.el
I noticed that htmlize has provided few hooks and I used those.
Here is the code that I now have in my emacs init to disable fci (and
flyspell too) while htmlize-region is doing its job:
(defvar modi/htmlize-initial-fci-state nil
"Variable to store the state of `fci-mode' when `htmlize-buffer' is
called.")
(defvar modi/htmlize-initial-flyspell-state nil
"Variable to store the state of `flyspell-mode' when `htmlize-buffer'
is called.")
(defun modi/htmlize-before-hook-fn ()
(when (fboundp 'fci-mode)
(setq modi/htmlize-initial-fci-state fci-mode)
(when fci-mode
(fci-mode -1)))
(when (fboundp 'flyspell-mode)
(setq modi/htmlize-initial-flyspell-state flyspell-mode)
(when flyspell-mode
(flyspell-mode -1))))
(add-hook 'htmlize-before-hook #'modi/htmlize-before-hook-fn)
(defun modi/htmlize-after-hook-fn ()
(when (fboundp 'fci-mode)
(when modi/htmlize-initial-fci-state
(fci-mode 1)))
(when (fboundp 'flyspell-mode)
(when modi/htmlize-initial-flyspell-state
(flyspell-mode 1))))
(add-hook 'htmlize-after-hook #'modi/htmlize-after-hook-fn)
I would suggest that that fci-mode specific code be removed from the master.
On Sat, Sep 27, 2014 at 3:25 PM Aaron Ecay <aaronecay@gmail.com> wrote:
> Hi Nicolas and Kaushal,
>
> 2014ko irailak 26an, Nicolas Goaziou-ek idatzi zuen:
> >
> > Hello,
> >
> > Kaushal <kaushal.modi@gmail.com> writes:
> >
> >> I have fci-mode installed and enabled for programming modes.
> >>
> >> When org exports to html, htmlize figures out the syntax highlighting of
> >> the code by calling =(funcall lang-mode)=.
> >>
> >> That activates =fci-mode=.
> >>
> >> =fci-mode= shows the fill column using a unicode character. The issue is
> >> that org export to html exports that character as well.
> >>
> >> Those characters show up in html as below!
> >> http://i.imgur.com/8WplTqw.png
> >>
> >> So the solution is to fix the =orx-html-fontify-code= function.
> >
> > I don't think so. `fill-column-indicator' is not even in core Emacs. We
> > shouldn't provide a workaround for every package out there.
>
> For better or for worse, Bastien already installed this fix on master as
> commit 44aaaad8, in response to Kaushal’s earlier bug report on this
> issue. See <http://mid.gmane.org/87oaw92y6s.fsf@bzg.ath.cx>.
>
> The fix has not yet been merged to the release branch, so it won’t yet
> show up in the ELPA version of org which Kaushal seems to be using.
>
> --
> Aaron Ecay
>
[-- Attachment #2: Type: text/html, Size: 3849 bytes --]
next prev parent reply other threads:[~2015-06-04 20:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-25 19:50 Bug: Export to html inserts strange unicode characters at line breaks because of fci-mode [8.2.7c (8.2.7c-64-g01f736-elpa @ /home/kmodi/.emacs.d/elpa/org-20140915/)] Kaushal
2014-09-25 23:55 ` Grant Rettke
2014-09-25 23:58 ` Kaushal
2014-09-26 0:05 ` Grant Rettke
2014-09-26 0:50 ` Thorsten Jolitz
2014-09-26 10:02 ` Nicolas Goaziou
2014-09-26 10:19 ` Kaushal
2014-09-27 19:25 ` Aaron Ecay
2015-06-04 20:10 ` Kaushal [this message]
2015-06-05 7:02 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFyQvY1DE05LhYvPPD3jpUt8LvtixufyfeJkUE=GGDkbkAp7-A@mail.gmail.com' \
--to=kaushal.modi@gmail.com \
--cc=bzg@altern.org \
--cc=emacs-orgmode@gnu.org \
--cc=mail@nicolasgoaziou.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.