* [PATCH] [BUG] Bad fontification in full displayed links
@ 2021-07-09 9:15 Juan Manuel Macías
2021-07-10 1:50 ` Ihor Radchenko
0 siblings, 1 reply; 4+ messages in thread
From: Juan Manuel Macías @ 2021-07-09 9:15 UTC (permalink / raw)
To: orgmode
[-- Attachment #1: Type: text/plain, Size: 178 bytes --]
Hi,
To reproduce the bug:
1. Put some link: [[target][description]]
2. Run `org-toggle-link-display'
As a possible fix I'm attaching this patch.
Best regards,
Juan Manuel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org.el-prevent-partial-fontification-link-display-full.patch --]
[-- Type: text/x-patch, Size: 1252 bytes --]
From caf32a7e1fb1b4bddfa011520f5403d5b6b19ddd Mon Sep 17 00:00:00 2001
From: Juan Manuel Macias <maciaschain@posteo.net>
Date: Tue, 8 Jun 2021 01:55:02 +0200
Subject: [PATCH] org.el: prevent partial fontification when a link is
displayed full
* lisp/org.el (org-activate-links): apply `face-property' variable in
other cases when handle invisible parts in bracket links
---
lisp/org.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/org.el b/lisp/org.el
index 1bd9e02eb..b55d8798a 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5224,9 +5224,11 @@ This includes angle, plain, and bracket links."
,(or (org-link-get-parameter type :display)
'org-link))
properties)))
+ (add-face-text-property start visible-start face-property)
(add-text-properties start visible-start hidden)
- (add-face-text-property visible-start visible-end face-property)
+ (add-face-text-property visible-start visible-end face-property)
(add-text-properties visible-start visible-end properties)
+ (add-face-text-property visible-end end face-property)
(add-text-properties visible-end end hidden)
(org-rear-nonsticky-at visible-start)
(org-rear-nonsticky-at visible-end)))
--
2.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] [BUG] Bad fontification in full displayed links
2021-07-09 9:15 [PATCH] [BUG] Bad fontification in full displayed links Juan Manuel Macías
@ 2021-07-10 1:50 ` Ihor Radchenko
2021-07-10 12:12 ` Juan Manuel Macías
0 siblings, 1 reply; 4+ messages in thread
From: Ihor Radchenko @ 2021-07-10 1:50 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
Juan Manuel Macías <maciaschain@posteo.net> writes:
> As a possible fix I'm attaching this patch.
> + (add-face-text-property start visible-start face-property)
> + (add-face-text-property visible-start visible-end face-property)
> + (add-face-text-property visible-end end face-property)
Why not just (add-face-text-property start end face-property)?
Best,
Ihor
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] [BUG] Bad fontification in full displayed links
2021-07-10 1:50 ` Ihor Radchenko
@ 2021-07-10 12:12 ` Juan Manuel Macías
2021-07-27 20:02 ` Nicolas Goaziou
0 siblings, 1 reply; 4+ messages in thread
From: Juan Manuel Macías @ 2021-07-10 12:12 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: orgmode
[-- Attachment #1: Type: text/plain, Size: 286 bytes --]
Hi Ihor,
Ihor Radchenko writes:
> Why not just (add-face-text-property start end face-property)?
You are right, I think that solution is much simpler. I attach a
new patch and I have included your name in the commit message, for the
suggestion. Thanks!
Best regards,
Juan Manuel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org.el-prevent-partial-fontification-when-a-link-is-.patch --]
[-- Type: text/x-patch, Size: 1114 bytes --]
From 0e31ba4ce76e436712285b163b8595b0a973da94 Mon Sep 17 00:00:00 2001
From: Juan Manuel Macias <maciaschain@posteo.net>
Date: Sat, 10 Jul 2021 13:53:44 +0200
Subject: [PATCH] org.el: prevent partial fontification when a link is
displayed full
* lisp/org.el (org-activate-links): apply `face-property' variable in
other cases when handle invisible parts in bracket
links: `(add-face-text-property start end face-property)' suggestion
from Ihor Radchenko
---
lisp/org.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/org.el b/lisp/org.el
index ffcc5945d..eca12a5e7 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5228,7 +5228,7 @@ This includes angle, plain, and bracket links."
'org-link))
properties)))
(add-text-properties start visible-start hidden)
- (add-face-text-property visible-start visible-end face-property)
+ (add-face-text-property start end face-property)
(add-text-properties visible-start visible-end properties)
(add-text-properties visible-end end hidden)
(org-rear-nonsticky-at visible-start)
--
2.32.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] [BUG] Bad fontification in full displayed links
2021-07-10 12:12 ` Juan Manuel Macías
@ 2021-07-27 20:02 ` Nicolas Goaziou
0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2021-07-27 20:02 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode, Ihor Radchenko
Hello,
Juan Manuel Macías <maciaschain@posteo.net> writes:
> You are right, I think that solution is much simpler. I attach a
> new patch and I have included your name in the commit message, for the
> suggestion. Thanks!
Applied. Thank you.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-07-27 20:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-09 9:15 [PATCH] [BUG] Bad fontification in full displayed links Juan Manuel Macías
2021-07-10 1:50 ` Ihor Radchenko
2021-07-10 12:12 ` Juan Manuel Macías
2021-07-27 20:02 ` Nicolas Goaziou
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.