|
@@ -3118,10 +3118,10 @@ s Search for keywords M Like m, but only TODO entries
|
|
(when (eq rmheader t)
|
|
(when (eq rmheader t)
|
|
(org-goto-line 1)
|
|
(org-goto-line 1)
|
|
(re-search-forward ":" nil t)
|
|
(re-search-forward ":" nil t)
|
|
- (delete-region (match-end 0) (line-end-position))
|
|
|
|
|
|
+ (delete-region (match-end 0) (line-end-position))
|
|
(forward-char 1)
|
|
(forward-char 1)
|
|
(looking-at "-+")
|
|
(looking-at "-+")
|
|
- (delete-region (match-end 0) (line-end-position))
|
|
|
|
|
|
+ (delete-region (match-end 0) (line-end-position))
|
|
(move-marker header-end (match-end 0)))
|
|
(move-marker header-end (match-end 0)))
|
|
(goto-char header-end)
|
|
(goto-char header-end)
|
|
(delete-region (point) (point-max))
|
|
(delete-region (point) (point-max))
|
|
@@ -3757,7 +3757,7 @@ removed from the entry content. Currently only `planning' is allowed here."
|
|
(while (not (eobp))
|
|
(while (not (eobp))
|
|
(unless (looking-at "[ \t]*$")
|
|
(unless (looking-at "[ \t]*$")
|
|
(move-to-column ind)
|
|
(move-to-column ind)
|
|
- (delete-region (line-beginning-position) (point)))
|
|
|
|
|
|
+ (delete-region (line-beginning-position) (point)))
|
|
(beginning-of-line 2))
|
|
(beginning-of-line 2))
|
|
|
|
|
|
(run-hooks 'org-agenda-entry-text-cleanup-hook)
|
|
(run-hooks 'org-agenda-entry-text-cleanup-hook)
|
|
@@ -4029,7 +4029,7 @@ agenda display, configure `org-agenda-finalize-hook'."
|
|
(goto-char (point-min))
|
|
(goto-char (point-min))
|
|
(while (equal (forward-line) 0)
|
|
(while (equal (forward-line) 0)
|
|
(when (setq mrk (get-text-property (point) 'org-hd-marker))
|
|
(when (setq mrk (get-text-property (point) 'org-hd-marker))
|
|
- (put-text-property (line-beginning-position) (line-end-position)
|
|
|
|
|
|
+ (put-text-property (line-beginning-position) (line-end-position)
|
|
'tags
|
|
'tags
|
|
(org-with-point-at mrk
|
|
(org-with-point-at mrk
|
|
(org-get-tags))))))))
|
|
(org-get-tags))))))))
|
|
@@ -4077,7 +4077,8 @@ agenda display, configure `org-agenda-finalize-hook'."
|
|
(goto-char s)
|
|
(goto-char s)
|
|
(when (equal (org-get-at-bol 'org-hd-marker)
|
|
(when (equal (org-get-at-bol 'org-hd-marker)
|
|
org-clock-hd-marker)
|
|
org-clock-hd-marker)
|
|
- (setq ov (make-overlay (line-beginning-position) (1+ (line-end-position))))
|
|
|
|
|
|
+ (setq ov (make-overlay (line-beginning-position)
|
|
|
|
+ (1+ (line-end-position))))
|
|
(overlay-put ov 'type 'org-agenda-clocking)
|
|
(overlay-put ov 'type 'org-agenda-clocking)
|
|
(overlay-put ov 'face 'org-agenda-clocking)
|
|
(overlay-put ov 'face 'org-agenda-clocking)
|
|
(overlay-put ov 'help-echo
|
|
(overlay-put ov 'help-echo
|
|
@@ -4108,7 +4109,7 @@ agenda display, configure `org-agenda-finalize-hook'."
|
|
b (match-beginning 1)
|
|
b (match-beginning 1)
|
|
e (if (eq org-agenda-fontify-priorities 'cookies)
|
|
e (if (eq org-agenda-fontify-priorities 'cookies)
|
|
(1+ (match-end 2))
|
|
(1+ (match-end 2))
|
|
- (line-end-position))
|
|
|
|
|
|
+ (line-end-position))
|
|
ov (make-overlay b e))
|
|
ov (make-overlay b e))
|
|
(overlay-put
|
|
(overlay-put
|
|
ov 'face
|
|
ov 'face
|
|
@@ -4800,7 +4801,7 @@ is active."
|
|
(forward-line -1)
|
|
(forward-line -1)
|
|
(org-back-to-heading t)))
|
|
(org-back-to-heading t)))
|
|
(skip-chars-forward "* ")
|
|
(skip-chars-forward "* ")
|
|
- (setq beg (line-beginning-position)
|
|
|
|
|
|
+ (setq beg (line-beginning-position)
|
|
beg1 (point)
|
|
beg1 (point)
|
|
end (progn
|
|
end (progn
|
|
(outline-next-heading)
|
|
(outline-next-heading)
|
|
@@ -4815,8 +4816,8 @@ is active."
|
|
(goto-char beg)
|
|
(goto-char beg)
|
|
(org-agenda-skip)
|
|
(org-agenda-skip)
|
|
(setq str (buffer-substring-no-properties
|
|
(setq str (buffer-substring-no-properties
|
|
- (line-beginning-position)
|
|
|
|
- (if hdl-only (line-end-position) end)))
|
|
|
|
|
|
+ (line-beginning-position)
|
|
|
|
+ (if hdl-only (line-end-position) end)))
|
|
(mapc (lambda (wr) (when (string-match wr str)
|
|
(mapc (lambda (wr) (when (string-match wr str)
|
|
(goto-char (1- end))
|
|
(goto-char (1- end))
|
|
(throw :skip t)))
|
|
(throw :skip t)))
|
|
@@ -4844,7 +4845,7 @@ is active."
|
|
txt (org-agenda-format-item
|
|
txt (org-agenda-format-item
|
|
""
|
|
""
|
|
(buffer-substring-no-properties
|
|
(buffer-substring-no-properties
|
|
- beg1 (line-end-position))
|
|
|
|
|
|
+ beg1 (line-end-position))
|
|
level category tags t))
|
|
level category tags t))
|
|
(org-add-props txt props
|
|
(org-add-props txt props
|
|
'org-marker marker 'org-hd-marker marker
|
|
'org-marker marker 'org-hd-marker marker
|
|
@@ -6138,7 +6139,7 @@ then those holidays will be skipped."
|
|
'type type 'date date
|
|
'type type 'date date
|
|
'undone-face 'org-warning 'done-face 'org-agenda-done)
|
|
'undone-face 'org-warning 'done-face 'org-agenda-done)
|
|
(push txt ee))
|
|
(push txt ee))
|
|
- (goto-char (line-end-position))))
|
|
|
|
|
|
+ (goto-char (line-end-position))))
|
|
(nreverse ee)))
|
|
(nreverse ee)))
|
|
|
|
|
|
(defun org-agenda-show-clocking-issues ()
|
|
(defun org-agenda-show-clocking-issues ()
|
|
@@ -6175,7 +6176,7 @@ See also the user option `org-agenda-clock-consistency-checks'."
|
|
(setq issue "No valid clock line") (throw 'next t))
|
|
(setq issue "No valid clock line") (throw 'next t))
|
|
(org-with-point-at m
|
|
(org-with-point-at m
|
|
(save-excursion
|
|
(save-excursion
|
|
- (goto-char (line-beginning-position))
|
|
|
|
|
|
+ (goto-char (line-beginning-position))
|
|
(unless (looking-at re)
|
|
(unless (looking-at re)
|
|
(error "No valid Clock line")
|
|
(error "No valid Clock line")
|
|
(throw 'next t))
|
|
(throw 'next t))
|
|
@@ -6221,7 +6222,7 @@ See also the user option `org-agenda-clock-consistency-checks'."
|
|
(setq tlend (or te tlend) tlstart (or ts tlstart))
|
|
(setq tlend (or te tlend) tlstart (or ts tlstart))
|
|
(when issue
|
|
(when issue
|
|
;; OK, there was some issue, add an overlay to show the issue
|
|
;; OK, there was some issue, add an overlay to show the issue
|
|
- (setq ov (make-overlay (line-beginning-position) (line-end-position)))
|
|
|
|
|
|
+ (setq ov (make-overlay (line-beginning-position) (line-end-position)))
|
|
(overlay-put ov 'before-string
|
|
(overlay-put ov 'before-string
|
|
(concat
|
|
(concat
|
|
(org-add-props
|
|
(org-add-props
|
|
@@ -7649,7 +7650,10 @@ The optional argument TYPE tells the agenda type."
|
|
(save-excursion
|
|
(save-excursion
|
|
(beginning-of-line 1)
|
|
(beginning-of-line 1)
|
|
(setq re (org-get-at-bol 'org-todo-regexp))
|
|
(setq re (org-get-at-bol 'org-todo-regexp))
|
|
- (goto-char (or (text-property-any (line-beginning-position) (line-end-position) 'org-heading t) (point)))
|
|
|
|
|
|
+ (goto-char (or (text-property-any (line-beginning-position)
|
|
|
|
+ (line-end-position)
|
|
|
|
+ 'org-heading t)
|
|
|
|
+ (point)))
|
|
(when (looking-at (concat "[ \t]*\\.*\\(" re "\\) +"))
|
|
(when (looking-at (concat "[ \t]*\\.*\\(" re "\\) +"))
|
|
(add-text-properties (match-beginning 0) (match-end 1)
|
|
(add-text-properties (match-beginning 0) (match-end 1)
|
|
(list 'face (org-get-todo-face 1)))
|
|
(list 'face (org-get-todo-face 1)))
|
|
@@ -7930,7 +7934,7 @@ subtree."
|
|
(point)
|
|
(point)
|
|
(if org-agenda-restriction-lock-highlight-subtree
|
|
(if org-agenda-restriction-lock-highlight-subtree
|
|
(save-excursion (org-end-of-subtree t t) (point))
|
|
(save-excursion (org-end-of-subtree t t) (point))
|
|
- (line-end-position)))
|
|
|
|
|
|
+ (line-end-position)))
|
|
(move-marker org-agenda-restrict-begin (point))
|
|
(move-marker org-agenda-restrict-begin (point))
|
|
(move-marker org-agenda-restrict-end
|
|
(move-marker org-agenda-restrict-end
|
|
(save-excursion (org-end-of-subtree t t)))
|
|
(save-excursion (org-end-of-subtree t t)))
|
|
@@ -8759,8 +8763,8 @@ grouptags."
|
|
(defun org-agenda-filter-hide-line (type)
|
|
(defun org-agenda-filter-hide-line (type)
|
|
"If current line is TYPE, hide it in the agenda buffer."
|
|
"If current line is TYPE, hide it in the agenda buffer."
|
|
(let* (buffer-invisibility-spec
|
|
(let* (buffer-invisibility-spec
|
|
- (beg (max (point-min) (1- (line-beginning-position))))
|
|
|
|
- (end (line-end-position)))
|
|
|
|
|
|
+ (beg (max (point-min) (1- (line-beginning-position))))
|
|
|
|
+ (end (line-end-position)))
|
|
(let ((inhibit-read-only t))
|
|
(let ((inhibit-read-only t))
|
|
(add-text-properties
|
|
(add-text-properties
|
|
beg end `(invisible org-filtered org-filter-type ,type)))))
|
|
beg end `(invisible org-filtered org-filter-type ,type)))))
|
|
@@ -9474,7 +9478,8 @@ When called with a prefix argument, include all archive files as well."
|
|
(when (re-search-forward org-complex-heading-regexp nil t)
|
|
(when (re-search-forward org-complex-heading-regexp nil t)
|
|
(goto-char (match-beginning 4)))))
|
|
(goto-char (match-beginning 4)))))
|
|
(run-hooks 'org-agenda-after-show-hook)
|
|
(run-hooks 'org-agenda-after-show-hook)
|
|
- (and highlight (org-highlight (line-beginning-position) (line-end-position)))))
|
|
|
|
|
|
+ (and highlight (org-highlight (line-beginning-position)
|
|
|
|
+ (line-end-position)))))
|
|
|
|
|
|
(defvar org-agenda-after-show-hook nil
|
|
(defvar org-agenda-after-show-hook nil
|
|
"Normal hook run after an item has been shown from the agenda.
|
|
"Normal hook run after an item has been shown from the agenda.
|
|
@@ -9497,7 +9502,7 @@ deletes the agenda entry and don't move to the next entry."
|
|
(level (and (eq org-agenda-loop-over-headlines-in-active-region 'start-level)
|
|
(level (and (eq org-agenda-loop-over-headlines-in-active-region 'start-level)
|
|
(org-get-at-bol 'level))))
|
|
(org-get-at-bol 'level))))
|
|
(while (< (point) mend)
|
|
(while (< (point) mend)
|
|
- (let ((ov (make-overlay (point) (line-end-position))))
|
|
|
|
|
|
+ (let ((ov (make-overlay (point) (line-end-position))))
|
|
(if (not (or all
|
|
(if (not (or all
|
|
(and match (looking-at-p match))
|
|
(and match (looking-at-p match))
|
|
(eq level (org-get-at-bol 'level))))
|
|
(eq level (org-get-at-bol 'level))))
|
|
@@ -9542,8 +9547,8 @@ Pass ARG, FORCE-ARG, DELETE and BODY to `org-agenda-do-in-region'."
|
|
(if (and (derived-mode-p 'org-mode) (not (member type '("sexp"))))
|
|
(if (and (derived-mode-p 'org-mode) (not (member type '("sexp"))))
|
|
(setq dbeg (progn (org-back-to-heading t) (point))
|
|
(setq dbeg (progn (org-back-to-heading t) (point))
|
|
dend (org-end-of-subtree t t))
|
|
dend (org-end-of-subtree t t))
|
|
- (setq dbeg (line-beginning-position)
|
|
|
|
- dend (min (point-max) (1+ (line-end-position)))))
|
|
|
|
|
|
+ (setq dbeg (line-beginning-position)
|
|
|
|
+ dend (min (point-max) (1+ (line-end-position)))))
|
|
(goto-char dbeg)
|
|
(goto-char dbeg)
|
|
(while (re-search-forward "^[ \t]*\\S-" dend t) (setq n (1+ n)))))
|
|
(while (re-search-forward "^[ \t]*\\S-" dend t) (setq n (1+ n)))))
|
|
(when (or (eq t org-agenda-confirm-kill)
|
|
(when (or (eq t org-agenda-confirm-kill)
|
|
@@ -9642,7 +9647,8 @@ If this information is not given, the function uses the tree at point."
|
|
(>= p beg)
|
|
(>= p beg)
|
|
(< p end))
|
|
(< p end))
|
|
(let ((inhibit-read-only t))
|
|
(let ((inhibit-read-only t))
|
|
- (delete-region (line-beginning-position) (1+ (line-end-position)))))
|
|
|
|
|
|
+ (delete-region (line-beginning-position)
|
|
|
|
+ (1+ (line-end-position)))))
|
|
(beginning-of-line 0))))))
|
|
(beginning-of-line 0))))))
|
|
|
|
|
|
(defun org-agenda-refile (&optional goto rfloc no-update)
|
|
(defun org-agenda-refile (&optional goto rfloc no-update)
|
|
@@ -9691,7 +9697,8 @@ It also looks at the text of the entry itself."
|
|
(let* ((marker (or (org-get-at-bol 'org-hd-marker)
|
|
(let* ((marker (or (org-get-at-bol 'org-hd-marker)
|
|
(org-get-at-bol 'org-marker)))
|
|
(org-get-at-bol 'org-marker)))
|
|
(buffer (and marker (marker-buffer marker)))
|
|
(buffer (and marker (marker-buffer marker)))
|
|
- (prefix (buffer-substring (line-beginning-position) (line-end-position)))
|
|
|
|
|
|
+ (prefix (buffer-substring (line-beginning-position)
|
|
|
|
+ (line-end-position)))
|
|
(lkall (and buffer (org-offer-links-in-entry
|
|
(lkall (and buffer (org-offer-links-in-entry
|
|
buffer marker arg prefix)))
|
|
buffer marker arg prefix)))
|
|
(lk0 (car lkall))
|
|
(lk0 (car lkall))
|
|
@@ -10068,7 +10075,8 @@ If FORCE-TAGS is non-nil, the car of it returns the new tags."
|
|
'effort effort
|
|
'effort effort
|
|
'effort-minutes effort-minutes)
|
|
'effort-minutes effort-minutes)
|
|
level cat tags dotime))))
|
|
level cat tags dotime))))
|
|
- ;; pl (text-property-any (line-beginning-position) (line-end-position) 'org-heading t)
|
|
|
|
|
|
+ ;; pl (text-property-any (line-beginning-position)
|
|
|
|
+ ;; (line-end-position) 'org-heading t)
|
|
undone-face (org-get-at-bol 'undone-face)
|
|
undone-face (org-get-at-bol 'undone-face)
|
|
done-face (org-get-at-bol 'done-face))
|
|
done-face (org-get-at-bol 'done-face))
|
|
(beginning-of-line 1)
|
|
(beginning-of-line 1)
|
|
@@ -10085,10 +10093,11 @@ If FORCE-TAGS is non-nil, the car of it returns the new tags."
|
|
(replace-match new t t)
|
|
(replace-match new t t)
|
|
(beginning-of-line)
|
|
(beginning-of-line)
|
|
(when mark (move-overlay mark (point) (+ 2 (point)))))
|
|
(when mark (move-overlay mark (point) (+ 2 (point)))))
|
|
- (add-text-properties (line-beginning-position) (line-end-position) props)
|
|
|
|
|
|
+ (add-text-properties (line-beginning-position)
|
|
|
|
+ (line-end-position) props)
|
|
(when fixface
|
|
(when fixface
|
|
(add-text-properties
|
|
(add-text-properties
|
|
- (line-beginning-position) (line-end-position)
|
|
|
|
|
|
+ (line-beginning-position) (line-end-position)
|
|
(list 'face
|
|
(list 'face
|
|
(if org-last-todo-state-is-todo
|
|
(if org-last-todo-state-is-todo
|
|
undone-face done-face))))
|
|
undone-face done-face))))
|
|
@@ -10096,7 +10105,7 @@ If FORCE-TAGS is non-nil, the car of it returns the new tags."
|
|
(beginning-of-line 1))
|
|
(beginning-of-line 1))
|
|
(t (error "Line update did not work")))
|
|
(t (error "Line update did not work")))
|
|
(save-restriction
|
|
(save-restriction
|
|
- (narrow-to-region (line-beginning-position) (line-end-position))
|
|
|
|
|
|
+ (narrow-to-region (line-beginning-position) (line-end-position))
|
|
(org-agenda-finalize)))
|
|
(org-agenda-finalize)))
|
|
(beginning-of-line 0)))))
|
|
(beginning-of-line 0)))))
|
|
|
|
|
|
@@ -10328,7 +10337,8 @@ When called programmatically, FORCE-DIRECTION can be `set', `up',
|
|
(setq arg (- today cdate))))
|
|
(setq arg (- today cdate))))
|
|
(org-timestamp-change arg (or what 'day))
|
|
(org-timestamp-change arg (or what 'day))
|
|
(when (and (org-at-date-range-p)
|
|
(when (and (org-at-date-range-p)
|
|
- (re-search-backward org-tr-regexp-both (line-beginning-position)))
|
|
|
|
|
|
+ (re-search-backward org-tr-regexp-both
|
|
|
|
+ (line-beginning-position)))
|
|
(let ((end org-last-changed-timestamp))
|
|
(let ((end org-last-changed-timestamp))
|
|
(org-timestamp-change arg (or what 'day))
|
|
(org-timestamp-change arg (or what 'day))
|
|
(setq org-last-changed-timestamp
|
|
(setq org-last-changed-timestamp
|
|
@@ -10380,7 +10390,7 @@ When called programmatically, FORCE-DIRECTION can be `set', `up',
|
|
(length stamp))
|
|
(length stamp))
|
|
t)
|
|
t)
|
|
(add-text-properties
|
|
(add-text-properties
|
|
- (1- (point)) (line-end-position)
|
|
|
|
|
|
+ (1- (point)) (line-end-position)
|
|
(list 'display (org-add-props stamp nil
|
|
(list 'display (org-add-props stamp nil
|
|
'face '(secondary-selection default))))
|
|
'face '(secondary-selection default))))
|
|
(beginning-of-line 1))
|
|
(beginning-of-line 1))
|
|
@@ -10530,7 +10540,7 @@ buffer, display it in another window."
|
|
d2 (and (ignore-errors (mark))
|
|
d2 (and (ignore-errors (mark))
|
|
(save-excursion
|
|
(save-excursion
|
|
(goto-char (mark))
|
|
(goto-char (mark))
|
|
- (setq dp2 (get-text-property (line-beginning-position) 'day)))
|
|
|
|
|
|
+ (setq dp2 (get-text-property (line-beginning-position) 'day)))
|
|
(calendar-gregorian-from-absolute dp2))))
|
|
(calendar-gregorian-from-absolute dp2))))
|
|
(message "Diary entry: [d]ay [a]nniversary [b]lock [j]ump to date tree")
|
|
(message "Diary entry: [d]ay [a]nniversary [b]lock [j]ump to date tree")
|
|
(setq char (read-char-exclusive))
|
|
(setq char (read-char-exclusive))
|
|
@@ -10878,7 +10888,8 @@ When ARG is greater than one mark ARG lines."
|
|
(unless (org-agenda-bulk-marked-p)
|
|
(unless (org-agenda-bulk-marked-p)
|
|
(unless m (user-error "Nothing to mark at point"))
|
|
(unless m (user-error "Nothing to mark at point"))
|
|
(push m org-agenda-bulk-marked-entries)
|
|
(push m org-agenda-bulk-marked-entries)
|
|
- (setq ov (make-overlay (line-beginning-position) (+ 2 (line-beginning-position))))
|
|
|
|
|
|
+ (setq ov (make-overlay (line-beginning-position)
|
|
|
|
+ (+ 2 (line-beginning-position))))
|
|
(org-overlay-display ov (concat org-agenda-bulk-mark-char " ")
|
|
(org-overlay-display ov (concat org-agenda-bulk-mark-char " ")
|
|
(org-get-todo-face "TODO")
|
|
(org-get-todo-face "TODO")
|
|
'evaporate)
|
|
'evaporate)
|
|
@@ -10922,7 +10933,7 @@ When ARG is greater than one mark ARG lines."
|
|
(org-agenda-bulk-unmark-all)
|
|
(org-agenda-bulk-unmark-all)
|
|
(cond ((org-agenda-bulk-marked-p)
|
|
(cond ((org-agenda-bulk-marked-p)
|
|
(org-agenda-bulk-remove-overlays
|
|
(org-agenda-bulk-remove-overlays
|
|
- (line-beginning-position) (+ 2 (line-beginning-position)))
|
|
|
|
|
|
+ (line-beginning-position) (+ 2 (line-beginning-position)))
|
|
(setq org-agenda-bulk-marked-entries
|
|
(setq org-agenda-bulk-marked-entries
|
|
(delete (org-get-at-bol 'org-hd-marker)
|
|
(delete (org-get-at-bol 'org-hd-marker)
|
|
org-agenda-bulk-marked-entries))
|
|
org-agenda-bulk-marked-entries))
|