From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs 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 Message-ID: <87sjalr730.fsf@rosalinde.fritz.box> References: <87d31vtccn.fsf@rosalinde.fritz.box> <87txv7yqwa.fsf@gnus.org> <878vcjt1se.fsf@rosalinde.fritz.box> <871ui8a0v1.fsf@mail.jurta.org> <87vcfk88af.fsf@rosalinde.fritz.box> <87627jatr2.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1347568819 31386 80.91.229.3 (13 Sep 2012 20:40:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Sep 2012 20:40:19 +0000 (UTC) Cc: Lars Ingebrigtsen , 12396@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 13 22:40:21 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TCGCx-0001zw-0Q for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Sep 2012 22:40:19 +0200 Original-Received: from localhost ([::1]:46606 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCGCt-0002UD-56 for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Sep 2012 16:40:15 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCGCq-0002Ty-6D for bug-gnu-emacs@gnu.org; Thu, 13 Sep 2012 16:40:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCGCp-0005Xr-0Q for bug-gnu-emacs@gnu.org; Thu, 13 Sep 2012 16:40:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51067) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCGCo-0005X2-SK for bug-gnu-emacs@gnu.org; Thu, 13 Sep 2012 16:40:10 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TCGDe-0001Ew-Q8; Thu, 13 Sep 2012 16:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Thu, 13 Sep 2012 20:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12396 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: patch Original-Received: via spool by 12396-submit@debbugs.gnu.org id=B12396.13475688014679 (code B ref 12396); Thu, 13 Sep 2012 20:41:02 +0000 Original-Received: (at 12396) by debbugs.gnu.org; 13 Sep 2012 20:40:01 +0000 Original-Received: from localhost ([127.0.0.1]:60612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCGCe-0001DI-QB for submit@debbugs.gnu.org; Thu, 13 Sep 2012 16:40:01 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:50170) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1TCGCa-0001D3-30 for 12396@debbugs.gnu.org; Thu, 13 Sep 2012 16:39:57 -0400 Original-Received: (qmail invoked by alias); 13 Sep 2012 20:39:01 -0000 Original-Received: from i59F54775.versanet.de (EHLO rosalinde.fritz.box) [89.245.71.117] by mail.gmx.net (mp016) with SMTP; 13 Sep 2012 22:39:01 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX1+5oMJvSK+5wAGcdh75oHen2XPUYHUR4cbFQfehiM wY1NwD5B4CoLew In-Reply-To: <87627jatr2.fsf@mail.jurta.org> (Juri Linkov's message of "Wed, 12 Sep 2012 23:54:05 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:64252 Archived-At: On Wed, 12 Sep 2012 23:54:05 +0300 Juri Linkov 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: 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