forked from mirrors/org-mode
Rebuild agenda after adding new diary entries
This commit is contained in:
parent
62a7301a5e
commit
e80f24641c
|
@ -1,5 +1,11 @@
|
|||
2009-11-20 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-agenda.el (org-agenda-diary-entry-in-org-file): Rebuild
|
||||
agenda after adding new entry.
|
||||
|
||||
* org-datetree.el (org-datetree-find-day-create): Fix regular
|
||||
expression.
|
||||
|
||||
* org.el (org-display-outline-path): Use a format specifier for
|
||||
message, to avoid problems with heading containing `%'.
|
||||
|
||||
|
|
|
@ -6701,18 +6701,21 @@ The cursor may be at a date in the calendar, or in the Org agenda."
|
|||
(cond
|
||||
((equal char ?d)
|
||||
(setq text (read-string "Day entry: "))
|
||||
(org-agenda-add-entry-to-org-agenda-diary-file 'day text d1))
|
||||
(org-agenda-add-entry-to-org-agenda-diary-file 'day text d1)
|
||||
(and (equal (buffer-name) org-agenda-buffer-name) (org-agenda-redo)))
|
||||
((equal char ?a)
|
||||
(setq d1 (list (car d1) (nth 1 d1)
|
||||
(read-number (format "Reference year [%d]: " (nth 2 d1))
|
||||
(nth 2 d1))))
|
||||
(setq text (read-string "Anniversary (use %d to show years): "))
|
||||
(org-agenda-add-entry-to-org-agenda-diary-file 'anniversary text d1))
|
||||
(org-agenda-add-entry-to-org-agenda-diary-file 'anniversary text d1)
|
||||
(and (equal (buffer-name) org-agenda-buffer-name) (org-agenda-redo)))
|
||||
((equal char ?b)
|
||||
(setq text (read-string "Block entry: "))
|
||||
(unless (and d1 d2 (not (equal d1 d2)))
|
||||
(error "No block of days selected"))
|
||||
(org-agenda-add-entry-to-org-agenda-diary-file 'block text d1 d2))
|
||||
(org-agenda-add-entry-to-org-agenda-diary-file 'block text d1 d2)
|
||||
(and (equal (buffer-name) org-agenda-buffer-name) (org-agenda-redo)))
|
||||
((equal char ?j)
|
||||
(org-switch-to-buffer-other-window
|
||||
(find-file-noselect org-agenda-diary-file))
|
||||
|
|
|
@ -101,7 +101,7 @@ tree can be found."
|
|||
|
||||
(defun org-datetree-find-day-create (year month day)
|
||||
(org-narrow-to-subtree)
|
||||
(let ((re (format "^\\*+[ \t]+%d-%02d-\\([01][0-9]\\)[ \t\n]" year month))
|
||||
(let ((re (format "^\\*+[ \t]+%d-%02d-\\([0123][0-9]\\)[ \t\n]" year month))
|
||||
match)
|
||||
(goto-char (point-min))
|
||||
(while (and (setq match (re-search-forward re nil t))
|
||||
|
|
Loading…
Reference in a new issue