forked from mirrors/org-mode
Add facility for commit log messages from Org documents
* lisp/org-compat.el (org-add-log-current-headline): New function. * lisp/org.el (org-mode): Use new function.
This commit is contained in:
parent
3f26c9bd2e
commit
f50f373389
|
@ -712,6 +712,14 @@ To get rid of the restriction, use `\\[org-agenda-remove-restriction-lock]'."
|
|||
(add-hook 'speedbar-visiting-tag-hook
|
||||
(lambda () (and (derived-mode-p 'org-mode) (org-show-context 'org-goto))))))
|
||||
|
||||
;;;; Add Log
|
||||
|
||||
(defun org-add-log-current-headline ()
|
||||
"Return current headline or nil.
|
||||
This function ignores inlinetasks. It is meant to be used as
|
||||
`add-log-current-defun-function' value."
|
||||
(org-with-limited-levels (org-get-heading t t t t)))
|
||||
|
||||
;;;; Flyspell
|
||||
|
||||
(defun org--flyspell-object-check-p (element)
|
||||
|
|
|
@ -5509,6 +5509,8 @@ The following commands are available:
|
|||
(forward-char -1))))
|
||||
;; Next error for sparse trees
|
||||
(setq-local next-error-function 'org-occur-next-match)
|
||||
;; Make commit log messages from Org documents easier.
|
||||
(setq-local add-log-current-defun-function #'org-add-log-current-headline)
|
||||
;; Make sure dependence stuff works reliably, even for users who set it
|
||||
;; too late :-(
|
||||
(if org-enforce-todo-dependencies
|
||||
|
|
Loading…
Reference in New Issue