-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add undo-propose-marker-list #25
Conversation
undo-propose.el
Outdated
undo-propose-parent))))) | ||
|
||
(with-eval-after-load 'org | ||
(add-to-list 'undo-propose-marker-list org-clock-marker)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found an additional marker regarding org-clock. Could you add org-clock-hd-marker
?
undo-propose.el
Outdated
"Copy markers registered in `undo-propose-marker-list'." | ||
(setq-local undo-propose-marker-map | ||
(cl-loop for orig-marker in undo-propose-marker-list | ||
if (eq (marker-buffer orig-marker) undo-propose-parent) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, if we replace orig-marker
with (symbol-value orig-marker)
from line 196 to 200, then user can add any markers to undo-propose-marker-list
like (add-to-list 'undo-propose-marker-list 'org-clock-hd-marker)
.
I'm using the proposed code for this week and it works well so far. Thanks. |
@takaxp Thanks for the helpful feedback and sorry for the delay. I've added your suggestions (most importantly, turning |
Congrats! I also thanks to you for the precise analysis on markers and the implementation of the simplest but sufficient code for this issue. Thanks! |
This PR generalizes #21 and provides a workaround for #22, to correctly update markers after undo'ing. In particular, it creates a list
undo-propose-marker-list
, and undo-propose will update the positions of markers in this list after undo'ing.In addition, it adds a unit testing framework to undo-propose and adds a test for
org-clock-marker
as the first unit test.