* [PATCH] org-agenda: Disable message logging for some messages
@ 2018-01-13 4:20 Xu Chunyang
2018-01-15 15:35 ` Nicolas Goaziou
0 siblings, 1 reply; 2+ messages in thread
From: Xu Chunyang @ 2018-01-13 4:20 UTC (permalink / raw)
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] org-agenda: Disable message logging for some messages
2018-01-13 4:20 [PATCH] org-agenda: Disable message logging for some messages Xu Chunyang
@ 2018-01-15 15:35 ` Nicolas Goaziou
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2018-01-15 15:35 UTC (permalink / raw)
To: Xu Chunyang; +Cc: The Org mailing list
Hello,
Xu Chunyang <mail@xuchunyang.me> writes:
> * 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.
I applied your patch. Thank you.
For the record, I used `org-unlogged-message' and added TINYCHANGE at
the end of the commit message.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-15 15:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-13 4:20 [PATCH] org-agenda: Disable message logging for some messages Xu Chunyang
2018-01-15 15:35 ` Nicolas Goaziou
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).