From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xu Chunyang Subject: [PATCH] org-agenda: Disable message logging for some messages Date: Sat, 13 Jan 2018 12:20:35 +0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eaDJG-00052s-Bh for emacs-orgmode@gnu.org; Fri, 12 Jan 2018 23:20:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eaDJF-0001kb-2t for emacs-orgmode@gnu.org; Fri, 12 Jan 2018 23:20:46 -0500 Received: from forward104j.mail.yandex.net ([2a02:6b8:0:801:2::107]:33778) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eaDJE-0001jM-MJ for emacs-orgmode@gnu.org; Fri, 12 Jan 2018 23:20:45 -0500 Received: from mxback12g.mail.yandex.net (mxback12g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:91]) by forward104j.mail.yandex.net (Yandex) with ESMTP id 9514144475 for ; Sat, 13 Jan 2018 07:20:40 +0300 (MSK) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: The Org mailing list * 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