Skip to content

Instantly share code, notes, and snippets.

@takaxp
Created January 5, 2018 05:06
Show Gist options
  • Save takaxp/07f0c3080cc40a1fbf4c7e44455f91da to your computer and use it in GitHub Desktop.
Save takaxp/07f0c3080cc40a1fbf4c7e44455f91da to your computer and use it in GitHub Desktop.
advice:org-return
(with-eval-after-load "org"
(defun advice:org-return (f &optional arg)
"An extension for checking invisible editing when you hit the enter."
(interactive "P")
(org-check-before-invisible-edit 'insert)
(apply f arg))
(advice-add 'org-return :around #'advice:org-return))
@takaxp
Copy link
Author

takaxp commented Jan 5, 2018

I don't quite understand why org-catch-invisible-edits is not checked by calling org-check-before-invisible-edit in the original org-return. So I updated it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment