From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karl Fogel Subject: Bug: Org commit d07d8ff41 breaks square-brace links in recent Emacs. [9.2.6 (release_9.2.6-538-g23113f @ /home/kfogel/src/org-mode/lisp/)] Date: Tue, 17 Sep 2019 15:50:08 -0500 Message-ID: <87h85atzpb.fsf@red-bean.com> Reply-To: Karl Fogel Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:56282) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iAKQQ-0001MO-0K for emacs-orgmode@gnu.org; Tue, 17 Sep 2019 16:50:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iAKQN-0007yp-Sn for emacs-orgmode@gnu.org; Tue, 17 Sep 2019 16:50:13 -0400 Received: from mail-io1-xd30.google.com ([2607:f8b0:4864:20::d30]:45361) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iAKQN-0007yN-J4 for emacs-orgmode@gnu.org; Tue, 17 Sep 2019 16:50:11 -0400 Received: by mail-io1-xd30.google.com with SMTP id f12so10857932iog.12 for ; Tue, 17 Sep 2019 13:50:10 -0700 (PDT) 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 Hi. It appears that commit d07d8ff4163 in Org Mode causes square-brace-enclosed links to display incorrectly. The buggy behavior is simple to describe: if you write a link like this [[URL][LINK-TEXT]] then URL will be displayed instead of LINK-TEXT (and LINK-TEXT goes unused: URL is still also given as the underlying link). I haven't debugged this, but it seems to be caused by this commit in Org Mode: > commit d07d8ff416373e5a4f2d91ed1d7f9cb3a80b8439 > Author: Max Mouratov > AuthorDate: Thu Aug 29 22:48:22 2019 +0500 > Commit: Nicolas Goaziou > CommitDate: Mon Sep 16 18:55:04 2019 +0200 > > Prevent loss of `re-search-forward' results > > * org.el (org-activate-links): `match-beginning' and `match-end` should > be called shortly after `re-search-forward'. Otherwise, they may return > values corresponding to a different invocation of `re-search-forward'. > > TINYCHANGE > > M lisp/org.el Here's how to verify 1) Revert just commit d07d8ff41 in your Org Mode source tree 2) 'make' 3) 'make autoloads' 4) Restart Emacs With that commit reverted, links behave correctly. When I restored the commit (and rebuilt, etc), links behaved incorrectly again. This is all with the latest 'master' branch of Emacs (commit 746b20c237), with latest development Org Mode (commit 23113feb9a, which is only one commit beyond the suspect commit). Best regards, -Karl ------------------------------------------------------------------------ Emacs : GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.11) of 2019-09-17 Package: Org mode version 9.2.6 (release_9.2.6-538-g23113f @ /home/kfogel/src/org-mode/lisp/)