From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takafumi Arakaki Subject: [PATCH] Use font-lock-face property in org-src-font-lock-fontify-block? Date: Thu, 27 Sep 2012 12:55:29 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=20cf3074d58c402c2504caacc8ab Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THBl1-0007vo-P0 for emacs-orgmode@gnu.org; Thu, 27 Sep 2012 06:55:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1THBl0-00013k-D4 for emacs-orgmode@gnu.org; Thu, 27 Sep 2012 06:55:51 -0400 Received: from mail-qc0-f169.google.com ([209.85.216.169]:37422) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THBl0-00012u-7a for emacs-orgmode@gnu.org; Thu, 27 Sep 2012 06:55:50 -0400 Received: by qcqt2 with SMTP id t2so1716838qcq.0 for ; Thu, 27 Sep 2012 03:55:49 -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 --20cf3074d58c402c2504caacc8ab Content-Type: text/plain; charset=ISO-8859-1 Hi, I am trying to use org-src.el bundled in org-mode to support syntax highlighgint for multiple languages in my IPython notebook client in Emacs (EIN) [1]. It works very well but I need to patch (please see the attached file) it to use. The problem is that fontification is gone when I edit the buffer. I found that I can workaround this problem by putting font-lock-face property instead of face property. When the fontification vanishes, (text-properties-at (point)) returns (font-lock-fontified t fontified t) Before the fontification vanishes (before inserting a cell), (text-properties-at (point)) returns this at the same point: (font-lock-multiline t face font-lock-keyword-face font-lock-fontified t fontified t) I couldn't reproduce this problem outside of EIN (in org-mode or other plain buffers). I am thinking about including my version of org-src-font-lock-fontify-block in EIN, but Dan Davison suggested to ask in this ML because it could be a problem in org-mode too. Does anyone know what is happening here? Could this happen in org-mode too? See [2] for the original discussion. [1] https://github.com/tkf/emacs-ipython-notebook/ [2] https://github.com/tkf/emacs-ipython-notebook/issues/2 --20cf3074d58c402c2504caacc8ab Content-Type: application/octet-stream; name="org-src.patch" Content-Disposition: attachment; filename="org-src.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_h7lqeqo20 ZGlmZiAtLWdpdCBhL2xpc3Avb3JnLXNyYy5lbCBiL2xpc3Avb3JnLXNyYy5lbAppbmRleCA0OTZk YWZlLi4xZTNhMWQ4IDEwMDY0NAotLS0gYS9saXNwL29yZy1zcmMuZWwKKysrIGIvbGlzcC9vcmct c3JjLmVsCkBAIC03OTYsNyArNzk2LDcgQEAgZm9udGlmaWNhdGlvbiBvZiBjb2RlIGJsb2NrcyBz ZWUgYG9yZy1zcmMtZm9udGlmeS1ibG9jaycgYW5kCiAgICAgICAgKHNldHEgcG9zIChwb2ludC1t aW4pKQogICAgICAgICh3aGlsZSAoc2V0cSBuZXh0IChuZXh0LXNpbmdsZS1wcm9wZXJ0eS1jaGFu Z2UgcG9zICdmYWNlKSkKICAgICAgICAgIChwdXQtdGV4dC1wcm9wZXJ0eQotICAgICAgICAgICgr IHN0YXJ0ICgxLSBwb3MpKSAoKyBzdGFydCBuZXh0KSAnZmFjZQorICAgICAgICAgICgrIHN0YXJ0 ICgxLSBwb3MpKSAoKyBzdGFydCBuZXh0KSAnZm9udC1sb2NrLWZhY2UKICAgICAgICAgICAoZ2V0 LXRleHQtcHJvcGVydHkgcG9zICdmYWNlKSBvcmctYnVmZmVyKQogICAgICAgICAgKHNldHEgcG9z IG5leHQpKSkKICAgICAgKGFkZC10ZXh0LXByb3BlcnRpZXM= --20cf3074d58c402c2504caacc8ab--