unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#51778: 29.0.50; gnus-search uses `message' instead of `gnus-message'
@ 2021-11-11 21:59 Jose A. Ortega Ruiz
  2021-11-12  1:23 ` Eric Abrahamsen
  0 siblings, 1 reply; 5+ messages in thread
From: Jose A. Ortega Ruiz @ 2021-11-11 21:59 UTC (permalink / raw)
  To: 51778

[-- Attachment #1: Type: text/plain, Size: 426 bytes --]


Hi,

In gnus-search, there are several logs (some of them quite verbose when
one's iterating over long lists of groups) using `message'.  I think
that it'd be better to use `gnus-message' instead, with levels as
appropriate.  That way one can avoid (or enable!) them via gnus-verbose.

I'm attaching a patch changing them all to level 7, since they looked
like debug messages to me; but it's just a suggestion.

Thanks!
jao


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Use-gnus-message-for-logging-in-gnus-search.patch --]
[-- Type: text/x-diff, Size: 2760 bytes --]

From 0ea1df942474f8decb71a71c7f2ed03d86ef8991 Mon Sep 17 00:00:00 2001
From: jao <jao@gnu.org>
Date: Thu, 11 Nov 2021 21:54:19 +0000
Subject: [PATCH] Use gnus-message for logging in gnus-search

---
 lisp/gnus/gnus-search.el | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
index 3157358804..a4d319b4b8 100644
--- a/lisp/gnus/gnus-search.el
+++ b/lisp/gnus/gnus-search.el
@@ -1018,7 +1018,7 @@ gnus-search-run-search
 	  (single-search (gnus-search-single-p query))
 	  (grouplist (or groups (gnus-search-get-active srv)))
 	  q-string artlist group)
-      (message "Opening server %s" server)
+      (gnus-message 7 "Opening server %s" server)
       (gnus-open-server srv)
       ;; We should only be doing this once, in
       ;; `nnimap-open-connection', but it's too frustrating to try to
@@ -1062,7 +1062,7 @@ gnus-search-run-search
 	(when (nnimap-change-group
 	       (gnus-group-short-name group) server)
 	  (with-current-buffer (nnimap-buffer)
-	    (message "Searching %s..." group)
+	    (gnus-message 7 "Searching %s..." group)
 	    (let ((result
 		   (gnus-search-imap-search-command engine q-string)))
 	      (when (car result)
@@ -1075,7 +1075,7 @@ gnus-search-run-search
 			      (vector group artn 100))))
 			(cdr (assoc "SEARCH" (cdr result))))
 		       artlist))))
-	    (message "Searching %s...done" group))))
+	    (gnus-message 7 "Searching %s...done" group))))
       (nreverse artlist))))
 
 (cl-defmethod gnus-search-imap-search-command ((engine gnus-search-imap)
@@ -1330,8 +1330,8 @@ gnus-search-run-search
       (erase-buffer)
 
       (if groups
-	  (message "Doing %s query on %s..." program groups)
-	(message "Doing %s query..." program))
+	  (gnus-message 7 "Doing %s query on %s..." program groups)
+	(gnus-message 7 "Doing %s query..." program))
       (setq proc (apply #'start-process (format "search-%s" server)
 			buffer program cp-list))
       (while (process-live-p proc)
@@ -1837,8 +1837,8 @@ gnus-search-run-search
      (mapcar (lambda (x)
 	       (let ((group x)
 		     artlist)
-		 (message "Searching %s using find-grep..."
-			  (or group server))
+		 (gnus-message 7 "Searching %s using find-grep..."
+                               (or group server))
 		 (save-window-excursion
 		   (set-buffer buffer)
 		   (if (> gnus-verbose 6)
@@ -1893,8 +1893,8 @@ gnus-search-run-search
 			  (vector (gnus-group-full-name group server) art 0)
 			  artlist))
 		       (forward-line 1)))
-		   (message "Searching %s using find-grep...done"
-			    (or group server))
+		   (gnus-message 7 "Searching %s using find-grep...done"
+			         (or group server))
 		   artlist)))
 	     grouplist))))
 
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#51778: 29.0.50; gnus-search uses `message' instead of `gnus-message'
  2021-11-11 21:59 bug#51778: 29.0.50; gnus-search uses `message' instead of `gnus-message' Jose A. Ortega Ruiz
@ 2021-11-12  1:23 ` Eric Abrahamsen
  2021-11-12  1:26   ` Eric Abrahamsen
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Abrahamsen @ 2021-11-12  1:23 UTC (permalink / raw)
  To: Jose A. Ortega Ruiz; +Cc: Debbugs control, 51778

merge 51335
quit

"Jose A. Ortega Ruiz" <mail@jao.io> writes:

> Hi,
>
> In gnus-search, there are several logs (some of them quite verbose when
> one's iterating over long lists of groups) using `message'.  I think
> that it'd be better to use `gnus-message' instead, with levels as
> appropriate.  That way one can avoid (or enable!) them via gnus-verbose.
>
> I'm attaching a patch changing them all to level 7, since they looked
> like debug messages to me; but it's just a suggestion.

Yes, this is an excellent suggestion, and should be part of the work
ongoing in bug#51335.

Thanks!





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#51778: 29.0.50; gnus-search uses `message' instead of `gnus-message'
  2021-11-12  1:23 ` Eric Abrahamsen
@ 2021-11-12  1:26   ` Eric Abrahamsen
  2021-11-12  3:36     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Abrahamsen @ 2021-11-12  1:26 UTC (permalink / raw)
  To: Jose A. Ortega Ruiz; +Cc: 51778

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> merge 51335
> quit

Obviously I still don't know how this works, anyway this should be
rolled in with bug#51335.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#51778: 29.0.50; gnus-search uses `message' instead of `gnus-message'
  2021-11-12  1:26   ` Eric Abrahamsen
@ 2021-11-12  3:36     ` Lars Ingebrigtsen
  2021-12-03 17:28       ` Eric Abrahamsen
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-12  3:36 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: Jose A. Ortega Ruiz, 51778

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> merge 51335
>> quit
>
> Obviously I still don't know how this works, anyway this should be
> rolled in with bug#51335.

I think "forcemerge" works better...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#51778: 29.0.50; gnus-search uses `message' instead of `gnus-message'
  2021-11-12  3:36     ` Lars Ingebrigtsen
@ 2021-12-03 17:28       ` Eric Abrahamsen
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Abrahamsen @ 2021-12-03 17:28 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Jose A. Ortega Ruiz, 51778-done

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>
>>> merge 51335
>>> quit
>>
>> Obviously I still don't know how this works, anyway this should be
>> rolled in with bug#51335.
>
> I think "forcemerge" works better...

I haven't had time to sit and work on the larger project of logging,
etc, so I'm doing some spot fixes first.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-12-03 17:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-11 21:59 bug#51778: 29.0.50; gnus-search uses `message' instead of `gnus-message' Jose A. Ortega Ruiz
2021-11-12  1:23 ` Eric Abrahamsen
2021-11-12  1:26   ` Eric Abrahamsen
2021-11-12  3:36     ` Lars Ingebrigtsen
2021-12-03 17:28       ` Eric Abrahamsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).