diff options
author | Bastien Guerry <bzg@altern.org> | 2012-12-11 18:14:00 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-12-11 18:14:00 +0100 |
commit | 5508053d6334ff91f5122cf3797ee3dc3367982c (patch) | |
tree | b29fe7691eecb10c00fa85d15995e2fe5a61233a | |
parent | b1f36921d71de646bb95059156fc6232c044e01c (diff) | |
parent | 7f0e7cb9b98d6ad1ab6e559fef81c1394f0a748c (diff) | |
download | org-mode-5508053d6334ff91f5122cf3797ee3dc3367982c.tar.gz |
Merge branch 'maint'
-rw-r--r-- | lisp/org-agenda.el | 13 | ||||
-rw-r--r-- | lisp/org-clock.el | 2 | ||||
-rw-r--r-- | lisp/org-table.el | 4 | ||||
-rw-r--r-- | lisp/org-timer.el | 3 | ||||
-rw-r--r-- | lisp/org.el | 20 |
5 files changed, 34 insertions, 8 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 2c484b5..9fabba9 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -3534,6 +3534,9 @@ generating a new one." (while (org-activate-bracket-links (point-max)) (add-text-properties (match-beginning 0) (match-end 0) '(face org-link))) + (while (org-activate-plain-links (point-max)) + (add-text-properties (match-beginning 0) (match-end 0) + '(face org-link))) (org-agenda-align-tags) (unless org-agenda-with-colors (remove-text-properties (point-min) (point-max) '(face nil)))) @@ -3548,7 +3551,11 @@ generating a new one." (org-agenda-fontify-priorities)) (when (and org-agenda-dim-blocked-tasks org-blocker-hook) (org-agenda-dim-blocked-tasks)) - (org-agenda-mark-clocking-task) + ;; We need to widen when `org-agenda-finalize' is called from + ;; `org-agenda-change-all-lines' (e.g. in `org-agenda-clock-in') + (save-restriction + (widen) + (org-agenda-mark-clocking-task)) (when org-agenda-entry-text-mode (org-agenda-entry-text-hide) (org-agenda-entry-text-show)) @@ -8664,7 +8671,7 @@ ARG is passed through to `org-schedule'." (goto-char pos) (setq ts (org-schedule arg time))) (org-agenda-show-new-time marker ts "S")) - (message "Item scheduled for %s" ts))) + (message "%s" ts))) (defun org-agenda-deadline (arg &optional time) "Schedule the item at point. @@ -8684,7 +8691,7 @@ ARG is passed through to `org-deadline'." (goto-char pos) (setq ts (org-deadline arg time))) (org-agenda-show-new-time marker ts "D")) - (message "Deadline for this item set to %s" ts))) + (message "%s" ts))) (defun org-agenda-clock-in (&optional arg) "Start the clock on the currently selected item." diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 6595330..2b37d7c 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -1453,7 +1453,7 @@ to, overriding the existing value of `org-clock-out-switch-to-state'." (delq 'org-mode-line-string global-mode-string)) (setq frame-title-format org-frame-title-format-backup) (force-mode-line-update) - (if fail-quietly (throw 'exit t) (error "No active clock"))) + (if fail-quietly (throw 'exit t) (user-error "No active clock"))) (let ((org-clock-out-switch-to-state (if switch-to-state (completing-read "Switch to state: " diff --git a/lisp/org-table.el b/lisp/org-table.el index 33fcb41..acad0bb 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -1594,6 +1594,7 @@ should be done in reverse order." (interactive "P") (let* ((thisline (org-current-line)) (thiscol (org-table-current-column)) + (otc org-table-overlay-coordinates) beg end bcol ecol tend tbeg column lns pos) (when (equal thiscol 0) (if (org-called-interactively-p 'any) @@ -1642,12 +1643,15 @@ should be done in reverse order." x)) (org-split-string (buffer-substring beg end) "\n"))) (setq lns (org-do-sort lns "Table" with-case sorting-type)) + (when org-table-overlay-coordinates + (org-table-toggle-coordinate-overlays)) (delete-region beg end) (move-marker beg nil) (move-marker end nil) (insert (mapconcat 'cdr lns "\n") "\n") (org-goto-line thisline) (org-table-goto-column thiscol) + (when otc (org-table-toggle-coordinate-overlays)) (message "%d lines sorted, based on column %d" (length lns) column))) ;;;###autoload diff --git a/lisp/org-timer.el b/lisp/org-timer.el index a314564..8a5b599 100644 --- a/lisp/org-timer.el +++ b/lisp/org-timer.el @@ -162,7 +162,8 @@ With prefix arg STOP, stop it entirely." (run-hooks 'org-timer-stop-hook) (setq org-timer-start-time nil org-timer-pause-time nil) - (org-timer-set-mode-line 'off)) + (org-timer-set-mode-line 'off) + (message "Timer stopped")) ;;;###autoload (defun org-timer (&optional restart no-insert-p) diff --git a/lisp/org.el b/lisp/org.el index c4a006b..fd500cc 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -8161,11 +8161,12 @@ a time stamp, by a property or by priority. The command prompts for the sorting type unless it has been given to the function through the SORTING-TYPE argument, which needs to be a character, -\(?n ?N ?a ?A ?t ?T ?s ?S ?d ?D ?p ?P ?r ?R ?f ?F). Here is the +\(?n ?N ?a ?A ?t ?T ?s ?S ?d ?D ?p ?P ?o ?O ?r ?R ?f ?F). Here is the precise meaning of each character: n Numerically, by converting the beginning of the entry/item to a number. a Alphabetically, ignoring the TODO keyword and the priority, if any. +o By order of TODO keywords. t By date/time, either the first active time stamp in the entry, or, if none exist, by the first inactive one. s By the scheduled date/time. @@ -8185,6 +8186,13 @@ Comparing entries ignores case by default. However, with an optional argument WITH-CASE, the sorting considers case as well." (interactive "P") (let ((case-func (if with-case 'identity 'downcase)) + (cmstr + ;; The clock marker is lost when using `sort-subr', let's + ;; store the clocking string. + (when (equal (marker-buffer org-clock-marker) (current-buffer)) + (save-excursion + (goto-char org-clock-marker) + (looking-back "^.*") (match-string-no-properties 0)))) start beg end stars re re2 txt what tmp) ;; Find beginning and end of region to sort @@ -8241,7 +8249,7 @@ WITH-CASE, the sorting considers case as well." (message "Sort %s: [a]lpha [n]umeric [p]riority p[r]operty todo[o]rder [f]unc [t]ime [s]cheduled [d]eadline [c]reated - A/N/T/S/D/C/P/O/F means reversed:" + A/N/P/R/O/F/T/S/D/C means reversed:" what) (setq sorting-type (read-char-exclusive)) @@ -8340,6 +8348,12 @@ WITH-CASE, the sorting considers case as well." ((= dcst ?f) compare-func) ((member dcst '(?p ?t ?s ?d ?c)) '<))))) (run-hooks 'org-after-sorting-entries-or-items-hook) + ;; Reset the clock marker if needed + (when cmstr + (save-excursion + (goto-char start) + (search-forward cmstr nil t) + (move-marker org-clock-marker (point)))) (message "Sorting entries...done"))) (defun org-do-sort (table what &optional with-case sorting-type) @@ -8351,7 +8365,7 @@ the car of the elements of the table. If WITH-CASE is non-nil, the sorting will be case-sensitive." (unless sorting-type (message - "Sort %s: [a]lphabetic. [n]umeric. [t]ime. A/N/T means reversed:" + "Sort %s: [a]lphabetic, [n]umeric, [t]ime. A/N/T means reversed:" what) (setq sorting-type (read-char-exclusive))) (let ((dcst (downcase sorting-type)) |