awth13 / org-appear

Toggle visibility of hidden Org mode element parts upon entering and leaving an element
MIT License
383 stars 19 forks source link

`org-appear-autolinks` not working inside Doom Emacs #50

Closed mjschwenne closed 2 years ago

mjschwenne commented 2 years ago

Hello! I'm just getting started with Emacs as a whole, so I decided to start with DOOM Emacs. (I tried writing a config myself, but there are just things that I don't know how to do yet, I'd like to get back to it in the future)

That being said, the org-appear-autolinks variable is having no effect on my configuration. Even when it is on, it is not expanding links when my cursor is on it.

DOOM Emacs installs org-appear as part of the +pretty submodule (turned on as (org +pretty) in init.el) but does no additional configuration and does not even turn on the mode when org is started. I have configured the package as below:

(use-package! org-appear
  :custom
  (org-hide-emphasis-markers t)
  (org-appear-trigger 'always)
  (org-appear-autolinks t)
  :hook (org-mode . org-appear-mode))

I tested this on a fresh install (since I had only done minimal configuration myself and this is the only package that I have manually configured. All of the normal hiding for things like italics and bold is working correctly. I don't know if this is relevant, but I can see that link is being added to the end of the org-appear-elements list. It was also working correctly in that partially finished config that I was working on but that was having other issues I couldn't figure out which is why I decided to switch to DOOM in the first place.

awth13 commented 2 years ago

Hi, @mjschwenne, and welcome to the community!

It looks like Doom Emacs configuration of Org packages pinned an older version of org-appear that does not support the recently introduced new folding mechanism for Org. I am not sure if this is an oversight on behalf of Doom Emacs maintainers or, perhaps, a conscious decision -- org-appear has a couple of serious issues to address currently and, thus, may be considered a volatile package.

I am not a user of Doom Emacs but I think you can either unpin org-appear to always use the latest version or manually pin it to the current latest commit (60ba267c5da336e75e603f8c7ab3f44e6f4e4dac) as described here.

mjschwenne commented 2 years ago

Thanks for the suggestion! Unpinning org-appear and running doom upgrade has resolved the problem. I obviously cannot speak to the debates that lead to DOOM's decision to pin the package at that commit but I may ask them to update the pin since everything seems to be working smoothly for me.