From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#12396: 24.2.50; [PATCH] extend usability of gnus-read-ephemeral-emacs-bug-group Date: Wed, 12 Sep 2012 23:54:05 +0300 Organization: JURTA Message-ID: <87627jatr2.fsf@mail.jurta.org> 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1347483454 11473 80.91.229.3 (12 Sep 2012 20:57:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Sep 2012 20:57:34 +0000 (UTC) Cc: Lars Ingebrigtsen , 12396@debbugs.gnu.org To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 12 22:57:35 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 1TBu05-0001YU-GL for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Sep 2012 22:57:33 +0200 Original-Received: from localhost ([::1]:53164 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBu01-0004Ew-Se for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Sep 2012 16:57:29 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58061) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBtzo-0003ap-00 for bug-gnu-emacs@gnu.org; Wed, 12 Sep 2012 16:57:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TBtzm-0005mL-Mz for bug-gnu-emacs@gnu.org; Wed, 12 Sep 2012 16:57:15 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48334) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBtzm-0005mH-Jg for bug-gnu-emacs@gnu.org; Wed, 12 Sep 2012 16:57:14 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TBu0X-0005S0-Iw; Wed, 12 Sep 2012 16:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Wed, 12 Sep 2012 20:58:01 +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.134748345120913 (code B ref 12396); Wed, 12 Sep 2012 20:58:01 +0000 Original-Received: (at 12396) by debbugs.gnu.org; 12 Sep 2012 20:57:31 +0000 Original-Received: from localhost ([127.0.0.1]:57879 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TBu00-0005RD-1k for submit@debbugs.gnu.org; Wed, 12 Sep 2012 16:57:29 -0400 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:43909 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TBtzw-0005R4-C1 for 12396@debbugs.gnu.org; Wed, 12 Sep 2012 16:57:26 -0400 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 6915D451CC72; Wed, 12 Sep 2012 13:56:34 -0700 (PDT) In-Reply-To: <87vcfk88af.fsf@rosalinde.fritz.box> (Stephen Berman's message of "Wed, 12 Sep 2012 01:11:04 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu) 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:64214 Archived-At: > 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. > 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). > (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.