Created
January 8, 2015 01:12
-
-
Save yuutayamada/a8c5b4b313ffb7e1f844 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun org-dwim () | |
"My convinience function for `org-mode'." | |
(interactive) | |
(cond | |
((org-in-block-p '("src")) | |
;; (org-in-src-block-p) | |
(org-edit-special)) | |
((org-src-edit-buffer-p) | |
(org-edit-src-exit)) | |
((org-table-p) | |
(org-table-edit-field 4)) | |
((org-on-heading-p) | |
(org-todo)) | |
((org-at-item-checkbox-p) | |
(org-toggle-checkbox)) | |
((and org-return-follows-link | |
(let ((tprop (get-text-property (point) 'face))) | |
(or (eq tprop 'org-link) | |
(and (listp tprop) (memq 'org-link tprop))))) | |
(org-open-at-point)) | |
(t (org-insert-drawer)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment