From mboxrd@z Thu Jan 1 00:00:00 1970 From: James TD Smith Subject: [PATCH 1/2] Fix a bug in org-link-display-format. Date: Wed, 11 Nov 2009 18:17:19 +0000 Message-ID: <1257963440-8651-1-git-send-email-ahktenzero@mohorovi.cc> Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N8Hl2-0000Zl-2m for emacs-orgmode@gnu.org; Wed, 11 Nov 2009 13:17:28 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N8Hkx-0000Rx-9B for emacs-orgmode@gnu.org; Wed, 11 Nov 2009 13:17:27 -0500 Received: from [199.232.76.173] (port=52853 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N8Hkw-0000Rg-T0 for emacs-orgmode@gnu.org; Wed, 11 Nov 2009 13:17:22 -0500 Received: from 81-86-40-42.dsl.pipex.com ([81.86.40.42]:63193 helo=yog-sothoth.mohorovi.cc) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N8Hkw-0001Pi-11 for emacs-orgmode@gnu.org; Wed, 11 Nov 2009 13:17:22 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org It would break if there was a '\' in the link description. --- lisp/ChangeLog | 4 ++++ lisp/org.el | 9 +++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 112e0bc..0ce2d50 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -72,6 +72,10 @@ * org-docbook.el (org-export-as-docbook): Protect targets in verbatim emphasis. +2009-11-07 James TD Smith + + * org.el (org-link-display-format): Should be literal replacement. + 2009-11-06 Carsten Dominik * org-clock.el (org-show-notification): Handle messages that diff --git a/lisp/org.el b/lisp/org.el index c0afd10..ed32b94 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -17575,10 +17575,11 @@ Show the heading too, if it is currently invisible." if no description is present" (save-match-data (if (string-match org-bracket-link-analytic-regexp link) - (replace-match (or (match-string 5 link) - (concat (match-string 1 link) - (match-string 3 link))) - nil nil link) + (replace-match (if (match-end 5) + (match-string 5 link) + (concat (match-string 1 link) + (match-string 3 link))) + nil t link) link))) ;; Speedbar support -- 1.6.5