Subject: bug#12396: 24.2.50; [PATCH] extend usability of gnus-read-ephemeral-emacs-bug-group

From: Stephen Berman <[email-masked]>
Date: Fri, 14 Sep 2012 17:37:05 +0200

On Fri, 14 Sep 2012 02:35:55 +0300 Juri Linkov <[email-masked]> wrote:

>> When I use it it does grab the bug number, at least in the types of
>> cases I had in mind (however, I didn't think of URLs like this one...).
>> Can you provide a recipe showing the failure?
>
> A recipe is just to put point anywhere in the message body and
> evaluate M-: (gnus-get-emacs-bug-number) RET It doesn't grab a bug
> number in the subject line, but returns nil.  Please clarify where you
> intended point to be to be able to grab a bug number from the subject
> line.

This is a use case I didn't have in mind.  I use the default window
configuration of Gnus, where when you visit a mail or news group, the
frame is split into two windows: one with the Summary buffer and one
with the Article buffer, and the Summary buffer is selected.  Each line
of the Summary buffer contains by default at least the subject line of
an article in the group, and typing SPC or RET opens, in the Article
buffer, the article listed at point in the Summary buffer.  In this
scenario, it suffices for the search space for gnus-get-emacs-bug-number
to be just the current line, that's why it doesn't work in your case.

> Actually there already exist similar functionality
> in `Info-follow-reference'.  If you type in an Info node
> `f TAB' it allows you to select one of the links to other nodes.
> Since bug references are similar to links, you could do the same
> and to collect bug references from the current buffer for completion.
> Of course, the bug reference under point should be prefered over
> all other bug references in the buffer and should be provided as
> the first default value.

This certainly is a better approach for your scenario, though for mine
it's probably too heavy, since there are may well be numerous bug
numbers in the Summary buffer, but when I call
gnus-read-ephemeral-emacs-bug-group, I most likely want to visit the
thread of the bug mentioned in the subject line at point, not that of
another subject line.  I suppose, though, if I did want to go to a bug
thread from a different subject, it would be useful to cycle through the
completions.  Even better would be if the bug numbers in the buffer are
highlighted as you cycle, so you can see their context.

Steve Berman