emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* 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/)]
@ 2019-09-17 20:50 Karl Fogel
  2019-09-18  8:55 ` Marco Wahl
  0 siblings, 1 reply; 3+ messages in thread
From: Karl Fogel @ 2019-09-17 20:50 UTC (permalink / raw)
  To: emacs-orgmode

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/)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 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/)]
  2019-09-17 20:50 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/)] Karl Fogel
@ 2019-09-18  8:55 ` Marco Wahl
  2019-09-18 20:01   ` Karl Fogel
  0 siblings, 1 reply; 3+ messages in thread
From: Marco Wahl @ 2019-09-18  8:55 UTC (permalink / raw)
  To: emacs-orgmode

Hi.

Karl Fogel <kfogel@red-bean.com> writes:

> 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).

This was a little accident with the regexp match groups AFAICT.  This is
fixed in master.


Thanks,
-- 
Marco

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 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/)]
  2019-09-18  8:55 ` Marco Wahl
@ 2019-09-18 20:01   ` Karl Fogel
  0 siblings, 0 replies; 3+ messages in thread
From: Karl Fogel @ 2019-09-18 20:01 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Marco Wahl

On 18 Sep 2019, Marco Wahl wrote:
>Karl Fogel <kfogel@red-bean.com> writes:
>> 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).
>
>This was a little accident with the regexp match groups AFAICT.  This is
>fixed in master.

Thanks for the quick fix, Marco.  I can confirm that links are working again now.

Best regards,
-Karl

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-18 20:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-17 20:50 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/)] Karl Fogel
2019-09-18  8:55 ` Marco Wahl
2019-09-18 20:01   ` Karl Fogel

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).