bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Stephen Berman
Subject: bug#12396: 24.2.50; [PATCH] extend usability of gnus-read-ephemeral-emacs-bug-group
Date: Thu, 13 Sep 2012 22:38:59 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

On Wed, 12 Sep 2012 23:54:05 +0300 Juri Linkov <juri@jurta.org> wrote:

>> Well, the use case that motivated my first patch is grabbing a bug
>> number in the subject line of a mail or posting, so the distance
>> involved is rather small.
>
> Grabbing a bug number in the subject line is a well-defined goal,
> but when I tried your latest version of `gnus-get-emacs-bug-number',
> it can't get a bug number from the subject line.

I guess you mean the version in this post:

<http://permalink.gmane.org/gmane.emacs.bugs/64081>

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?

>> Admittedly, the extension to ChangeLogs could involve several lines
>> between point and the bug number, which my patch does not take
>> into account.
>
> For ChangeLogs it could look only inside the current entry.
>
>> Well, my second patch assumed my first patch, which changes
>> g-r-e-e-b-g's signature, so the bug number isn't passed as an argument.
>> However, I agree it is bad to request confirmation on clicking the
>> button in this case.  This appears to argue against the change in the
>> interactive spec.
>
> Yes, there is no need to change the function signature
> and no need to move its interactive spec to the function body.
> You could just replace old (thing-at-point 'word)
> with a call to a new function `gnus-get-emacs-bug-number'.
> Replacing `read-string' with `read-number' in your patch
> also makes sense.  But selecting one of several bug numbers
> would be easier by supplying a list of bug numbers to `read-number'
> and using e.g. `3 M-n' to select one of them (third in this example).

I haven't had time to try out these ideas yet, but thanks for the
suggestions. 

>> (defun bug-reference-gnus-read-ephemeral-emacs-bug-group (pos)
>>   "Read the bug thread in a Gnus ephemeral group."
>>   (dolist (o (overlays-at pos))
>>     ;; It should only be possible to have one URL overlay.
>>     (let* ((url (overlay-get o 'bug-reference-url))
>>         (num (when (string-match "http://debbugs\\.gnu\\.org/\\([0-9]+\\)$" 
>> url)
>                                      ============================
> This is a bad thing.  It is not your failure, it is by design of
> bug-reference.el that you have to circumvent.  I think that
> bug-reference.el should be improved to add a bug number to overlays
> where it currently adds a bug URL.

I agree that would be cleaner.

Steve Berman





reply via email to

[Prev in Thread] Current Thread [Next in Thread]