From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: intra links and worg Date: Thu, 06 Feb 2014 17:31:37 +0100 Message-ID: <87ob2ki4nq.fsf@bzg.ath.cx> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33587) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBRrm-0004ZH-OE for emacs-orgmode@gnu.org; Thu, 06 Feb 2014 11:32:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBRrg-000579-Ot for emacs-orgmode@gnu.org; Thu, 06 Feb 2014 11:31:54 -0500 Received: from rs249.mailgun.us ([209.61.151.249]:35943) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBRrg-00056u-Hd for emacs-orgmode@gnu.org; Thu, 06 Feb 2014 11:31:48 -0500 In-Reply-To: (Alan Schmitt's message of "Thu, 06 Feb 2014 13:54:36 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Alan Schmitt Cc: emacs-orgmode --=-=-= Content-Type: text/plain Hi Alan, if you can, please test this quick patch. All tests pass fine but it's not the definitive patch as there are other issues in this areas we need to check first. But tests will help, as always. Thanks! --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=fix-org-escape-chars-in-links.patch diff --git a/lisp/org.el b/lisp/org.el index 27aeccb..50fa5ce 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -9834,17 +9834,18 @@ If optional argument MERGE is set, merge TABLE into (setq table (cons defchr table)))) org-link-escape-chars)) ((null table) (setq table org-link-escape-chars))) - (mapconcat - (lambda (char) - (if (or (member char table) - (and (or (< char 32) (= char ?\%) (> char 126)) - org-url-hexify-p)) - (mapconcat (lambda (sequence-element) - (format "%%%.2X" sequence-element)) - (or (encode-coding-char char 'utf-8) - (error "Unable to percent escape character: %s" - (char-to-string char))) "") - (char-to-string char))) text "")) + (if (string-match "^\*[[:alnum:]]+" text) text + (mapconcat + (lambda (char) + (if (or (member char table) + (and (or (< char 32) (= char ?\%) (> char 126)) + org-url-hexify-p)) + (mapconcat (lambda (sequence-element) + (format "%%%.2X" sequence-element)) + (or (encode-coding-char char 'utf-8) + (error "Unable to percent escape character: %s" + (char-to-string char))) "") + (char-to-string char))) text ""))) (defun org-link-escape-browser (text) (if (org-string-match-p --=-=-= Content-Type: text/plain -- Bastien --=-=-=--