Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode

Conflicts resolved in:

	ChangeLog
	org.el
This commit is contained in:
Carsten Dominik 2008-02-27 15:28:45 +01:00
commit 45e09a0862
2 changed files with 31 additions and 14 deletions

View File

@ -1,5 +1,7 @@
2008-02-27 Carsten Dominik <dominik@science.uva.nl> 2008-02-27 Carsten Dominik <dominik@science.uva.nl>
* org-irc.el: Modified the installation instructions. * org-irc.el: Modified the installation instructions.
* org.el (org-store-link): Removed the (require 'org-irc), this is * org.el (org-store-link): Removed the (require 'org-irc), this is
@ -8,6 +10,15 @@
customizable. customizable.
(org-default-extensions): New option. (org-default-extensions): New option.
2008-02-26 Bastien Guerry <Bastien.Guerry@ens.fr>
* org.el (org-agenda-to-appt): New argument `refresh' let the user
delete previous appointments stored in `appt-time-msg-list'.
(org-deadline-warning-days): Mention the fact that a value of zero
will be treated like negative values.
(org-show-todo-tree): Fix a small typo in the docstring.
2008-02-26 Carsten Dominik <dominik@science.uva.nl> 2008-02-26 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-agenda-to-appt): Set `org-deadline-warning-days' to * org.el (org-agenda-to-appt): Set `org-deadline-warning-days' to

34
org.el
View File

@ -14879,7 +14879,7 @@ This function is run automatically after each state change to a DONE state."
"Make a compact tree which shows all headlines marked with TODO. "Make a compact tree which shows all headlines marked with TODO.
The tree will show the lines where the regexp matches, and all higher The tree will show the lines where the regexp matches, and all higher
headlines above the match. headlines above the match.
With \\[universal-argument] prefix, also show the DONE entries. With a \\[universal-argument] prefix, also show the DONE entries.
With a numeric prefix N, construct a sparse tree for the Nth element With a numeric prefix N, construct a sparse tree for the Nth element
of `org-todo-keywords-1'." of `org-todo-keywords-1'."
(interactive "P") (interactive "P")
@ -18603,27 +18603,32 @@ If there is already a time stamp at the cursor position, update it."
(org-insert-time-stamp (org-insert-time-stamp
(encode-time 0 0 0 (nth 1 cal-date) (car cal-date) (nth 2 cal-date)))))) (encode-time 0 0 0 (nth 1 cal-date) (car cal-date) (nth 2 cal-date))))))
;; Make appt aware of appointments from the agenda (defvar appt-time-msg-list)
;;;###autoload ;;;###autoload
(defun org-agenda-to-appt (&optional filter) (defun org-agenda-to-appt (&optional refresh filter)
"Activate appointments found in `org-agenda-files'. "Activate appointments found in `org-agenda-files'.
When prefixed, prompt for a regular expression and use it as a With a \\[universal-argument] prefix, refresh the list of
filter: only add entries if they match this regular expression. appointements.
FILTER can be a string. In this case, use this string as a If FILTER is t, interactively prompt the user for a regular
regular expression to filter results. expression, and filter out entries that don't match it.
FILTER can also be an alist, with the car of each cell being If FILTER is a string, use this string as a regular expression
for filtering entries out.
FILTER can also be an alist with the car of each cell being
either 'headline or 'category. For example: either 'headline or 'category. For example:
'((headline \"IMPORTANT\") '((headline \"IMPORTANT\")
(category \"Work\")) (category \"Work\"))
will only add headlines containing IMPORTANT or headlines will only add headlines containing IMPORTANT or headlines
belonging to the category \"Work\"." belonging to the \"Work\" category."
(interactive "P") (interactive "P")
(require 'calendar) (require 'calendar)
(if (equal filter '(4)) (if refresh (setq appt-time-msg-list nil))
(if (eq filter t)
(setq filter (read-from-minibuffer "Regexp filter: "))) (setq filter (read-from-minibuffer "Regexp filter: ")))
(let* ((cnt 0) ; count added events (let* ((cnt 0) ; count added events
(org-agenda-new-buffers nil) (org-agenda-new-buffers nil)
@ -18636,10 +18641,9 @@ belonging to the category \"Work\"."
(setq entries (setq entries
(append entries (append entries
(org-agenda-get-day-entries (org-agenda-get-day-entries
file today file today :timestamp :scheduled :deadline))))
:timestamp :scheduled :deadline))))
(setq entries (delq nil entries)) (setq entries (delq nil entries))
;; Map thru entries and find if they pass thru the filter ;; Map thru entries and find if we should filter them out
(mapc (mapc
(lambda(x) (lambda(x)
(let* ((evt (org-trim (get-text-property 1 'txt x))) (let* ((evt (org-trim (get-text-property 1 'txt x)))
@ -18663,7 +18667,9 @@ belonging to the category \"Work\"."
(appt-add tod evt) (appt-add tod evt)
(setq cnt (1+ cnt))))) entries) (setq cnt (1+ cnt))))) entries)
(org-release-buffers org-agenda-new-buffers) (org-release-buffers org-agenda-new-buffers)
(message "Added %d event%s for today" cnt (if (> cnt 1) "s" "")))) (if (eq cnt 0)
(message "No event to add")
(message "Added %d event%s for today" cnt (if (> cnt 1) "s" "")))))
;;; The clock for measuring work time. ;;; The clock for measuring work time.