[emacs-berlin] org mode auto return

Arne Brasseur arne.brasseur at gmail.com
Wed Oct 25 18:20:09 UTC 2017


This is the snippet we looked at today. It automatically creates new list
or heading items when pressing enter in org mode

(defun org-auto-heading-return ()
  (interactive)
  (if (or (org-at-heading-p) (org-at-item-p))
      (org-meta-return)
    (org-return)))

(define-key org-mode-map (kbd "RET") 'org-auto-heading-return)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailb.org/pipermail/emacs-berlin/attachments/20171025/6356289e/attachment.html>


More information about the emacs-berlin mailing list