Closed ParetoOptimalDev closed 12 months ago
This is actually even more subtle and specific to me or perhaps other org-roam users that hide properties. It only happens when properties are hidden with something like:
(defun org-hide-properties ()
"Hide all org-mode headline property drawers in buffer. Could be slow if it has a lot of overlays."
(interactive)
(save-excursion
(goto-char (point-min))
(while (re-search-forward
"^ *:properties:\n\\( *:.+?:.*\n\\)+ *:end:\n" nil t)
(let ((ov_this (make-overlay (match-beginning 0) (match-end 0))))
(overlay-put ov_this 'display "")
(overlay-put ov_this 'hidden-prop-drawer t))))
(put 'org-toggle-properties-hide-state 'state 'hidden))
I believe it happens because previously the properties included the newline, but when they are hidden with the code above it also includes the newline.
Perhaps the issue is this custom code then and only the \n
needs removed from the code above.
The problem with that is this was originally used to hide properties at the top of an org-roam file like:
:PROPERTIES:
:ID: 450b7062-4f9c-4773-adf5-bfa84f99f410
:END:
#+title: 2023-08-29
So capturing the newline is necessary to avoid a redundant newline.
Anywho... this is clearly not a hyperscheduler issue but hyperscheduler could work around it.
If you think working around it for this likely very narrow case, I can look into doing it. Or perhaps I need to improve org-hide-properties
to not match a newline when under a heading.
Thanks for your time and the package though!
Hey @ParetoOptimalDev, can you show me a self contained example? I haven't seen this with my instance yet.
@dmitrym0 I gave detailed reproduction steps here... I meant to link you to those earlier.
This isn't org-hyperscheduler's fault though. It's the fault of the code from org-roam or my fault for using it for more than it was intended.
I don't think there's anything to do on the org-hyperscheduler side here.
If you have a better suggestion for code improvements to what I suggested here though I wouldn't mind ;)
Version info:
The issue that happens is basically instead of:
Some sort of display error happens when
PROPERTIES
is afterSCHEDULED
and it is displayed like:I've experienced this in the past and been able to use
org-cycle
a few times to fix things ororg-fold-reveal
but it doesn't seem to make a difference here.It's possible this is a regression with org 9.6 and a bug needs reported upstream, but it's also pretty easy (maybe) to put properties before scheduled I think.