GNU bug report logs - #22649
25.0.90; M-g doesn't work when Gnus is started with M-x gnus-no-server

Previous Next

Package: emacs;

Reported by: Daiki Ueno <ueno <at> gnu.org>

Date: Sat, 13 Feb 2016 07:19:02 UTC

Severity: normal

Tags: fixed

Found in version 25.0.90

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: 22649 <at> debbugs.gnu.org
Subject: bug#22649: [gmane.emacs.gnus.general] Re: M-g doesn't work with gnus-no-server
Date: Thu, 12 Apr 2018 18:29:10 +0200
[Message part 1 (message/rfc822, inline)]
From: Daiki Ueno <ueno <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Andreas Schwab <schwab <at> linux-m68k.org>,  ding <at> gnus.org
Subject: Re: M-g doesn't work with gnus-no-server
Date: Wed, 10 Feb 2016 13:20:58 +0900
[Message part 2 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

>> * lisp/gnus/gnus-group.el: Don't call `gnus-request-group-scan' if
>> server is not opened.
>
> Well, we want `M-g' to open the server if it isn't already...  so
> perhaps we should just call `gnus-activate-group'?

I am not really sure if I get your suggestion, but how about this?

Regards,
-- 
Daiki Ueno
[0001-gnus-Make-M-g-work-with-gnus-no-server.patch (text/x-patch, inline)]
From d84b39a671f3c36634d92897205f3d812a64e9ba Mon Sep 17 00:00:00 2001
From: Daiki Ueno <ueno <at> gnu.org>
Date: Tue, 9 Feb 2016 17:37:59 +0900
Subject: [PATCH] gnus: Make M-g work with gnus-no-server

* lisp/gnus/gnus-group.el: Divert to call `gnus-activate-group' with the
SCAN argument set, if request-group-scan is not defined for the backend.
Ensure that the server is open when calling `gnus-request-group-scan'.
---
 lisp/gnus/gnus-group.el | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 1cd16a4..5554569 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -4109,9 +4109,14 @@ gnus-group-get-new-news-this-group
       (gnus-group-remove-mark group)
       ;; Bypass any previous denials from the server.
       (gnus-remove-denial (setq method (gnus-find-method-for-group group)))
-      (if (or (and (not dont-scan)
-		   (gnus-request-group-scan group (gnus-get-info group)))
-	      (gnus-activate-group group (if dont-scan nil 'scan) nil method))
+      (if (if (and (not dont-scan)
+		   ;; Prefer request-group-scan if the backend supports it.
+		   (gnus-check-backend-function 'request-group-scan group))
+	      (progn
+		;; Ensure that the server is already open.
+		(gnus-activate-group group nil nil method)
+		(gnus-request-group-scan group (gnus-get-info group)))
+	    (gnus-activate-group group (if dont-scan nil 'scan) nil method))
 	  (let ((info (gnus-get-info group))
 		(active (gnus-active group)))
 	    (when info
-- 
2.5.0

[Message part 4 (text/plain, inline)]

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


This bug report was last modified 7 years and 88 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.