From: Xu Chunyang <mail@xuchunyang.me>
To: The Org mailing list <emacs-orgmode@gnu.org>
Subject: [PATCH] org-agenda: Disable message logging for some messages
Date: Sat, 13 Jan 2018 12:20:35 +0800 [thread overview]
Message-ID: <m2zi5icru4.fsf@xuchunyang.me> (raw)
* 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
next reply other threads:[~2018-01-13 4:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-13 4:20 Xu Chunyang [this message]
2018-01-15 15:35 ` [PATCH] org-agenda: Disable message logging for some messages Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2zi5icru4.fsf@xuchunyang.me \
--to=mail@xuchunyang.me \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).