From mboxrd@z Thu Jan 1 00:00:00 1970 From: a@xkqr.org (Christoffer =?utf-8?Q?Stjernl=C3=B6f?=) Subject: [PATCH] ox.el: Fix extra character deleted in org-export--update-included-link Date: Sun, 03 Nov 2019 14:14:35 +0100 Message-ID: <86tv7lm79g.fsf@xkqr.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:59221) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iRFiO-0005Ht-Gz for emacs-orgmode@gnu.org; Sun, 03 Nov 2019 08:14:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iRFiN-0002r5-BZ for emacs-orgmode@gnu.org; Sun, 03 Nov 2019 08:14:44 -0500 Received: from new4-smtp.messagingengine.com ([66.111.4.230]:40841) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iRFiM-0002qS-Sj for emacs-orgmode@gnu.org; Sun, 03 Nov 2019 08:14:43 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 2404164D8 for ; Sun, 3 Nov 2019 08:14:41 -0500 (EST) Received: from localhost (vps.xkqr.org [109.74.206.55]) by mail.messagingengine.com (Postfix) with ESMTPA id 8C0718005A for ; Sun, 3 Nov 2019 08:14:40 -0500 (EST) 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" To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable * ox.el (org-export--update-included-link): Fix bug. (org-export--update-included-link): Delete region only until one less than (org-element-property :end link). The old behaviour meant that e.g. the following headline could fail to parse correctly after inclusion: [[file:something.org][Title]] :tags:following:immediately because it would be converted to [[file:path/to/something.org][Title]]:tags:following:immediately where the whitespace was necessary for Org to understand that the tags indeed were tags. TINYCHANGE =2D-- lisp/ox.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ox.el b/lisp/ox.el index 5b4134ecc..6c1d1b455 100644 =2D-- a/lisp/ox.el +++ b/lisp/ox.el @@ -3468,7 +3468,7 @@ Move point after the link." (org-element-property :contents-end link))))) (org-element-put-property new-link :path new-path) (delete-region (org-element-property :begin link) =2D (org-element-property :end link)) + (1- (org-element-property :end link))) (insert (org-element-link-interpreter new-link contents)))))) =20 (defun org-export--prepare-file-contents =2D-=20 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQSnhhl1PrVuOSPiCuJ63EO1dkwMBQUCXb7SuwAKCRB63EO1dkwM Bf6tAQDe0GHdp8o/+wSRwvD1SV7rhfbrN4xDvNGBrFUbRa1NqgD9Hh9kEtxsxN64 aL0BW3XVL0lAFnd4g2NYQkJiz1sTBgA= =WSDp -----END PGP SIGNATURE----- --=-=-=--