org-log-beginning: Fix error creating LOGBOOK drawer at end of buffer
* lisp/org.el (org-log-beginning): Fix regression after 288c7069c
where
"Error in post-command-hook (org-add-log-note): (end-of-buffer)"
is displayed after creating the LOGBOOK drawer on a heading which is
at the end of the buffer.
Reported-by: Kris Nelson <kris@kristofernelson.com>
Link: https://orgmode.org/list/766237934.317726.1715720181047@office.mailbox.org
TINYCHANGE
This commit is contained in:
parent
5af0625113
commit
c0b66bf9c1
|
@ -10676,10 +10676,10 @@ narrowing."
|
|||
(unless (bolp) (insert-and-inherit "\n"))
|
||||
(let ((beg (point)))
|
||||
(insert-and-inherit ":" drawer ":\n:END:")
|
||||
(if (eolp) (forward-char) (insert "\n"))
|
||||
(unless (eolp) (insert-and-inherit "\n") (backward-char))
|
||||
(org-indent-region beg (point))
|
||||
(org-fold-region (line-end-position -1) (1- (point)) t 'drawer))))
|
||||
(end-of-line -1))))
|
||||
(org-fold-region (line-end-position 0) (point) t 'drawer))))
|
||||
(end-of-line 0))))
|
||||
(t
|
||||
(org-end-of-meta-data org-log-state-notes-insert-after-drawers)
|
||||
(let ((endpos (point)))
|
||||
|
|
Loading…
Reference in New Issue