* Unescape :help-echo in links
@ 2013-03-20 19:27 Florian Beck
2013-03-20 23:01 ` Bastien
0 siblings, 1 reply; 5+ messages in thread
From: Florian Beck @ 2013-03-20 19:27 UTC (permalink / raw)
To: emacs-orgmode
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: Unescape :help-echo in links
2013-03-20 19:27 Unescape :help-echo in links Florian Beck
@ 2013-03-20 23:01 ` Bastien
2013-03-21 20:22 ` Florian Beck
0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2013-03-20 23:01 UTC (permalink / raw)
To: Florian Beck; +Cc: emacs-orgmode
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Unescape :help-echo in links
2013-03-20 23:01 ` Bastien
@ 2013-03-21 20:22 ` Florian Beck
2013-04-08 15:55 ` Bastien
2013-04-14 10:20 ` Bastien
0 siblings, 2 replies; 5+ messages in thread
From: Florian Beck @ 2013-03-21 20:22 UTC (permalink / raw)
To: Bastien; +Cc: Florian Beck, emacs-orgmode
[-- 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
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-04-14 10:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-20 19:27 Unescape :help-echo in links Florian Beck
2013-03-20 23:01 ` Bastien
2013-03-21 20:22 ` Florian Beck
2013-04-08 15:55 ` Bastien
2013-04-14 10:20 ` Bastien
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).