|
@@ -3765,10 +3765,7 @@ generating a new one."
|
|
|
|
|
|
(defun org-agenda-mark-clocking-task ()
|
|
(defun org-agenda-mark-clocking-task ()
|
|
"Mark the current clock entry in the agenda if it is present."
|
|
"Mark the current clock entry in the agenda if it is present."
|
|
- (mapc (lambda (o)
|
|
|
|
- (if (eq (overlay-get o 'type) 'org-agenda-clocking)
|
|
|
|
- (delete-overlay o)))
|
|
|
|
- (overlays-in (point-min) (point-max)))
|
|
|
|
|
|
+ (org-agenda-unmark-clocking-task)
|
|
(when (marker-buffer org-clock-hd-marker)
|
|
(when (marker-buffer org-clock-hd-marker)
|
|
(save-excursion
|
|
(save-excursion
|
|
(goto-char (point-min))
|
|
(goto-char (point-min))
|
|
@@ -3783,6 +3780,13 @@ generating a new one."
|
|
(overlay-put ov 'help-echo
|
|
(overlay-put ov 'help-echo
|
|
"The clock is running in this item")))))))
|
|
"The clock is running in this item")))))))
|
|
|
|
|
|
|
|
+(defun org-agenda-unmark-clocking-task ()
|
|
|
|
+ "Unmark the current clocking task."
|
|
|
|
+ (mapc (lambda (o)
|
|
|
|
+ (if (eq (overlay-get o 'type) 'org-agenda-clocking)
|
|
|
|
+ (delete-overlay o)))
|
|
|
|
+ (overlays-in (point-min) (point-max))))
|
|
|
|
+
|
|
(defun org-agenda-fontify-priorities ()
|
|
(defun org-agenda-fontify-priorities ()
|
|
"Make highest priority lines bold, and lowest italic."
|
|
"Make highest priority lines bold, and lowest italic."
|
|
(interactive)
|
|
(interactive)
|
|
@@ -6636,6 +6640,10 @@ Any match of REMOVE-RE will be removed from TXT."
|
|
(add-text-properties 0 (length txt) '(org-heading t) txt)
|
|
(add-text-properties 0 (length txt) '(org-heading t) txt)
|
|
|
|
|
|
;; Prepare the variables needed in the eval of the compiled format
|
|
;; Prepare the variables needed in the eval of the compiled format
|
|
|
|
+ (if org-prefix-has-breadcrumbs
|
|
|
|
+ (setq breadcrumbs (org-with-point-at (org-get-at-bol 'org-marker)
|
|
|
|
+ (let ((s (org-display-outline-path nil nil "->" t)))
|
|
|
|
+ (if (eq "" s) "" (concat s "->"))))))
|
|
(setq time (cond (s2 (concat
|
|
(setq time (cond (s2 (concat
|
|
(org-agenda-time-of-day-to-ampm-maybe s1)
|
|
(org-agenda-time-of-day-to-ampm-maybe s1)
|
|
"-" (org-agenda-time-of-day-to-ampm-maybe s2)
|
|
"-" (org-agenda-time-of-day-to-ampm-maybe s2)
|
|
@@ -6647,9 +6655,6 @@ Any match of REMOVE-RE will be removed from TXT."
|
|
"......")))
|
|
"......")))
|
|
(t ""))
|
|
(t ""))
|
|
extra (or (and (not habitp) extra) "")
|
|
extra (or (and (not habitp) extra) "")
|
|
- breadcrumbs (org-with-point-at (org-get-at-bol 'org-marker)
|
|
|
|
- (let ((s (org-display-outline-path nil nil "->" t)))
|
|
|
|
- (if (eq "" s) "" (concat s "->"))))
|
|
|
|
category (if (symbolp category) (symbol-name category) category)
|
|
category (if (symbolp category) (symbol-name category) category)
|
|
thecategory (copy-sequence category)
|
|
thecategory (copy-sequence category)
|
|
level (or level ""))
|
|
level (or level ""))
|
|
@@ -7165,10 +7170,10 @@ in the file. Otherwise, restriction will be to the current subtree."
|
|
(list (buffer-file-name (buffer-base-buffer))))
|
|
(list (buffer-file-name (buffer-base-buffer))))
|
|
(org-back-to-heading t)
|
|
(org-back-to-heading t)
|
|
(move-overlay org-agenda-restriction-lock-overlay
|
|
(move-overlay org-agenda-restriction-lock-overlay
|
|
- (point) (save-excursion (org-end-of-subtree t) (point)))
|
|
|
|
|
|
+ (point) (save-excursion (org-end-of-subtree t t) (point)))
|
|
(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)))
|
|
|
|
|
|
+ (save-excursion (org-end-of-subtree t t)))
|
|
(message "Locking agenda restriction to subtree"))
|
|
(message "Locking agenda restriction to subtree"))
|
|
(put 'org-agenda-files 'org-restrict
|
|
(put 'org-agenda-files 'org-restrict
|
|
(list (buffer-file-name (buffer-base-buffer))))
|
|
(list (buffer-file-name (buffer-base-buffer))))
|
|
@@ -9140,9 +9145,9 @@ ARG is passed through to `org-deadline'."
|
|
(org-clock-in arg)
|
|
(org-clock-in arg)
|
|
(let* ((marker (or (org-get-at-bol 'org-marker)
|
|
(let* ((marker (or (org-get-at-bol 'org-marker)
|
|
(org-agenda-error)))
|
|
(org-agenda-error)))
|
|
- (hdmarker (or (org-get-at-bol 'org-hd-marker)
|
|
|
|
- marker))
|
|
|
|
|
|
+ (hdmarker (or (org-get-at-bol 'org-hd-marker) marker))
|
|
(pos (marker-position marker))
|
|
(pos (marker-position marker))
|
|
|
|
+ (col (current-column))
|
|
newhead)
|
|
newhead)
|
|
(org-with-remote-undo (marker-buffer marker)
|
|
(org-with-remote-undo (marker-buffer marker)
|
|
(with-current-buffer (marker-buffer marker)
|
|
(with-current-buffer (marker-buffer marker)
|
|
@@ -9153,14 +9158,15 @@ ARG is passed through to `org-deadline'."
|
|
(org-cycle-hide-drawers 'children)
|
|
(org-cycle-hide-drawers 'children)
|
|
(org-clock-in arg)
|
|
(org-clock-in arg)
|
|
(setq newhead (org-get-heading)))
|
|
(setq newhead (org-get-heading)))
|
|
- (org-agenda-change-all-lines newhead hdmarker)))))
|
|
|
|
|
|
+ (org-agenda-change-all-lines newhead hdmarker))
|
|
|
|
+ (org-move-to-column col))))
|
|
|
|
|
|
(defun org-agenda-clock-out ()
|
|
(defun org-agenda-clock-out ()
|
|
"Stop the currently running clock."
|
|
"Stop the currently running clock."
|
|
(interactive)
|
|
(interactive)
|
|
(unless (marker-buffer org-clock-marker)
|
|
(unless (marker-buffer org-clock-marker)
|
|
(error "No running clock"))
|
|
(error "No running clock"))
|
|
- (let ((marker (make-marker)) newhead)
|
|
|
|
|
|
+ (let ((marker (make-marker)) (col (current-column)) newhead)
|
|
(org-with-remote-undo (marker-buffer org-clock-marker)
|
|
(org-with-remote-undo (marker-buffer org-clock-marker)
|
|
(with-current-buffer (marker-buffer org-clock-marker)
|
|
(with-current-buffer (marker-buffer org-clock-marker)
|
|
(save-excursion
|
|
(save-excursion
|
|
@@ -9172,7 +9178,9 @@ ARG is passed through to `org-deadline'."
|
|
(org-clock-out)
|
|
(org-clock-out)
|
|
(setq newhead (org-get-heading))))))
|
|
(setq newhead (org-get-heading))))))
|
|
(org-agenda-change-all-lines newhead marker)
|
|
(org-agenda-change-all-lines newhead marker)
|
|
- (move-marker marker nil)))
|
|
|
|
|
|
+ (move-marker marker nil)
|
|
|
|
+ (org-move-to-column col)
|
|
|
|
+ (org-agenda-unmark-clocking-task)))
|
|
|
|
|
|
(defun org-agenda-clock-cancel (&optional arg)
|
|
(defun org-agenda-clock-cancel (&optional arg)
|
|
"Cancel the currently running clock."
|
|
"Cancel the currently running clock."
|