This behavior seems unexpected to me, and might be a bug. Sharing here
to seek clarification, or to report this as a bug if it's not
expected.

Behavior description: In certain scenarios when yanking links that
have blank descriptions, the link text is not fontified into an
org-link.


elisp to reproduce:
(defun unexpected-behavior ()
        "Demo org-mode not fontifying to org-link"
        (interactive)
  (with-temp-buffer
                (org-mode)
                (insert "[[http://example.com][]]\n\n[[http://example.com][]]";)
                (font-lock-fontify-buffer)
                (goto-char 5)
                (get-char-property (point) 'face)))

-> nil

Expected behavior: I'd expect the function to return "org-link"
here. Indeed if you change the inserted text to just
"[[http://example.com][]]";, the function returns "org-link" instead of
nil. It's possible the blank description is an invalid link format,
but I didn't find that specified in the link syntax docs either way.

Thanks for any insight, apologies for the noise if this is expected behavior.

Version information:

(M-x org-version): Org mode version 9.7.11 (release_9.7.11 @ 
/Applications/Emacs.app/Contents/Resources/lisp/org/)
(M-x emacs-version): GNU Emacs 30.2 (build 1, aarch64-apple-darwin23.2.0, NS 
appkit-2487.30 Version 14.2 (Build 23C64)) of 2025-12-05
Note, it also occurs on my linux box with similar versions

Reply via email to