emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Juan Manuel Macías" <maciaschain@posteo.net>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: orgmode <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] [BUG] Bad fontification in full displayed links
Date: Sat, 10 Jul 2021 12:12:47 +0000	[thread overview]
Message-ID: <875yxi9xkw.fsf@posteo.net> (raw)
In-Reply-To: <87k0lz2azm.fsf@localhost> (Ihor Radchenko's message of "Sat, 10 Jul 2021 09:50:21 +0800")

[-- 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


  reply	other threads:[~2021-07-10 12:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2021-07-27 20: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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875yxi9xkw.fsf@posteo.net \
    --to=maciaschain@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@gmail.com \
    /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 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).