|
@@ -9498,24 +9498,21 @@ a timestamp can be added there."
|
|
|
"Make a new entry with TEXT as the first child of the current subtree.
|
|
|
Position the point in the heading's first body line so that
|
|
|
a timestamp can be added there."
|
|
|
- (let (col)
|
|
|
- (org-with-wide-buffer
|
|
|
- (outline-next-heading)
|
|
|
- (org-back-over-empty-lines)
|
|
|
- (or (looking-at "[ \t]*$")
|
|
|
- (progn (insert "\n") (backward-char 1)))
|
|
|
- (org-insert-heading nil t)
|
|
|
- (org-do-demote)
|
|
|
- (setq col (current-column))
|
|
|
- (insert text)
|
|
|
- (org-end-of-meta-data)
|
|
|
- (unless (bolp) (insert "\n"))
|
|
|
- (when org-adapt-indentation (org-indent-to-column col))
|
|
|
- (let ((org-show-following-heading t)
|
|
|
- (org-show-siblings t)
|
|
|
- (org-show-hierarchy-above t)
|
|
|
- (org-show-entry-below t))
|
|
|
- (org-show-context)))))
|
|
|
+ (outline-next-heading)
|
|
|
+ (org-back-over-empty-lines)
|
|
|
+ (unless (looking-at "[ \t]*$") (save-excursion (insert "\n")))
|
|
|
+ (org-insert-heading nil t)
|
|
|
+ (org-do-demote)
|
|
|
+ (let ((col (current-column)))
|
|
|
+ (insert text)
|
|
|
+ (org-end-of-meta-data)
|
|
|
+ (unless (bolp) (insert "\n"))
|
|
|
+ (when org-adapt-indentation (org-indent-to-column col)))
|
|
|
+ (let ((org-show-following-heading t)
|
|
|
+ (org-show-siblings t)
|
|
|
+ (org-show-hierarchy-above t)
|
|
|
+ (org-show-entry-below t))
|
|
|
+ (org-show-context)))
|
|
|
|
|
|
(defun org-agenda-diary-entry ()
|
|
|
"Make a diary entry, like the `i' command from the calendar.
|