awth13 / org-appear

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

org-toggle-time-stamp-overlays support would be nice #9

Closed KaratasFurkan closed 3 years ago

KaratasFurkan commented 3 years ago

I use org-time-stamp-custom-formats to see timestamps in the format that my country use. However, I cannot change the text manually without removing (toggling) overlays. It would be nice if org-appear do it for me.

I have a look at the code but could not find a solution easily. I could investigate more in my free time if nobody solve this.

awth13 commented 3 years ago

Thank you for the suggestion, @KaratasFurkan!

Please check/test that my implementation in the time-stamps feature branch works as you expected. It will take some time for me to merge it to master because I want to rework the function that processes different Org elements but I will definitely add this functionality.

One thing I did not like is that, if you change the date in the underlying text, the weekday is changed automatically in the custom overlay but not in the underlying text. Do you know if this is the expected behaviour?

KaratasFurkan commented 3 years ago

When I wanted to change a date manually, it gives error and I have to restart (disable/enable) org-appear-mode to make it work again. Here is the error: Error in post-command-hook (org-appear--post-cmd): (error "Not an Org time string: <2021-03-0 Pzt 17:15 +1w")

shift + up or shift + down does not give error but put overlays immediately, so I have to move cursor again to see underlying text.

Also changing hour or minute or recurring info (which is mostly why I want this feature) does not give error but I have to move cursor as I described above.

Thanks for the package and the feature btw!

awth13 commented 3 years ago

I can't reproduce any of the issues you mention with my Emacs configuration. Could you please send me the part of your setup that is related to custom time stamps?

KaratasFurkan commented 3 years ago

Sure,

(setq org-display-custom-times t)
(setq org-time-stamp-custom-formats '("<%d/%m/%Y %A>" . "<%d/%m/%Y %A %H:%M>"))

org-appear:

(use-package org-appear
  :straight (:host github :repo "awth13/org-appear" :branch "feature/time-stamps")
  :custom
  (org-appear-autolinks t)
  :hook
  (org-mode . org-appear-mode))

Full configuration: https://github.com/KaratasFurkan/.emacs.d Org mode section: https://github.com/KaratasFurkan/.emacs.d#org

I use emacs 28.0.50 btw.

awth13 commented 3 years ago

Thank you, @KaratasFurkan, and sorry for a bit of a delay!

I tested the branch in Emacs 28.0.50 with your configuration, and still no luck reproducing the issues. Everything works as expected.

As you could guess, I am not a huge time stamps user. Maybe there are some test cases I am not considering? I am using org-time-stamp to insert time stamps and modifying them either manually or with S-LEFT, S-DOWN, etc.

awth13 commented 3 years ago

I will close the issue for now since I haven't received any response from you in a while, @KaratasFurkan.

You're welcome to reopen it if you think time-stamp support should be added to mainline org-appear.