Org-mode is sometimes breaking links while adjusting indentation in
org-fixup-indentation.
This has been observed on emacs version 27.1, with org-mode versions
9.3 (built-in) and 9.4 (melpa-stable).
It also occurs with the current emacs development version.
Here is how to recreate. I hope my mailer does not screw up the
lines below...
Enter the following text in an org buffer and proceed as described:
* Org is breaking
links!
Create a heading with `*' and random heading text.
Create a text section below the heading.
In the text section create a separate line starting with a link,
like so:
[[simple-link]]
[[http://a.b.com/demo.html][link
text]]
Switch on whitespace-mode to see what is going on.
Indent the heading deeper (i.e. demote) with several
`M-<right>' until the text starts with a TAB instead of
SPCs.
Then outdent the heading back (i.e. promote) with
`M-<left>'.
See the links getting corrupted as the two leftmost brackets
`[[' are removed, in case of links with a target part, this also
gets removed.
Note that his behavior also affects org-refile: Links can get
can get corrupted in this way while refiling.
Note that links do not get broken as described when showing full
links with org-toggle-link-display.
Thanks for your help,
Kind Regards,
Christoph