unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#11961: Why can't one open more than one gnus-read-ephemeral-bug at once?
@ 2012-07-17 19:10 Juri Linkov
  2012-07-29 11:47 ` Reiner Steib
  2012-09-05 19:36 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 9+ messages in thread
From: Juri Linkov @ 2012-07-17 19:10 UTC (permalink / raw)
  To: 11961

Package: emacs,gnus
Version: 24.1.50

Currently `gnus-read-ephemeral-emacs-bug-group'
can open only one group at a time.

The following patch eliminates this limitation
by creating unique group names:

=== modified file 'lisp/gnus/gnus-group.el'
--- lisp/gnus/gnus-group.el	2012-06-27 22:52:31 +0000
+++ lisp/gnus/gnus-group.el	2012-07-17 19:03:39 +0000
@@ -2481,7 +2481,8 @@ (defun gnus-read-ephemeral-bug-group (id
 			 "/.*$" ""))))
       (write-region (point-min) (point-max) tmpfile)
       (gnus-group-read-ephemeral-group
-       "gnus-read-ephemeral-bug"
+       (format "gnus-read-ephemeral-bug:%s"
+	       (mapconcat 'number-to-string ids ","))
        `(nndoc ,tmpfile
 	       (nndoc-article-type mbox))
        nil window-conf))






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

* bug#11961: Why can't one open more than one gnus-read-ephemeral-bug at once?
  2012-07-17 19:10 bug#11961: Why can't one open more than one gnus-read-ephemeral-bug at once? Juri Linkov
@ 2012-07-29 11:47 ` Reiner Steib
  2012-07-29 18:17   ` Juri Linkov
  2012-09-05 19:36 ` Lars Ingebrigtsen
  1 sibling, 1 reply; 9+ messages in thread
From: Reiner Steib @ 2012-07-29 11:47 UTC (permalink / raw)
  To: 11961

On Tue, Jul 17 2012, Juri Linkov wrote:

> Currently `gnus-read-ephemeral-emacs-bug-group'
> can open only one group at a time.
>
> The following patch eliminates this limitation
> by creating unique group names:
[...]
>        (gnus-group-read-ephemeral-group
> -       "gnus-read-ephemeral-bug"
> +       (format "gnus-read-ephemeral-bug:%s"
> +	       (mapconcat 'number-to-string ids ","))

It handles the case when `ids' is a list as well, right?

Looks useful to me, please install.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/






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

* bug#11961: Why can't one open more than one gnus-read-ephemeral-bug at once?
  2012-07-29 11:47 ` Reiner Steib
@ 2012-07-29 18:17   ` Juri Linkov
  2012-09-05 19:36     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Juri Linkov @ 2012-07-29 18:17 UTC (permalink / raw)
  To: 11961

>>        (gnus-group-read-ephemeral-group
>> -       "gnus-read-ephemeral-bug"
>> +       (format "gnus-read-ephemeral-bug:%s"
>> +	       (mapconcat 'number-to-string ids ","))
>
> It handles the case when `ids' is a list as well, right?

Yes, it also handles a list of `ids'.

BTW, could you please recommend a command that reads a Gmane thread?
I can't find it.  There is a command `gnus-read-ephemeral-gmane-group'
that asks for two arguments: `start' ("Start article number:")
and `range' ("How many articles:").

But what is needed is a command that asks for URL and displays its thread.
I see there is a command `gnus-read-ephemeral-gmane-group-url'
so I tried the following test case:

  M-x gnus-read-ephemeral-gmane-group-url RET
  http://thread.gmane.org/gmane.emacs.devel/142449/focus=142484 RET

But its output is broken, it displays some irrelevant posts
from other threads.  Do you think this is a bug in Gnus?
I expected that its output will be the same as on the web page
http://thread.gmane.org/gmane.emacs.devel/142449/focus=142484

Also I noticed that `gnus-read-ephemeral-gmane-group-url'
creates very ugly buffer names such as e.g.

  *Article nndoc+/tmp/gmane.emacs.devel.start-142449.range-36.2905c8Z-ephemeral:gmane.emacs.devel.start-142449.range-36*

I don't know what is the standard group naming convention in Gnus,
but at least the following patch provides more consistent buffer names
such as for Gmane groups and articles:

  *Summary nndoc+ephemeral:gmane.emacs.devel.start-142449.range-36*
  *Article nndoc+ephemeral:gmane.emacs.devel.start-142449.range-36*

and for bug groups and articles:

  *Summary nndoc+ephemeral:bug#9201*
  *Article nndoc+ephemeral:bug#9201*

=== modified file 'lisp/gnus/gnus-group.el'
--- lisp/gnus/gnus-group.el	2012-07-24 22:17:17 +0000
+++ lisp/gnus/gnus-group.el	2012-07-29 18:15:42 +0000
@@ -2388,7 +2388,7 @@ (defun gnus-read-ephemeral-gmane-group (
 	       group start (+ start range)))
       (write-region (point-min) (point-max) tmpfile)
       (gnus-group-read-ephemeral-group
-       (format "%s.start-%s.range-%s" group start range)
+       (format "nndoc+ephemeral:%s.start-%s.range-%s" group start range)
        `(nndoc ,tmpfile
 	       (nndoc-article-type mbox))))
     (delete-file tmpfile)))
@@ -2481,7 +2481,8 @@ (defun gnus-read-ephemeral-bug-group (id
 			 "/.*$" ""))))
       (write-region (point-min) (point-max) tmpfile)
       (gnus-group-read-ephemeral-group
-       "gnus-read-ephemeral-bug"
+       (format "nndoc+ephemeral:bug#%s"
+	       (mapconcat 'number-to-string ids ","))
        `(nndoc ,tmpfile
 	       (nndoc-article-type mbox))
        nil window-conf))






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

* bug#11961: Why can't one open more than one gnus-read-ephemeral-bug at once?
  2012-07-17 19:10 bug#11961: Why can't one open more than one gnus-read-ephemeral-bug at once? Juri Linkov
  2012-07-29 11:47 ` Reiner Steib
@ 2012-09-05 19:36 ` Lars Ingebrigtsen
  2012-09-06  9:03   ` Juri Linkov
  1 sibling, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2012-09-05 19:36 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 11961

Juri Linkov <juri@jurta.org> writes:

> Currently `gnus-read-ephemeral-emacs-bug-group'
> can open only one group at a time.
>
> The following patch eliminates this limitation
> by creating unique group names:

Thanks; applied to Ma Gnus.

-- 
(domestic pets only, the antidote for overdose, milk.)
  http://lars.ingebrigtsen.no  *  Lars Magne Ingebrigtsen





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

* bug#11961: Why can't one open more than one gnus-read-ephemeral-bug at once?
  2012-07-29 18:17   ` Juri Linkov
@ 2012-09-05 19:36     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2012-09-05 19:36 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 11961

Juri Linkov <juri@jurta.org> writes:

> BTW, could you please recommend a command that reads a Gmane thread?

I don't think any such thing exists. 

-- 
(domestic pets only, the antidote for overdose, milk.)
  http://lars.ingebrigtsen.no  *  Lars Magne Ingebrigtsen





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

* bug#11961: Why can't one open more than one gnus-read-ephemeral-bug at once?
  2012-09-05 19:36 ` Lars Ingebrigtsen
@ 2012-09-06  9:03   ` Juri Linkov
  2012-09-06 14:10     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Juri Linkov @ 2012-09-06  9:03 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 11961

>> The following patch eliminates this limitation
>> by creating unique group names:
>
> Thanks; applied to Ma Gnus.

I see that you installed an old version of the patch.  I sent a newer
version at the end of the message 11 in http://debbugs.gnu.org/11961#11
I'm copying it here for your convenience:

=== modified file 'lisp/gnus/gnus-group.el'
--- lisp/gnus/gnus-group.el	2012-07-24 22:17:17 +0000
+++ lisp/gnus/gnus-group.el	2012-07-29 18:15:42 +0000
@@ -2388,7 +2388,7 @@ (defun gnus-read-ephemeral-gmane-group (
 	       group start (+ start range)))
       (write-region (point-min) (point-max) tmpfile)
       (gnus-group-read-ephemeral-group
-       (format "%s.start-%s.range-%s" group start range)
+       (format "nndoc+ephemeral:%s.start-%s.range-%s" group start range)
        `(nndoc ,tmpfile
 	       (nndoc-article-type mbox))))
     (delete-file tmpfile)))
@@ -2481,7 +2481,8 @@ (defun gnus-read-ephemeral-bug-group (id
 			 "/.*$" ""))))
       (write-region (point-min) (point-max) tmpfile)
       (gnus-group-read-ephemeral-group
-       "gnus-read-ephemeral-bug"
+       (format "nndoc+ephemeral:bug#%s"
+	       (mapconcat 'number-to-string ids ","))
        `(nndoc ,tmpfile
 	       (nndoc-article-type mbox))
        nil window-conf))






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

* bug#11961: Why can't one open more than one gnus-read-ephemeral-bug at once?
  2012-09-06  9:03   ` Juri Linkov
@ 2012-09-06 14:10     ` Lars Ingebrigtsen
  2012-09-06 16:35       ` Juri Linkov
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2012-09-06 14:10 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 11961

Juri Linkov <juri@jurta.org> writes:

> I see that you installed an old version of the patch.  I sent a newer
> version at the end of the message 11 in http://debbugs.gnu.org/11961#11
> I'm copying it here for your convenience:

Could you send a new patch against the current trunk?

-- 
(domestic pets only, the antidote for overdose, milk.)
  http://lars.ingebrigtsen.no  *  Lars Magne Ingebrigtsen





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

* bug#11961: Why can't one open more than one gnus-read-ephemeral-bug at once?
  2012-09-06 14:10     ` Lars Ingebrigtsen
@ 2012-09-06 16:35       ` Juri Linkov
  2012-09-06 16:47         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Juri Linkov @ 2012-09-06 16:35 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 11961

>> I see that you installed an old version of the patch.  I sent a newer
>> version at the end of the message 11 in http://debbugs.gnu.org/11961#11
>> I'm copying it here for your convenience:
>
> Could you send a new patch against the current trunk?

Below is a patch for the current trunk.

It changes the naming scheme for buffer names to be more consistent with
other group and article buffer names in Gnus.

Instead of currently ugly buffer names like:

  *Article nndoc+/tmp/gmane.emacs.devel.start-142449.range-36.2905c8Z-ephemeral:gmane.emacs.devel.start-142449.range-36*

this patch will create buffer names for Gmane groups and articles like:

  *Summary nndoc+ephemeral:gmane.emacs.devel.start-142449.range-36*
  *Article nndoc+ephemeral:gmane.emacs.devel.start-142449.range-36*

and bug groups and articles will be like:

  *Summary nndoc+ephemeral:bug#9201*
  *Article nndoc+ephemeral:bug#9201*

=== modified file 'lisp/gnus/gnus-group.el'
--- lisp/gnus/gnus-group.el	2012-09-05 22:45:43 +0000
+++ lisp/gnus/gnus-group.el	2012-09-06 16:32:17 +0000
@@ -2388,7 +2388,7 @@ (defun gnus-read-ephemeral-gmane-group (
 	       group start (+ start range)))
       (write-region (point-min) (point-max) tmpfile)
       (gnus-group-read-ephemeral-group
-       (format "%s.start-%s.range-%s" group start range)
+       (format "nndoc+ephemeral:%s.start-%s.range-%s" group start range)
        `(nndoc ,tmpfile
 	       (nndoc-article-type mbox))))
     (delete-file tmpfile)))
@@ -2481,7 +2481,7 @@ (defun gnus-read-ephemeral-bug-group (id
 			 "/.*$" ""))))
       (write-region (point-min) (point-max) tmpfile)
       (gnus-group-read-ephemeral-group
-       (format "gnus-read-ephemeral-bug:%s"
+       (format "nndoc+ephemeral:bug#%s"
 	       (mapconcat 'number-to-string ids ","))
        `(nndoc ,tmpfile
 	       (nndoc-article-type mbox))







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

* bug#11961: Why can't one open more than one gnus-read-ephemeral-bug at once?
  2012-09-06 16:35       ` Juri Linkov
@ 2012-09-06 16:47         ` Lars Ingebrigtsen
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2012-09-06 16:47 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 11961

Juri Linkov <juri@jurta.org> writes:

> Below is a patch for the current trunk.

Thanks; applied.

-- 
(domestic pets only, the antidote for overdose, milk.)
  http://lars.ingebrigtsen.no  *  Lars Magne Ingebrigtsen





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

end of thread, other threads:[~2012-09-06 16:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-17 19:10 bug#11961: Why can't one open more than one gnus-read-ephemeral-bug at once? Juri Linkov
2012-07-29 11:47 ` Reiner Steib
2012-07-29 18:17   ` Juri Linkov
2012-09-05 19:36     ` Lars Ingebrigtsen
2012-09-05 19:36 ` Lars Ingebrigtsen
2012-09-06  9:03   ` Juri Linkov
2012-09-06 14:10     ` Lars Ingebrigtsen
2012-09-06 16:35       ` Juri Linkov
2012-09-06 16:47         ` Lars Ingebrigtsen

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).