Merge branch 'maint'

Conflicts:
	lisp/org-agenda.el
This commit is contained in:
Bastien Guerry 2014-06-12 15:08:53 +02:00
commit bb61df9d91
1 changed files with 11 additions and 26 deletions

View File

@ -2159,9 +2159,9 @@ The following commands are available:
nil t) nil t)
(unless org-agenda-keep-modes (unless org-agenda-keep-modes
(setq org-agenda-follow-mode org-agenda-start-with-follow-mode (setq org-agenda-follow-mode org-agenda-start-with-follow-mode
org-agenda-entry-text-mode org-agenda-start-with-entry-text-mode org-agenda-entry-text-mode org-agenda-start-with-entry-text-mode))
org-agenda-clockreport-mode org-agenda-start-with-clockreport-mode (setq org-agenda-show-log org-agenda-start-with-log-mode)
org-agenda-show-log org-agenda-start-with-log-mode)) (setq org-agenda-clockreport-mode org-agenda-start-with-clockreport-mode)
(add-to-invisibility-spec '(org-filtered)) (add-to-invisibility-spec '(org-filtered))
(add-to-invisibility-spec '(org-link)) (add-to-invisibility-spec '(org-link))
(easy-menu-change (easy-menu-change
@ -3539,7 +3539,6 @@ removed from the entry content. Currently only `planning' is allowed here."
(defvar org-agenda-regexp-filter nil) (defvar org-agenda-regexp-filter nil)
(defvar org-agenda-effort-filter nil) (defvar org-agenda-effort-filter nil)
(defvar org-agenda-top-headline-filter nil) (defvar org-agenda-top-headline-filter nil)
(defvar org-agenda-tag-filter-while-redo nil)
(defvar org-agenda-tag-filter-preset nil (defvar org-agenda-tag-filter-preset nil
"A preset of the tags filter used for secondary agenda filtering. "A preset of the tags filter used for secondary agenda filtering.
This must be a list of strings, each string must be a single tag preceded This must be a list of strings, each string must be a single tag preceded
@ -4333,14 +4332,6 @@ items if they have an hour specification like [h]h:mm."
(setq p (plist-put p :tstart clocktable-start)) (setq p (plist-put p :tstart clocktable-start))
(setq p (plist-put p :tend clocktable-end)) (setq p (plist-put p :tend clocktable-end))
(setq p (plist-put p :scope 'agenda)) (setq p (plist-put p :scope 'agenda))
(when (and (eq org-agenda-clockreport-mode 'with-filter)
(setq filter (or org-agenda-tag-filter-while-redo
(get 'org-agenda-tag-filter :preset-filter))))
(setq p (plist-put p :tags (mapconcat (lambda (x)
(if (string-match "[<>=]" x)
""
x))
filter ""))))
(setq tbl (apply 'org-clock-get-clocktable p)) (setq tbl (apply 'org-clock-get-clocktable p))
(insert tbl))) (insert tbl)))
(goto-char (point-min)) (goto-char (point-min))
@ -7516,8 +7507,7 @@ to switch to narrowing."
(org-agenda-filter-apply org-agenda-tag-filter 'tag) (org-agenda-filter-apply org-agenda-tag-filter 'tag)
(setq maybe-refresh t)) (setq maybe-refresh t))
(t (error "Invalid tag selection character %c" char))) (t (error "Invalid tag selection character %c" char)))
(when (and maybe-refresh (when maybe-refresh
(eq org-agenda-clockreport-mode 'with-filter))
(org-agenda-redo)))) (org-agenda-redo))))
(defun org-agenda-get-represented-tags () (defun org-agenda-get-represented-tags ()
@ -8126,15 +8116,12 @@ so that the date SD will be in that range."
(format " (maximum number of lines is %d)" (format " (maximum number of lines is %d)"
(if (integerp arg) arg org-agenda-entry-text-maxlines)))))) (if (integerp arg) arg org-agenda-entry-text-maxlines))))))
(defun org-agenda-clockreport-mode (&optional with-filter) (defun org-agenda-clockreport-mode ()
"Toggle clocktable mode in an agenda buffer. "Toggle clocktable mode in an agenda buffer."
With prefix arg WITH-FILTER, make the clocktable respect the current (interactive)
agenda filter."
(interactive "P")
(org-agenda-check-type t 'agenda) (org-agenda-check-type t 'agenda)
(if with-filter (setq org-agenda-clockreport-mode (not org-agenda-clockreport-mode))
(setq org-agenda-clockreport-mode 'with-filter) (setq org-agenda-start-with-clockreport-mode org-agenda-clockreport-mode)
(setq org-agenda-clockreport-mode (not org-agenda-clockreport-mode)))
(org-agenda-set-mode-name) (org-agenda-set-mode-name)
(org-agenda-redo) (org-agenda-redo)
(message "Clocktable mode is %s" (message "Clocktable mode is %s"
@ -8155,6 +8142,7 @@ With a double `C-u' prefix arg, show *only* log items, nothing else."
nil 'clockcheck)) nil 'clockcheck))
(special '(closed clock state)) (special '(closed clock state))
(t (not org-agenda-show-log)))) (t (not org-agenda-show-log))))
(setq org-agenda-start-with-log-mode org-agenda-show-log)
(org-agenda-set-mode-name) (org-agenda-set-mode-name)
(org-agenda-redo) (org-agenda-redo)
(message "Log mode is %s" (message "Log mode is %s"
@ -8285,10 +8273,7 @@ When called with a prefix argument, include all archive files as well."
" Archives" " Archives"
(format " :%s:" org-archive-tag)) (format " :%s:" org-archive-tag))
"") "")
(if org-agenda-clockreport-mode (if org-agenda-clockreport-mode " Clock" "")))
(if (eq org-agenda-clockreport-mode 'with-filter)
" Clock{}" " Clock")
"")))
(force-mode-line-update)) (force-mode-line-update))
(define-obsolete-function-alias (define-obsolete-function-alias