|
@@ -1128,20 +1128,20 @@ may have been stored before."
|
|
|
(unless (org-at-heading-p) (outline-next-heading)))
|
|
|
;; Otherwise, insert as a top-level entry at the end of the file.
|
|
|
(t (goto-char (point-max))))
|
|
|
- (unless (bolp) (insert "\n"))
|
|
|
- (org-capture-empty-lines-before)
|
|
|
(let ((beg (point))
|
|
|
(template (org-capture-get :template)))
|
|
|
+ (unless (bolp) (insert "\n"))
|
|
|
+ (org-capture-empty-lines-before)
|
|
|
(org-capture-verify-tree template)
|
|
|
(org-paste-subtree level template 'for-yank)
|
|
|
(org-capture-empty-lines-after)
|
|
|
(org-capture-position-for-last-stored beg)
|
|
|
(unless (org-at-heading-p) (outline-next-heading))
|
|
|
- (let ((end (point)))
|
|
|
- (org-capture-mark-kill-region beg end)
|
|
|
+ (org-capture-mark-kill-region beg (point))
|
|
|
+ (let ((end (if (org-at-heading-p) (line-end-position 0) (point))))
|
|
|
(org-capture-narrow beg end)
|
|
|
- (when (or (re-search-backward "%\\?" beg t)
|
|
|
- (re-search-forward "%\\?" end t))
|
|
|
+ (when (or (search-backward "%?" beg t)
|
|
|
+ (search-forward "%?" end t))
|
|
|
(replace-match ""))))))
|
|
|
|
|
|
(defun org-capture-place-item ()
|