diff options
author | Bastien Guerry <bzg@altern.org> | 2012-04-22 15:27:21 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-04-22 15:27:21 +0200 |
commit | de7c48759cd67af517058bed71f96c50e2c2ebf7 (patch) | |
tree | cb217c62017f34fb1d4cd82b4ca8895d10cf46fe | |
parent | 0a9c29d30518222f455b72ef6955ec02b8a4814d (diff) | |
download | org-mode-de7c48759cd67af517058bed71f96c50e2c2ebf7.tar.gz |
Let `org-toggle-sticky-agenda' output a message only when called interactively.
* org-agenda.el (org-toggle-sticky-agenda): Only shout a
message when called interactively.
(org-agenda-get-restriction-and-command): Call
`org-toggle-sticky-agenda' interactively.
-rw-r--r-- | lisp/org-agenda.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index cfa6ad5..21dd26d 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -1836,12 +1836,14 @@ When nil, `q' will kill the single agenda buffer." (> (prefix-numeric-value arg) 0) (not org-agenda-sticky)))) (if (equal new-value org-agenda-sticky) - (message "Sticky agenda was already %s" - (if org-agenda-sticky "enabled" "disabled")) + (and (called-interactively-p 'interactive) + (message "Sticky agenda was already %s" + (if org-agenda-sticky "enabled" "disabled"))) (setq org-agenda-sticky new-value) (org-agenda-kill-all-agenda-buffers) - (message "Sticky agenda was %s" - (if org-agenda-sticky "enabled" "disabled"))))) + (and (called-interactively-p 'interactive) + (message "Sticky agenda was %s" + (if org-agenda-sticky "enabled" "disabled")))))) (defvar org-agenda-buffer nil "Agenda buffer currently being generated.") @@ -2650,7 +2652,7 @@ s Search for keywords * Toggle sticky agenda views (cons (substring (car x) 1) (cdr x)))) custom)))) ((eq c ?*) - (org-toggle-sticky-agenda) + (call-interactively 'org-toggle-sticky-agenda) (sit-for 2)) ((and (not restrict-ok) (memq c '(?1 ?0 ?<))) (message "Restriction is only possible in Org-mode buffers") |