From: Daiki Ueno <ueno@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Andreas Schwab <schwab@linux-m68k.org>, ding@gnus.org
Subject: Re: M-g doesn't work with gnus-no-server
Date: Wed, 10 Feb 2016 13:20:58 +0900 [thread overview]
Message-ID: <m3ziv9kxig.fsf-ueno-ueno@gnu.org> (raw)
In-Reply-To: <87a8n9790e.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 10 Feb 2016 10:34:57 +1100")
[-- Attachment #1: Type: text/plain, Size: 355 bytes --]
Lars Ingebrigtsen <larsi@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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnus-Make-M-g-work-with-gnus-no-server.patch --]
[-- Type: text/x-patch, Size: 1560 bytes --]
From d84b39a671f3c36634d92897205f3d812a64e9ba Mon Sep 17 00:00:00 2001
From: Daiki Ueno <ueno@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
next prev parent reply other threads:[~2016-02-10 4:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-17 9:06 Daiki Ueno
2015-04-17 20:00 ` Ted Zlatanov
2016-02-07 3:02 ` Lars Ingebrigtsen
2016-02-07 8:54 ` Andreas Schwab
2016-02-07 9:26 ` Andreas Schwab
2016-02-07 12:32 ` Andreas Schwab
2016-02-07 18:03 ` Daiki Ueno
2016-02-07 18:27 ` Dave Goldberg
2016-02-08 5:10 ` Lars Ingebrigtsen
2016-02-08 5:47 ` Daiki Ueno
2016-02-08 5:54 ` Lars Ingebrigtsen
2016-02-09 8:42 ` Daiki Ueno
2016-02-09 23:34 ` Lars Ingebrigtsen
2016-02-10 4:20 ` Daiki Ueno [this message]
2016-02-12 10:47 ` Andreas Schwab
2016-02-13 6:43 ` Lars Ingebrigtsen
2016-02-13 7:21 ` Daiki Ueno
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3ziv9kxig.fsf-ueno-ueno@gnu.org \
--to=ueno@gnu.org \
--cc=ding@gnus.org \
--cc=larsi@gnus.org \
--cc=schwab@linux-m68k.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.
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 NNTP newsgroup(s).