Merge branch 'master-fixes' into master-new
This commit is contained in:
commit
8a910bd40b
|
@ -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)
|
(org-agenda-unmark-clocking-task)
|
||||||
(if (eq (overlay-get o 'type) 'org-agenda-clocking)
|
|
||||||
(delete-overlay o)))
|
|
||||||
(overlays-in (point-min) (point-max)))
|
|
||||||
(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)
|
(hdmarker (or (org-get-at-bol 'org-hd-marker) 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."
|
||||||
|
|
32
lisp/org.el
32
lisp/org.el
|
@ -9870,45 +9870,35 @@ If it decides that it is not responsible for this link, it must return
|
||||||
nil to indicate that that Org-mode can continue with other options
|
nil to indicate that that Org-mode can continue with other options
|
||||||
like exact and fuzzy text search.")
|
like exact and fuzzy text search.")
|
||||||
|
|
||||||
(defun org-next-link ()
|
(defun org-next-link (&optional search-backward)
|
||||||
"Move forward to the next link.
|
"Move forward to the next link.
|
||||||
If the link is in hidden text, expose it."
|
If the link is in hidden text, expose it."
|
||||||
(interactive)
|
(interactive "P")
|
||||||
(when (and org-link-search-failed (eq this-command last-command))
|
(when (and org-link-search-failed (eq this-command last-command))
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(message "Link search wrapped back to beginning of buffer"))
|
(message "Link search wrapped back to beginning of buffer"))
|
||||||
(setq org-link-search-failed nil)
|
(setq org-link-search-failed nil)
|
||||||
(let* ((pos (point))
|
(let* ((pos (point))
|
||||||
(ct (org-context))
|
(ct (org-context))
|
||||||
(a (assoc :link ct)))
|
(a (assoc :link ct))
|
||||||
(if a (goto-char (nth 2 a)))
|
(srch-fun (if search-backward 're-search-backward 're-search-forward)))
|
||||||
(if (re-search-forward org-any-link-re nil t)
|
(cond (a (goto-char (nth (if search-backward 1 2) a)))
|
||||||
|
((looking-at org-any-link-re)
|
||||||
|
;; Don't stay stuck at link without an org-link face
|
||||||
|
(forward-char (if search-backward -1 1))))
|
||||||
|
(if (funcall srch-fun org-any-link-re nil t)
|
||||||
(progn
|
(progn
|
||||||
(goto-char (match-beginning 0))
|
(goto-char (match-beginning 0))
|
||||||
(if (outline-invisible-p) (org-show-context)))
|
(if (outline-invisible-p) (org-show-context)))
|
||||||
(goto-char pos)
|
(goto-char pos)
|
||||||
(setq org-link-search-failed t)
|
(setq org-link-search-failed t)
|
||||||
(error "No further link found"))))
|
(message "No further link found"))))
|
||||||
|
|
||||||
(defun org-previous-link ()
|
(defun org-previous-link ()
|
||||||
"Move backward to the previous link.
|
"Move backward to the previous link.
|
||||||
If the link is in hidden text, expose it."
|
If the link is in hidden text, expose it."
|
||||||
(interactive)
|
(interactive)
|
||||||
(when (and org-link-search-failed (eq this-command last-command))
|
(funcall 'org-next-link t))
|
||||||
(goto-char (point-max))
|
|
||||||
(message "Link search wrapped back to end of buffer"))
|
|
||||||
(setq org-link-search-failed nil)
|
|
||||||
(let* ((pos (point))
|
|
||||||
(ct (org-context))
|
|
||||||
(a (assoc :link ct)))
|
|
||||||
(if a (goto-char (nth 1 a)))
|
|
||||||
(if (re-search-backward org-any-link-re nil t)
|
|
||||||
(progn
|
|
||||||
(goto-char (match-beginning 0))
|
|
||||||
(if (outline-invisible-p) (org-show-context)))
|
|
||||||
(goto-char pos)
|
|
||||||
(setq org-link-search-failed t)
|
|
||||||
(error "No further link found"))))
|
|
||||||
|
|
||||||
(defun org-translate-link (s)
|
(defun org-translate-link (s)
|
||||||
"Translate a link string if a translation function has been defined."
|
"Translate a link string if a translation function has been defined."
|
||||||
|
|
Loading…
Reference in New Issue