From: Kyle Meyer <kyle@kyleam.com>
To: emacs-orgmode@gnu.org
Cc: 22399@debbugs.gnu.org
Subject: Re: bug#22399: org-mode fontification
Date: Tue, 19 Jan 2016 13:04:15 -0500 [thread overview]
Message-ID: <87d1sx8mzk.fsf@kyleam.com> (raw)
In-Reply-To: <87wpr5zirr.fsf@kyleam.com> (Kyle Meyer's message of "Tue, 19 Jan 2016 10:33:12 -0500")
[-- Attachment #1: Type: text/plain, Size: 366 bytes --]
Kyle Meyer <kyle@kyleam.com> writes:
[...]
> However, it's easy enough to switch to using an org-font-lock-ensure
> variant that avoids these issues, so I will do that (in an updated
> patch and on Org's maint).
I've attached updated patches against emacs-25. If these are applied to
the Emacs repo, I'll backport the new font-lock-ensure alias to Org's
maint.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org-compat-Fix-font-lock-ensure-alias.patch --]
[-- Type: text/x-patch, Size: 1049 bytes --]
From d9a8014e3919c328bf2b6acbe9d9127f3b06b5e1 Mon Sep 17 00:00:00 2001
From: Kyle Meyer <kyle@kyleam.com>
Date: Tue, 19 Jan 2016 12:53:04 -0500
Subject: [PATCH 1/2] org-compat: Fix font-lock-ensure alias
* lisp/org/org-compat.el (org-font-lock-ensure): Fix check for
font-lock-ensure. Make compatibility function's arguments optional to
match with font-lock-ensure's. (Bug#22399)
---
lisp/org/org-compat.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el
index 6403d4d..cf6aafc 100644
--- a/lisp/org/org-compat.el
+++ b/lisp/org/org-compat.el
@@ -479,9 +479,9 @@ org-no-popups
(not (null pos)))))
(defalias 'org-font-lock-ensure
- (if (fboundp 'org-font-lock-ensure)
+ (if (fboundp 'font-lock-ensure)
#'font-lock-ensure
- (lambda (_beg _end) (font-lock-fontify-buffer))))
+ (lambda (&optional _beg _end) (font-lock-fontify-buffer))))
(defun org-floor* (x &optional y)
"Return a list of the floor of X and the fractional part of X.
--
2.7.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-org-src-Use-font-lock-fontify-buffer-for-blocks.patch --]
[-- Type: text/x-patch, Size: 1176 bytes --]
From 7b2e8cd23ee5326ca2b0845bed8a5d111a2a3b17 Mon Sep 17 00:00:00 2001
From: Kyle Meyer <kyle@kyleam.com>
Date: Tue, 19 Jan 2016 12:53:22 -0500
Subject: [PATCH 2/2] org-src: Use font-lock-fontify-buffer for blocks
* lisp/org/org-src.el (org-src-font-lock-fontify-block): Use
font-lock-fontify-buffer because font-lock-ensure does not display
source block fonts.
This corresponds to 003a0f10695f035e844d844eacb1a86a6d2df934 in the Org
repo.
---
lisp/org/org-src.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/org/org-src.el b/lisp/org/org-src.el
index 8e06aaa..5548f52 100644
--- a/lisp/org/org-src.el
+++ b/lisp/org/org-src.el
@@ -916,7 +916,9 @@ org-src-font-lock-fontify-block
(delete-region (point-min) (point-max))
(insert string " ") ;; so there's a final property change
(unless (eq major-mode lang-mode) (funcall lang-mode))
- (org-font-lock-ensure)
+ ;; Avoid `font-lock-ensure', which does not display fonts in
+ ;; source block.
+ (font-lock-fontify-buffer)
(setq pos (point-min))
(while (setq next (next-single-property-change pos 'face))
(put-text-property
--
2.7.0
[-- Attachment #4: Type: text/plain, Size: 9 bytes --]
--
Kyle
next prev parent reply other threads:[~2016-01-19 18:04 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-18 13:59 bug#22399: org-mode fontification Phillip Lord
2016-01-18 14:16 ` Rasmus
2016-01-18 18:05 ` Phillip Lord
2016-01-18 18:48 ` Rasmus
2016-01-18 19:27 ` Kyle Meyer
2016-01-19 6:32 ` Kyle Meyer
2016-01-19 6:32 ` Kyle Meyer
2016-01-19 11:25 ` Phillip Lord
2016-01-19 11:25 ` Phillip Lord
2016-01-19 6:32 ` Kyle Meyer
2016-01-19 8:51 ` Rasmus
2016-01-19 8:51 ` Rasmus
2016-01-19 15:33 ` Kyle Meyer
2016-01-19 18:04 ` Kyle Meyer [this message]
2016-01-19 18:04 ` Kyle Meyer
2016-01-19 19:05 ` Rasmus
2016-01-19 19:05 ` Rasmus
2016-01-20 11:39 ` Phillip Lord
2016-01-20 11:39 ` bug#22399: [O] " Phillip Lord
2016-01-20 17:18 ` Kyle Meyer
2016-01-20 22:02 ` Stefan Monnier
2016-01-21 0:44 ` Kyle Meyer
2016-01-21 0:44 ` Kyle Meyer
2016-01-25 14:30 ` Stefan Monnier
2016-01-26 6:58 ` Kyle Meyer
2016-01-26 13:06 ` Stefan Monnier
2016-01-26 13:06 ` Stefan Monnier
2016-01-26 15:27 ` Kyle Meyer
2016-02-01 13:50 ` Stefan Monnier
2016-02-03 6:38 ` Bastien Guerry
2016-02-03 6:38 ` Bastien Guerry
2016-02-03 6:51 ` Kyle Meyer
2016-02-03 6:55 ` Bastien Guerry
2016-02-11 18:18 ` Phillip Lord
2016-02-11 18:18 ` Phillip Lord
2016-02-03 6:55 ` Bastien Guerry
2016-02-03 6:51 ` Kyle Meyer
2016-02-01 13:50 ` Stefan Monnier
2016-01-26 15:27 ` Kyle Meyer
2016-01-26 6:58 ` Kyle Meyer
2016-01-25 14:30 ` Stefan Monnier
2016-01-20 22:02 ` Stefan Monnier
2016-01-20 17:18 ` Kyle Meyer
2016-01-19 15:33 ` Kyle Meyer
2016-01-19 6:32 ` Kyle Meyer
2016-01-18 19:27 ` Kyle Meyer
2016-01-18 18:48 ` Rasmus
2016-01-18 18:05 ` Phillip Lord
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=87d1sx8mzk.fsf@kyleam.com \
--to=kyle@kyleam.com \
--cc=22399@debbugs.gnu.org \
--cc=emacs-orgmode@gnu.org \
/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.