emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [PATCH] org-agenda: Disable message logging for some messages


From: Xu Chunyang
Subject: [O] [PATCH] org-agenda: Disable message logging for some messages
Date: Sat, 13 Jan 2018 12:20:35 +0800

* lisp/org-agenda.el (org-agenda-filter-by-tag):
(org-agenda-view-mode-dispatch):
(org-agenda-diary-entry):
(org-agenda-bulk-action): Disable message logging for some messages.
---

When under the *Org Agenda* buffer, my *Messages* buffer is filled
quickly by these "prompt"-like messages, I prefer they are not written to
the *Messages* buffer.

lisp/org-agenda.el | 40 ++++++++++++++++++++++------------------
 1 file changed, 22 insertions(+), 18 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index b2729c1ca..6d04c8d35 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -7535,12 +7535,13 @@ also press `-' or `+' to switch between filtering and 
excluding."
         a n tag)
     (unless char
       (while (not (memq char valid-char-list))
-       (message
-        "%s by tag [%s ]:tag-char, [TAB]:tag, %s[/]:off, 
[+/-]:filter/exclude%s, [q]:quit"
-        (if exclude "Exclude" "Filter")
-        tag-chars
-        (if org-agenda-auto-exclude-function "[RET], " "")
-        (if expand "" ", no grouptag expand"))
+       (let ((message-log-max nil))
+         (message
+          "%s by tag [%s ]:tag-char, [TAB]:tag, %s[/]:off, 
[+/-]:filter/exclude%s, [q]:quit"
+          (if exclude "Exclude" "Filter")
+          tag-chars
+          (if org-agenda-auto-exclude-function "[RET], " "")
+          (if expand "" ", no grouptag expand")))
        (setq char (read-char-exclusive))
        ;; Excluding or filtering down
        (cond ((eq char ?-) (setq exclude t))
@@ -7976,9 +7977,10 @@ With prefix ARG, go backward that many times the current 
span."
 (defun org-agenda-view-mode-dispatch ()
   "Call one of the view mode commands."
   (interactive)
-  (message "View: [d]ay  [w]eek  for[t]night  [m]onth  [y]ear  [SPC]reset  
[q]uit/abort
+  (let ((message-log-max nil))
+    (message "View: [d]ay  [w]eek  for[t]night  [m]onth  [y]ear  [SPC]reset  
[q]uit/abort
       time[G]rid   [[]inactive  [f]ollow      [l]og    [L]og-all   [c]lockcheck
-      [a]rch-trees [A]rch-files clock[R]eport include[D]iary       
[E]ntryText")
+      [a]rch-trees [A]rch-files clock[R]eport include[D]iary       
[E]ntryText"))
   (pcase (read-char-exclusive)
     (?\ (call-interactively 'org-agenda-reset-view))
     (?d (call-interactively 'org-agenda-day-view))
@@ -9578,7 +9580,8 @@ entries in that Org file."
       (org-agenda-diary-entry-in-org-file)
     (require 'diary-lib)
     (let* ((char (progn
-                  (message "Diary entry: [d]ay [w]eekly [m]onthly [y]early 
[a]nniversary [b]lock [c]yclic")
+                  (let ((message-log-max nil))
+                    (message "Diary entry: [d]ay [w]eekly [m]onthly [y]early 
[a]nniversary [b]lock [c]yclic"))
                   (read-char-exclusive)))
           (cmd (cdr (assoc char
                            '((?d . diary-insert-entry)
@@ -9862,15 +9865,16 @@ The prefix arg is passed through to the command if 
possible."
       (user-error "Marker %s for bulk command is invalid" m)))
 
   ;; Prompt for the bulk command.
-  (message
-   (concat (if org-agenda-persistent-marks "Bulk (persistent): " "Bulk: ")
-          "[$]arch [A]rch->sib [t]odo [+/-]tag [s]chd [d]eadline [r]efile "
-          "[S]catter [f]unction    "
-          (and org-agenda-bulk-custom-functions
-               (format " Custom: [%s]"
-                       (mapconcat (lambda (f) (char-to-string (car f)))
-                                  org-agenda-bulk-custom-functions
-                                  "")))))
+  (let ((message-log-max nil))
+    (message
+     (concat (if org-agenda-persistent-marks "Bulk (persistent): " "Bulk: ")
+            "[$]arch [A]rch->sib [t]odo [+/-]tag [s]chd [d]eadline [r]efile "
+            "[S]catter [f]unction    "
+            (and org-agenda-bulk-custom-functions
+                 (format " Custom: [%s]"
+                         (mapconcat (lambda (f) (char-to-string (car f)))
+                                    org-agenda-bulk-custom-functions
+                                    ""))))))
   (catch 'exit
     (let* ((org-log-refile (if org-log-refile 'time nil))
           (entries (reverse org-agenda-bulk-marked-entries))
-- 
2.15.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]