Hi, I use a lot of custom links (for citations) and cannot stand the escaped mess in the help-echo. So I've been using the patch below for quite some time without any noticable slowdown. diff --git a/lisp/org.el b/lisp/org.el index bf74afd..470f93d 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5806,10 +5806,7 @@ by a #." (if (and (re-search-forward org-bracket-link-regexp limit t) (not (org-in-src-block-p))) (let* ((hl (org-match-string-no-properties 1)) - (help (concat "LINK: " hl)) - ;; FIXME: Above we should remove the escapes. But that - ;; requires another match, protecting match data, a lot - ;; of overhead for font-lock. + (help (concat "LINK: " (save-match-data (org-link-unescape hl)))) (ip (org-maybe-intangible (list 'invisible 'org-link 'keymap org-mouse-map 'mouse-face 'highlight -- Florian Beck
Hi Florian,
Florian Beck <fb@miszellen.de> writes:
> I use a lot of custom links (for citations) and cannot stand the escaped
> mess in the help-echo. So I've been using the patch below for quite some
> time without any noticable slowdown.
Looks good.
Can you resend it as a proper patch with a changelog?
Thanks!
--
Bastien
[-- Attachment #1: Type: text/plain, Size: 103 bytes --] Bastien <bzg@altern.org> writes: > Can you resend it as a proper patch with a changelog? Like this? [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-lisp-org.el-org-activate-bracket-links-remove-escape.patch --] [-- Type: text/x-diff, Size: 1050 bytes --] From ca9c612208a2528a27b648973cfbf6e8d0801f94 Mon Sep 17 00:00:00 2001 From: Florian Beck <fb@miszellen.de> Date: Thu, 21 Mar 2013 21:15:50 +0100 Subject: [PATCH] Unescape :help-echo for links * lisp/org.el (org-activate-bracket-links): remove escapes from help string TINYCHANGE --- lisp/org.el | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 7aac63b..3fbd549 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5806,10 +5806,7 @@ by a #." (if (and (re-search-forward org-bracket-link-regexp limit t) (not (org-in-src-block-p))) (let* ((hl (org-match-string-no-properties 1)) - (help (concat "LINK: " hl)) - ;; FIXME: Above we should remove the escapes. But that - ;; requires another match, protecting match data, a lot - ;; of overhead for font-lock. + (help (concat "LINK: " (save-match-data (org-link-unescape hl)))) (ip (org-maybe-intangible (list 'invisible 'org-link 'keymap org-mouse-map 'mouse-face 'highlight -- 1.7.10.4 [-- Attachment #3: Type: text/plain, Size: 19 bytes --] -- Florian Beck
Florian Beck <fb@miszellen.de> writes:
> Bastien <bzg@altern.org> writes:
>
>> Can you resend it as a proper patch with a changelog?
>
> Like this?
Yes, thanks. I don't notice any slow down but I only tried
with 24.4 and my machine is quite recent/powerful.
I'd be more comfortable applying the change if someone can
test it with Emacs 23.x and an old machine and a big file
with many links.
Copying Sébastien because I know he's got an old machine ;)
--
Bastien
Hi Florian,
Florian Beck <fb@miszellen.de> writes:
> Bastien <bzg@altern.org> writes:
>
>> Can you resend it as a proper patch with a changelog?
>
> Like this?
I've now applied this, I didn't notice any slowdown too.
Thanks,
--
Bastien