emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Karl Fogel <kfogel@red-bean.com>
To: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <87h85atzpb.fsf@red-bean.com> (raw)

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 <mmouratov@gmail.com>
> AuthorDate: Thu Aug 29 22:48:22 2019 +0500
> Commit:     Nicolas Goaziou <mail@nicolasgoaziou.fr>
> 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/)

             reply	other threads:[~2019-09-17 20:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-17 20:50 Karl Fogel [this message]
2019-09-18  8:55 ` 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/)] Marco Wahl
2019-09-18 20:01   ` Karl Fogel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h85atzpb.fsf@red-bean.com \
    --to=kfogel@red-bean.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).