I'd like my kill ring to remain unaffected when I kill an org-capture invocation.
- put a URL in my OS clipboard (and thus kill ring)
org-captureand start to create a bookmarks entry- cancel org-capture for whatever reason with C-c C-k
[CURRENT BAD BEHAVIOR]try again -- uh oh, my kill ring has been polluted by the text of the canceled org-capture session![DESIRED GOOD BEHAVIOR]try again with the same clipboard/kill-ring contents I had as of [2]
How do I achieve this in idiomatic org-mode elisp?
kill-regioninorg-capture-finalize-kill-regionwill always add the text to the kill ring. You could change that todelete-regionin your copy oforg-capture.elbut that is probably not a good idea. The function called when you pressC-c C-kisorg-capture-killand there is a somewhat cryptic comment that leads me to believe that this is a known ...M-x org-submit-bug-report- that might prompt the devs to re-examine the behavior.