all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#33402: 27.0.50; Test Gnus group names when reading from the browse mode
@ 2018-11-15 22:07 Eric Abrahamsen
  2018-11-20 18:29 ` Eric Abrahamsen
       [not found] ` <handler.33402.B.154231969829751.ack@debbugs.gnu.org>
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Abrahamsen @ 2018-11-15 22:07 UTC (permalink / raw)
  To: 33402

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


When browsing server groups through the *Gnus Browse Mode* interface,
entering a group either reads the solid group, if it's already active,
or creates an ephemeral copy of the server and reads it there, if it
isn't.

That might work for nntp servers, but for servers like nnmaildir that
keep their own group accounting, if you create an ephemeral copy of the
server it will have no groups, and you can't browse the group from the
Browse interface.

This patch checks if the group in question belongs to the native server,
and shortens the group name if so, so that we can accurately know if the
group is subscribed or not.

Eric



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Check-Gnus-group-names-when-reading-from-a-browse-se.patch --]
[-- Type: text/x-patch, Size: 1321 bytes --]

From 8171708c120e1c65550f39e0075fd4054582b82b Mon Sep 17 00:00:00 2001
From: Eric Abrahamsen <eric@ericabrahamsen.net>
Date: Thu, 15 Nov 2018 13:59:27 -0800
Subject: [PATCH] Check Gnus group names when reading from a browse server

* lisp/gnus/gnus-srvr.el (gnus-browse-read-group): If the group in
  question belongs to the native server, the name has to be shortened
  before we check it wil `gnus-get-info'. It might work otherwise with
  nntp, but for backends like nnmaildir that have their own accounting
  system, creating an ephemeral group won't work.
---
 lisp/gnus/gnus-srvr.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el
index dfca5e9d2c..34ebd00ef2 100644
--- a/lisp/gnus/gnus-srvr.el
+++ b/lisp/gnus/gnus-srvr.el
@@ -925,7 +925,11 @@ gnus-browse-read-group
   "Enter the group at the current line.
 If NUMBER, fetch this number of articles."
   (interactive "P")
-  (let ((group (gnus-browse-group-name)))
+  (let* ((full-name (gnus-browse-group-name))
+	 (group (if (gnus-native-method-p
+		     (gnus-find-method-for-group full-name))
+		    (gnus-group-short-name full-name)
+		  full-name)))
     (if (or (not (gnus-get-info group))
 	    (gnus-ephemeral-group-p group))
 	(unless (gnus-group-read-ephemeral-group
-- 
2.19.1


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

* bug#33402: 27.0.50; Test Gnus group names when reading from the browse mode
  2018-11-15 22:07 bug#33402: 27.0.50; Test Gnus group names when reading from the browse mode Eric Abrahamsen
@ 2018-11-20 18:29 ` Eric Abrahamsen
       [not found] ` <handler.33402.B.154231969829751.ack@debbugs.gnu.org>
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Abrahamsen @ 2018-11-20 18:29 UTC (permalink / raw)
  To: 33402

I think this is fairly uncontroversial, I'll push it in a bit if no one objects.





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

* bug#33402: Acknowledgement (27.0.50; Test Gnus group names when reading from the browse mode)
       [not found] ` <handler.33402.B.154231969829751.ack@debbugs.gnu.org>
@ 2018-11-21 16:32   ` Eric Abrahamsen
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Abrahamsen @ 2018-11-21 16:32 UTC (permalink / raw)
  To: 33402-done

Pushed.





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

end of thread, other threads:[~2018-11-21 16:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-15 22:07 bug#33402: 27.0.50; Test Gnus group names when reading from the browse mode Eric Abrahamsen
2018-11-20 18:29 ` Eric Abrahamsen
     [not found] ` <handler.33402.B.154231969829751.ack@debbugs.gnu.org>
2018-11-21 16:32   ` bug#33402: Acknowledgement (27.0.50; Test Gnus group names when reading from the browse mode) Eric Abrahamsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.