summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2016-05-26 10:55:00 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2016-05-26 10:55:00 +0200
commit5ac93681b2ec028bb909a789e9c1b0b0f7caae32 (patch)
treebdf65fc9159e5565018bf9bb6958818b395bb2a8
parent9dbeaa278d3581d03dba177eb79a3ad43b600fa5 (diff)
parent655fb3396799082838f80cd04006fffe27e0e1f7 (diff)
downloadorg-mode-5ac93681b2ec028bb909a789e9c1b0b0f7caae32.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/org-agenda.el16
1 files changed, 12 insertions, 4 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index ab280fb..f10a3ab 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -8954,11 +8954,18 @@ If FORCE-TAGS is non nil, the car of it returns the new tags."
done-face (org-get-at-bol 'done-face))
(beginning-of-line 1)
(cond
- ((equal new "")
- (and (looking-at ".*\n?") (replace-match "")))
+ ((equal new "") (delete-region (point) (line-beginning-position 2)))
((looking-at ".*")
- (replace-match new t t)
- (beginning-of-line 1)
+ ;; When replacing the whole line, preserve bulk mark
+ ;; overlay, if any.
+ (let ((mark (catch :overlay
+ (dolist (o (overlays-in (point) (+ 2 (point))))
+ (when (eq (overlay-get o 'type)
+ 'org-marked-entry-overlay)
+ (throw :overlay o))))))
+ (replace-match new t t)
+ (beginning-of-line)
+ (when mark (move-overlay mark (point) (+ 2 (point)))))
(add-text-properties (point-at-bol) (point-at-eol) props)
(when fixface
(add-text-properties
@@ -9709,6 +9716,7 @@ This is a command that has to be installed in `calendar-mode-map'."
;;; Bulk commands
(defun org-agenda-bulk-marked-p ()
+ "Non-nil when current entry is marked for bulk action."
(eq (get-char-property (point-at-bol) 'type)
'org-marked-entry-overlay))