summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2019-02-25 02:04:29 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2019-02-25 02:04:29 +0100
commitb139e1531a0848eab79d59b1939ab03c266da29d (patch)
treea0663a934b9984ecf7ea3e861ee790485bc545fc
parent2097f5488b479e928b70bffcaa9957e1bf7690af (diff)
parent95e1f844ac257e2064fa2284f6d1e0203705a49c (diff)
downloadorg-mode-b139e1531a0848eab79d59b1939ab03c266da29d.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/org.el22
1 files changed, 15 insertions, 7 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 9f33c9e..bcb2f7d 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -2319,8 +2319,8 @@ This option can also be set with on a per-file-basis with
You can have local logging settings for a subtree by setting the LOGGING
property to one or more of these keywords.
-When bulk-refiling from the agenda, the value `note' is forbidden and
-will temporarily be changed to `time'."
+When bulk-refiling, e.g., from the agenda, the value `note' is
+forbidden and will temporarily be changed to `time'."
:group 'org-refile
:group 'org-progress
:version "24.1"
@@ -11196,7 +11196,7 @@ prefix argument (`C-u C-u C-u C-c C-w')."
(setq last-command nil)
(when regionp
(goto-char region-start)
- (or (bolp) (goto-char (point-at-bol)))
+ (beginning-of-line)
(setq region-start (point))
(unless (or (org-kill-is-subtree-p
(buffer-substring region-start region-end))
@@ -11284,10 +11284,18 @@ prefix argument (`C-u C-u C-u C-c C-w')."
(or (outline-next-heading) (goto-char (point-max)))))
(unless (bolp) (newline))
(org-paste-subtree level nil nil t)
- (when org-log-refile
- (org-add-log-setup 'refile nil nil org-log-refile)
- (unless (eq org-log-refile 'note)
- (save-excursion (org-add-log-note))))
+ ;; Record information, according to `org-log-refile'.
+ ;; Do not prompt for a note when refiling multiple
+ ;; headlines, however. Simply add a time stamp.
+ (cond
+ ((not org-log-refile))
+ (regionp
+ (org-map-region
+ (lambda () (org-add-log-setup 'refile nil nil 'time))
+ (point)
+ (+ (point) (- region-end region-start))))
+ (t
+ (org-add-log-setup 'refile nil nil org-log-refile)))
(and org-auto-align-tags
(let ((org-loop-over-headlines-in-active-region nil))
(org-align-tags)))