Small refactoring

* lisp/org.el (org-log-beginning):
* lisp/org-agenda.el (org-agenda-insert-diary-make-new-entry): Small
  refactoring.
This commit is contained in:
Nicolas Goaziou 2015-01-30 19:41:02 +01:00
parent 98a1bc868a
commit fe63e59faf
2 changed files with 2 additions and 12 deletions

View File

@ -9505,11 +9505,7 @@ a timestamp can be added there."
(org-do-demote)
(setq col (current-column))
(insert text)
(forward-line)
(when (org-looking-at-p org-planning-line-re) (forward-line))
(when (looking-at org-property-drawer-re)
(goto-char (match-end 0))
(forward-line))
(org-end-of-meta-data)
(unless (bolp) (insert "\n"))
(when org-adapt-indentation (org-indent-to-column col))
(let ((org-show-following-heading t)

View File

@ -13563,13 +13563,7 @@ When optional argument CREATE is non-nil, the function creates
a drawer to store notes, if necessary. Returned position ignores
narrowing."
(org-with-wide-buffer
(org-back-to-heading t)
;; Skip planning info and property drawer.
(forward-line)
(when (org-looking-at-p org-planning-line-re) (forward-line))
(when (looking-at org-property-drawer-re)
(goto-char (match-end 0))
(forward-line))
(org-end-of-meta-data)
(let ((end (if (org-at-heading-p) (point)
(save-excursion (outline-next-heading) (point))))
(drawer (org-log-into-drawer)))