diff options
author | Bastien Guerry <bzg@altern.org> | 2012-08-30 10:10:18 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-08-30 10:10:18 +0200 |
commit | b74140e1b00113f718c4bb990e0c8dd49eb7dd38 (patch) | |
tree | 78f192c26de0e0af6393c45062a28cd27668273f | |
parent | 92f2e9efb2c37b098f1f870ea2faca442b850238 (diff) | |
download | org-mode-b74140e1b00113f718c4bb990e0c8dd49eb7dd38.tar.gz |
org-agenda.el: Unconditionnally set ̀org-compile-prefix-format'
* org-agenda.el (org-diary): Don't check whether there is an
agenda buffer when trying to compile the prefix format.
(org-compile-prefix-format): Check if there is an agenda
buffer. If not, use the current buffer.
-rw-r--r-- | lisp/org-agenda.el | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 8b1fd7c..35d9dab 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -4883,9 +4883,7 @@ function from a program - use `org-agenda-get-day-entries' instead." ;; I am not sure if this works with sticky agendas, because the marker ;; list is then no longer a global variable. (org-agenda-reset-markers)) - ;; Prevent `org-compile-prefix-format' to fail when there is no agenda - (when (buffer-live-p org-agenda-buffer) - (org-compile-prefix-format 'agenda)) + (org-compile-prefix-format 'agenda) (org-set-sorting-strategy 'agenda) (setq args (or args '(:deadline :scheduled :timestamp :sexp))) (let* ((files (if (and entry (stringp entry) (string-match "\\S-" entry)) @@ -6180,7 +6178,7 @@ and stored in the variable `org-prefix-format-compiled'." (setq s (replace-match "%s" t nil s)) (push varform vars)) (setq vars (nreverse vars)) - (with-current-buffer org-agenda-buffer + (with-current-buffer (or org-agenda-buffer (current-buffer)) (setq org-prefix-format-compiled (list `((org-prefix-has-time ,org-prefix-has-time) |