Open japhir opened 3 years ago
this is probably because it's also not indicated as a link in any other way, so may be an upstream bug?
Hey, @japhir!
Comments do not have children elements in the org-element
API and org-appear
cannot detect elements within a comment. The part of Org that hides links uses a different mechanism, though. If you M-x org-toggle-link-display
in a buffer with your example text, the full link will be hidden.
There is a similar problem in the document title.
I also encountered the problem in normal org region for links.
@wowhxj, this looks like a different issue. I also can't reproduce it.
Would you mind telling me which version of Emacs/Org are you using and what is the value of org-appear-autolinks
? How did you insert the link? Do you have any special configuration that affects Org links?
@wowhxj, this looks like a different issue. I also can't reproduce it.
Would you mind telling me which version of Emacs/Org are you using and what is the value of
org-appear-autolinks
? How did you insert the link? Do you have any special configuration that affects Org links?
I'm using GNU Emacs 27.2 with Org mode version 9.4.6 (9.4.6-4-g093c94-elpaplus).
The value of org-appear-autolinks
is nil
.
I use C-c C-l
which stands for org-insert-link
command to insert a URL link.
Following is the text of the link:
[[https://github.com/awth13/org-appear][org-appear]]
My configuration for org link is as following:
(setq org-return-follows-link nil)
(use-package ol
:ensure nil
:after org
:custom
(org-link-keep-stored-after-insertion t)
(org-link-abbrev-alist '(("Arxiv" . "https://arxiv.org/abs/")
("GitHub" . "https://github.com/")
("GitLab" . "https://gitlab.com/")
("Google" . "https://google.com/search?q=")
("Baidu" . "https://baidu.com/s?wd=")
("RFCs" . "https://tools.ietf.org/html/")
("LWN" . "https://lwn.net/Articles/")
("StackOverflow" . "https://stackoverflow.com/q/%s")
("WG21" . "https://wg21.link/")
("Wikipedia" . "https://en.wikipedia.org/wiki/")
("YouTube" . "https://youtube.com/watch?v=")
("Zhihu" . "https://zhihu.com/question/"))))
I tried to set org-appear-autolinks
to t
and solved the problem.
(use-package org-appear
:ensure t
:hook (org-mode . org-appear-mode)
:custom
(org-appear-autolinks t)
)
I'm sorry that I didn't know that. Sorry for the inconvenience and thanks for the wonderful package. :-)
@wowhxj, thank you for such a detailed response! I have to investigate this since, when org-appear-autolinks
is nil, org-appear
should not do anything with links. Your input is very useful.
I'm sorry that I didn't know that.
That's more of a call for me to improve the README :)
if I have an org file with a link on a commented (
#
) line, it does not appear!