From unknown Sat Sep 06 21:08:06 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#12396 <12396@debbugs.gnu.org> To: bug#12396 <12396@debbugs.gnu.org> Subject: Status: 24.2.50; [PATCH] extend usability of gnus-read-ephemeral-emacs-bug-group Reply-To: bug#12396 <12396@debbugs.gnu.org> Date: Sun, 07 Sep 2025 04:08:06 +0000 retitle 12396 24.2.50; [PATCH] extend usability of gnus-read-ephemeral-emac= s-bug-group reassign 12396 emacs,gnus submitter 12396 Stephen Berman severity 12396 wishlist tag 12396 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 09 12:01:42 2012 Received: (at submit) by debbugs.gnu.org; 9 Sep 2012 16:01:42 +0000 Received: from localhost ([127.0.0.1]:50437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAjx7-000075-6h for submit@debbugs.gnu.org; Sun, 09 Sep 2012 12:01:41 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56634) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAjx4-00006x-1c for submit@debbugs.gnu.org; Sun, 09 Sep 2012 12:01:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TAjwY-0006nD-LV for submit@debbugs.gnu.org; Sun, 09 Sep 2012 12:01:08 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:33991) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAjwY-0006n9-I2 for submit@debbugs.gnu.org; Sun, 09 Sep 2012 12:01:06 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47335) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAjwW-0002bC-T9 for bug-gnu-emacs@gnu.org; Sun, 09 Sep 2012 12:01:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TAjwU-0006mG-DF for bug-gnu-emacs@gnu.org; Sun, 09 Sep 2012 12:01:04 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:58644) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1TAjwU-0006lu-2y for bug-gnu-emacs@gnu.org; Sun, 09 Sep 2012 12:01:02 -0400 Received: (qmail invoked by alias); 09 Sep 2012 16:00:58 -0000 Received: from i59F5698F.versanet.de (EHLO rosalinde.fritz.box) [89.245.105.143] by mail.gmx.net (mp069) with SMTP; 09 Sep 2012 18:00:58 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX1+OeQ9z4YmOLS7UW5urlPvzFBynh5UOQNWFhR9ovC aksJImNoc8OSE4 From: Stephen Berman To: bug-gnu-emacs@gnu.org Subject: 24.2.50; [PATCH] extend usability of gnus-read-ephemeral-emacs-bug-group Date: Sun, 09 Sep 2012 18:00:56 +0200 Message-ID: <87d31vtccn.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) --=-=-= Content-Type: text/plain This is a feature request accompanied by a possible implementation. When reading (with Gnus) Emacs mailing lists or news groups that have bug references in the subject line, typing `M-x gnus-read-ephemeral-emacs-bug-group' is a nice way to browse the whole bug thread by opening it as an temporary group. However, this command offers the bug number in the subject as default in the minibuffer prompt only if point is on the number, which usually means having to navigate to it. It would be more convenient if the bug number in the current line in the Group buffer were offered as default regardless of where point is in the line. The first patch (against bzr trunk revision 109955) below does this. It makes a number in the subject line the default if it is preceded by "bug" or "Bug", possibly with a space, `#' or `=' in between (the latter to grab the bug number in a URL to the Emacs bugtracker, which is clickable but calls a web browser via browse-url). In addition, since the subject line sometimes contains more than one bug number, this patch allows selecting which one (counting from the left) to offer as default, by typing a numerical prefix argument; with no prefix argument the default is the leftmost bug number. Furthermore, it would be convenient to use gnus-read-ephemeral-emacs-bug-group if you don't already having Gnus loaded, e.g. when visiting an Emacs ChangeLog, so the patch adds an autoload cookie to this command to enable doing this. For ChangeLogs there is already bug-reference.el, which uses browse-url; it would be nice to have the option of using gnus-read-ephemeral-emacs-bug-group to follow bug references by clicking the bug reference links in the ChangeLog file (as an alternative to calling it with `M-x'). So the second patch below does this by adding a suitable user option which is used in bug-reference-push-button. This approach could be generalized by replacing gnus-get-emacs-bug-number by a function that also recognizes other bug or issue numbers, maybe along the lines of bug-reference-bug-regexp, and making bug-reference-push-button act appropriately; but since I've only used gnus-read-ephemeral-emacs-bug-group and could test it, I leave this as a todo. (However, I don't think browse-url itself should be extended to allow calling g-r-e-e-b-g by clicking a URL like the one mentioned in the first paragraph above, since browse-url is intended to call a web browser, and that's what I think users expect when they click relevant links, and the presence of a bug number in a URL is a special case. But with bug-reference-push-button, the point is to follow a bug reference, and since g-r-e-e-b-g also exists for this purpose, it seems reasonable to allow calling it by clicking these links.) --=-=-= Content-Type: text/plain Content-Disposition: inline Content-Description: Patch for gnus-group.el === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2012-09-07 04:07:00 +0000 +++ lisp/gnus/ChangeLog 2012-09-09 15:24:48 +0000 @@ -1,3 +1,9 @@ +2012-09-09 Stephen Berman + + * gnus-group.el (gnus-get-emacs-bug-number): New function. + (gnus-read-ephemeral-emacs-bug-group): Use it; change function's + signature and interactive spec accordingly. Add autoload cookie. + 2012-09-07 Chong Yidong * gnus-util.el === modified file 'lisp/gnus/gnus-group.el' --- lisp/gnus/gnus-group.el 2012-09-07 04:07:00 +0000 +++ lisp/gnus/gnus-group.el 2012-09-09 15:24:45 +0000 @@ -2498,21 +2498,54 @@ (defvar debbugs-gnu-bug-number) ; debbugs-gnu -(defun gnus-read-ephemeral-emacs-bug-group (ids &optional window-conf) - "Browse Emacs bugs IDS as an ephemeral group." - (interactive (list (string-to-number - (read-string "Enter bug number: " - (thing-at-point 'word) nil)))) - (unless (listp ids) - (setq ids (list ids))) - (gnus-read-ephemeral-bug-group - ids - (cdr (assoc 'emacs gnus-bug-group-download-format-alist)) - window-conf) - (when (fboundp 'debbugs-gnu-summary-mode) - (with-current-buffer (window-buffer (selected-window)) - (debbugs-gnu-summary-mode 1) - (set (make-local-variable 'debbugs-gnu-bug-number) (car ids))))) +(defun gnus-get-emacs-bug-number (&optional n) + "Return an Emacs bug number in this line, if any. +If point is on a recognizable bug number, return it; otherwise, +if argument N is a positive integer, return the Nth bug number in +this line, counting from the left, or nil if there is no Nth bug +number." + (save-excursion + ;; Get the number if point is anywhere within a string like "bug#1234", + ;; "Bug#1234", bug #1234", "Bug #1234", bug 1234", "Bug 1234" as well as + ;; "http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11735" + (when (or (string= (thing-at-point 'word) "Bug") + (string= (thing-at-point 'word) "bug")) + (forward-word) + (skip-chars-forward " #=")) + (let* ((str (thing-at-point 'word)) + (num (if str (string-to-number str)))) + (if (and num (not (zerop num))) + num + ;; Otherwise look for the Nth bug number on + ;; this line. + (let ((case-fold-search t)) + (goto-char (line-beginning-position)) + (when (re-search-forward "bug ?[#=]? ?\\([0-9]+\\)" + (line-end-position) t n) + (string-to-number (match-string 1)))))))) + +;;;###autoload +(defun gnus-read-ephemeral-emacs-bug-group (&optional n window-conf) + "Browse an Emacs bug report thread as an ephemeral group. +If point is on a recognizable bug number, offer it as default; +otherwise, offer the first, or with numerical prefix argument N, +the Nth bug number in this line, counting from the left. If +there is no bug number in this line, or too few, prompt for a +number without offering a default." + (interactive "P") + (let ((ids (read-number "Enter bug number: " + (gnus-get-emacs-bug-number + (if (and (integerp n) (> n 1)) n 1))))) + (unless (listp ids) + (setq ids (list ids))) + (gnus-read-ephemeral-bug-group + ids + (cdr (assoc 'emacs gnus-bug-group-download-format-alist)) + window-conf) + (when (fboundp 'debbugs-gnu-summary-mode) + (with-current-buffer (window-buffer (selected-window)) + (debbugs-gnu-summary-mode 1) + (set (make-local-variable 'debbugs-gnu-bug-number) (car ids)))))) (defun gnus-group-jump-to-group (group &optional prompt) "Jump to newsgroup GROUP. --=-=-= Content-Type: text/plain Content-Disposition: inline Content-Description: Patch for bug-reference.el === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-09 11:03:37 +0000 +++ lisp/ChangeLog 2012-09-09 15:28:28 +0000 @@ -1,3 +1,9 @@ +2012-09-09 Stephen Berman + + * progmodes/bug-reference.el (bug-reference-push-button-action): + New defcustom to allow using gnus-read-ephemeral-emacs-bug-group. + (bug-reference-push-button): Use it. + 2012-09-09 Alan Mackenzie * progmodes/cc-engine.el (c-state-cache-init): Initialise === modified file 'lisp/progmodes/bug-reference.el' --- lisp/progmodes/bug-reference.el 2012-08-22 06:47:00 +0000 +++ lisp/progmodes/bug-reference.el 2012-09-09 15:28:25 +0000 @@ -76,6 +76,12 @@ :safe 'stringp :group 'bug-reference) +(defcustom bug-reference-push-button-action 'url + "List of choices for visiting the bug referenced in the button." + :type '(radio (const :tag "Visit the bug's URL in a browser" url) + (const :tag "Visit the bug thread in Gnus" gnus)) + :group 'bug-reference) + (defun bug-reference-set-overlay-properties () "Set properties of bug reference overlays." (put 'bug-reference 'evaporate t) @@ -121,7 +127,11 @@ ;; Taken from button.el. (defun bug-reference-push-button (&optional pos _use-mouse-action) - "Open URL corresponding to the bug reference at POS." + "Take appropriate action on the bug reference at POS. +The action depends on the value of the user option +`bug-reference-push-button-action': either visit the bug's URL in +a browser or visit the bug thread in Gnus (N.B.: the latter only +works for references to the Emacs bugtracker)." (interactive (list (if (integerp last-command-event) (point) last-command-event))) (if (and (not (integerp pos)) (eventp pos)) @@ -130,11 +140,14 @@ (with-current-buffer (window-buffer (posn-window posn)) (bug-reference-push-button (posn-point posn) t))) ;; POS is just normal position. - (dolist (o (overlays-at pos)) - ;; It should only be possible to have one URL overlay. - (let ((url (overlay-get o 'bug-reference-url))) - (when url - (browse-url url)))))) + (cond ((eq bug-reference-push-button-action 'url) + (dolist (o (overlays-at pos)) + ;; It should only be possible to have one URL overlay. + (let ((url (overlay-get o 'bug-reference-url))) + (when url + (browse-url url))))) + ((eq bug-reference-push-button-action 'gnus) + (gnus-read-ephemeral-emacs-bug-group))))) ;;;###autoload (define-minor-mode bug-reference-mode --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 09 14:48:36 2012 Received: (at 12396) by debbugs.gnu.org; 9 Sep 2012 18:48:36 +0000 Received: from localhost ([127.0.0.1]:50569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAmYd-0003rA-TD for submit@debbugs.gnu.org; Sun, 09 Sep 2012 14:48:36 -0400 Received: from hermes.netfonds.no ([80.91.224.195]:35374) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAmYZ-0003r0-SJ for 12396@debbugs.gnu.org; Sun, 09 Sep 2012 14:48:34 -0400 Received: from ip-165-52-149-91.dialup.ice.net ([91.149.52.165] helo=rusty) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1TAmXx-0002xB-6y; Sun, 09 Sep 2012 20:47:53 +0200 From: Lars Ingebrigtsen To: Stephen Berman Subject: Re: bug#12396: 24.2.50; [PATCH] extend usability of gnus-read-ephemeral-emacs-bug-group References: <87d31vtccn.fsf@rosalinde.fritz.box> X-Now-Playing: Winston Tong's _Theoretically Chinese_ Date: Sun, 09 Sep 2012 20:47:49 +0200 In-Reply-To: <87d31vtccn.fsf@rosalinde.fritz.box> (Stephen Berman's message of "Sun, 09 Sep 2012 18:00:56 +0200") Message-ID: <87txv7yqwa.fsf@gnus.org> User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1TAmXx-0002xB-6y X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1347821274.3764@EWmrivS+oGEYjHfZlkjyTw X-Spam-Status: No X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 12396 Cc: 12396@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Stephen Berman writes: > It would be more convenient if the bug number in the current line in > the Group buffer were offered as default regardless of where point is > in the line. It makes sense, but it's kinda not the way these function in Emacs usually work. `M-x find-file-at-point', `M-x man', etc, all react to the thing under point. And that's a very self-evident user interface. Put point at the thing you're interested in, and then issue a command. -- (domestic pets only, the antidote for overdose, milk.) http://lars.ingebrigtsen.no * Lars Magne Ingebrigtsen From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 09 15:49:48 2012 Received: (at 12396) by debbugs.gnu.org; 9 Sep 2012 19:49:48 +0000 Received: from localhost ([127.0.0.1]:50645 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAnVo-0005EW-4d for submit@debbugs.gnu.org; Sun, 09 Sep 2012 15:49:48 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:60593) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1TAnVi-0005EL-NU for 12396@debbugs.gnu.org; Sun, 09 Sep 2012 15:49:43 -0400 Received: (qmail invoked by alias); 09 Sep 2012 19:49:06 -0000 Received: from i59F5698F.versanet.de (EHLO rosalinde.fritz.box) [89.245.105.143] by mail.gmx.net (mp001) with SMTP; 09 Sep 2012 21:49:06 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX1+QOBgmuXeQcKisG/JVNeYQjmsPM7cCs3ssDaPnGO YZIvSsQsZCyDQa From: Stephen Berman To: Lars Ingebrigtsen Subject: Re: bug#12396: 24.2.50; [PATCH] extend usability of gnus-read-ephemeral-emacs-bug-group References: <87d31vtccn.fsf@rosalinde.fritz.box> <87txv7yqwa.fsf@gnus.org> Date: Sun, 09 Sep 2012 21:49:05 +0200 In-Reply-To: <87txv7yqwa.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 09 Sep 2012 20:47:49 +0200") Message-ID: <878vcjt1se.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Y-GMX-Trusted: 0 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 12396 Cc: 12396@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) On Sun, 09 Sep 2012 20:47:49 +0200 Lars Ingebrigtsen wrote: > Stephen Berman writes: > >> It would be more convenient if the bug number in the current line in >> the Group buffer were offered as default regardless of where point is >> in the line. > > It makes sense, but it's kinda not the way these function in Emacs > usually work. `M-x find-file-at-point', `M-x man', etc, all react to > the thing under point. And that's a very self-evident user interface. > Put point at the thing you're interested in, and then issue a command. I think there are significant differences between these three cases. With ffap, the UI is already announced in the name, and any other behavior would contradict it. With man, the list of items naming man pages is large and could always be augmented, i.e., pretty much any word could be a potential target, so it makes sense to default to the word at point. But with g-r-e-e-b-g, even though bug numbers are in principle unbounded, the context for identifying them can be narrowly specified, as I tried to show; e.g., it won't grab a number in a subject line like "Bug in forward-sexp starting with revision 340958". In other words, for g-r-e-e-b-g the typical use case will have a natural default (or several, as I noted), which it therefore makes sense to use regardless of where point is. If this doesn't convince you, all I can add is that I was annoyed enough times by having to navigate to the bug number to avoid typing it in that I decided to code up a way to avoid having to do that; having it in Emacs might spare others such annoyance. :-) Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 10 17:03:08 2012 Received: (at 12396) by debbugs.gnu.org; 10 Sep 2012 21:03:09 +0000 Received: from localhost ([127.0.0.1]:52849 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TBB8K-0003lY-MG for submit@debbugs.gnu.org; Mon, 10 Sep 2012 17:03:08 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:39035) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1TBB8E-0003l6-PP for 12396@debbugs.gnu.org; Mon, 10 Sep 2012 17:03:03 -0400 Received: (qmail invoked by alias); 10 Sep 2012 21:02:20 -0000 Received: from i59F547FD.versanet.de (EHLO rosalinde.fritz.box) [89.245.71.253] by mail.gmx.net (mp004) with SMTP; 10 Sep 2012 23:02:20 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX18CO04I6xECo6VzHdOSuiFJCiEh5IMCWfdJPAQydZ DkBetRQPWg1Ong From: Stephen Berman To: 12396@debbugs.gnu.org Subject: Re: bug#12396: 24.2.50; [PATCH] extend usability of gnus-read-ephemeral-emacs-bug-group References: <87d31vtccn.fsf@rosalinde.fritz.box> <87txv7yqwa.fsf@gnus.org> <878vcjt1se.fsf@rosalinde.fritz.box> Date: Mon, 10 Sep 2012 23:02:18 +0200 In-Reply-To: <878vcjt1se.fsf@rosalinde.fritz.box> (Stephen Berman's message of "Sun, 09 Sep 2012 21:49:05 +0200") Message-ID: <877gs18ucl.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Y-GMX-Trusted: 0 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 12396 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) I discovered that the definition of gnus-get-emacs-bug-number in my patch was deficient, so, in hopes that this feature may still make it into Emacs, here is an improved definition (though the bit about bug number 0 is probably dispensible). I'll be happy to provide an updated patch if desired. Steve Berman (defun gnus-get-emacs-bug-number (&optional n) "Return an Emacs bug number in this line, if any. If point is on a recognizable bug number, return it; otherwise, if argument N is a positive integer, return the Nth bug number in this line, counting from the left, or nil if there is no Nth bug number." (save-excursion ;; Get the number if point is anywhere within a string like "bug#1234", or ;; similar strings with a capital "B" or with a space before or after "#", ;; or without "#", as well as strings like ;; "http://debbugs.gnu.org/cgi/bugreport.cgi?bug=1234". (when (or (eq (char-after) ?#) (eq (char-before) ?#) (string= (thing-at-point 'word) "Bug") (string= (thing-at-point 'word) "bug")) (forward-word) (skip-chars-forward " #=")) (let* ((str (thing-at-point 'word)) (num (if str (string-to-number str))) (case-fold-search t)) (if (and num ;; If bug number 0 is allowed (though it isn't in the Emacs ;; bugtracker), it requires special handling, since ;; string-to-number also returns 0 if str is alphabetical. (or (string= "0" str) (not (zerop num))) ;; Make sure this is a bug number, not just any number. (beginning-of-thing 'word) (looking-back "bug ?[#=]? ?")) num ;; Otherwise look for the Nth bug number on this line. (goto-char (line-beginning-position)) (when (re-search-forward "bug ?[#=]? ?\\([0-9]+\\)" (line-end-position) t n) (string-to-number (match-string 1))))))) From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 11 15:10:23 2012 Received: (at 12396) by debbugs.gnu.org; 11 Sep 2012 19:10:23 +0000 Received: from localhost ([127.0.0.1]:55137 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TBVqo-0007YI-1u for submit@debbugs.gnu.org; Tue, 11 Sep 2012 15:10:22 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:58319 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TBVql-0007Y8-4q for 12396@debbugs.gnu.org; Tue, 11 Sep 2012 15:10:20 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 09BEC451CC73; Tue, 11 Sep 2012 12:09:34 -0700 (PDT) From: Juri Linkov To: Stephen Berman Subject: Re: bug#12396: 24.2.50; [PATCH] extend usability of gnus-read-ephemeral-emacs-bug-group Organization: JURTA References: <87d31vtccn.fsf@rosalinde.fritz.box> <87txv7yqwa.fsf@gnus.org> <878vcjt1se.fsf@rosalinde.fritz.box> Date: Tue, 11 Sep 2012 22:01:34 +0300 In-Reply-To: <878vcjt1se.fsf@rosalinde.fritz.box> (Stephen Berman's message of "Sun, 09 Sep 2012 21:49:05 +0200") Message-ID: <871ui8a0v1.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 12396 Cc: Lars Ingebrigtsen , 12396@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) >> It makes sense, but it's kinda not the way these function in Emacs >> usually work. `M-x find-file-at-point', `M-x man', etc, all react to >> the thing under point. And that's a very self-evident user interface. >> Put point at the thing you're interested in, and then issue a command. > > I was annoyed enough times by having to navigate to the bug number to > avoid typing it in that I decided to code up a way to avoid having to do > that; having it in Emacs might spare others such annoyance. :-) I agree with Lars that getting a default value from distant parts of the buffer is non-standard behavior for thing-at-point. It might cause more annoyance when it will do not what the user expects. For instance, if it will get a bug number far away from point, then the user might expect that it will also get a bug number on the next line at the same column position, etc. IOW, I don't oppose such a change only if its logic would be simple and intuitive to users. Also moving argument reading out of the `interactive' specification in `gnus-read-ephemeral-emacs-bug-group' is a change for the worse. However, I think that the second part of your proposal is very useful. Do you think `bug-reference-push-button-action' can be a function? So users could set it to `browse-url' or `gnus-read-ephemeral-emacs-bug-group' (these values still need const tags like in your patch) or any other function. Also I wonder why you don't call `gnus-read-ephemeral-emacs-bug-group' with a bug number argument so users don't need to confirm it with RET. BTW, bug-reference.el could be improved to support also links to revision numbers like "revno:109985" that opens an URL like http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/109985 From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 11 19:11:59 2012 Received: (at 12396) by debbugs.gnu.org; 11 Sep 2012 23:11:59 +0000 Received: from localhost ([127.0.0.1]:55410 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TBZca-0004hq-R4 for submit@debbugs.gnu.org; Tue, 11 Sep 2012 19:11:57 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:53123) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1TBZcW-0004hg-TH for 12396@debbugs.gnu.org; Tue, 11 Sep 2012 19:11:54 -0400 Received: (qmail invoked by alias); 11 Sep 2012 23:11:08 -0000 Received: from i59F57590.versanet.de (EHLO rosalinde.fritz.box) [89.245.117.144] by mail.gmx.net (mp036) with SMTP; 12 Sep 2012 01:11:08 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX1/71oo0W0n7OulgsKElGNWMu/Be6KCWvlSZ7ufNO3 /2eTrY0rhgprbh From: Stephen Berman To: Juri Linkov Subject: Re: bug#12396: 24.2.50; [PATCH] extend usability of gnus-read-ephemeral-emacs-bug-group References: <87d31vtccn.fsf@rosalinde.fritz.box> <87txv7yqwa.fsf@gnus.org> <878vcjt1se.fsf@rosalinde.fritz.box> <871ui8a0v1.fsf@mail.jurta.org> Date: Wed, 12 Sep 2012 01:11:04 +0200 In-Reply-To: <871ui8a0v1.fsf@mail.jurta.org> (Juri Linkov's message of "Tue, 11 Sep 2012 22:01:34 +0300") Message-ID: <87vcfk88af.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Y-GMX-Trusted: 0 X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 12396 Cc: Lars Ingebrigtsen , 12396@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.2 (--) On Tue, 11 Sep 2012 22:01:34 +0300 Juri Linkov wrote: >>> It makes sense, but it's kinda not the way these function in Emacs >>> usually work. `M-x find-file-at-point', `M-x man', etc, all react to >>> the thing under point. And that's a very self-evident user interface. >>> Put point at the thing you're interested in, and then issue a command. >> >> I was annoyed enough times by having to navigate to the bug number to >> avoid typing it in that I decided to code up a way to avoid having to do >> that; having it in Emacs might spare others such annoyance. :-) > > I agree with Lars that getting a default value from distant parts > of the buffer is non-standard behavior for thing-at-point. But my patch uses re-search-forward for getting the default value from "distant parts of the buffer"; its use of thing-at-point is completely standard. > It might cause more annoyance when it will do not what the user expects. > For instance, if it will get a bug number far away from point, then > the user might expect that it will also get a bug number on the next line > at the same column position, etc. IOW, I don't oppose such a change > only if its logic would be simple and intuitive to users. 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. Admittedly, the extension to ChangeLogs could involve several lines between point and the bug number, which my patch does not take into account. > Also moving argument reading out of the `interactive' specification > in `gnus-read-ephemeral-emacs-bug-group' is a change for the worse. This was necessitated by the optional numerical prefix argument, which is passed to gnus-get-emacs-bug-number, which supplies the default for the argument reading; AFAICS it is impossible to have one argument determine another argument within the same interactive spec. > However, I think that the second part of your proposal is very useful. > > Do you think `bug-reference-push-button-action' can be a function? > So users could set it to `browse-url' or `gnus-read-ephemeral-emacs-bug-group' Certainly; see below. > (these values still need const tags like in your patch) Actually, function-item uses the doc string, so tags aren't needed. > or any other function. Also I wonder why you don't call > `gnus-read-ephemeral-emacs-bug-group' with a bug number argument > so users don't need to confirm it with RET. 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. I'll have to give it some thought. In the mean time, since my proposed change to g-r-e-e-b-g doesn't seem to be gaining support and the implementation is problematical (though I still think the feature is worth having), here's a reworking of the second patch along the lines you suggested, using the existing g-r-e-e-b-g instead of my proposed change. I haven't yet made it a patch against the trunk because I only tested it briefly, but it seems to work: (defun bug-reference-browse-url (pos) "Visit the bug's URL in a web browser." (dolist (o (overlays-at pos)) ;; It should only be possible to have one URL overlay. (let ((url (overlay-get o 'bug-reference-url))) (when url (browse-url url))))) (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) (string-to-number (match-string 1 url))))) (when num (gnus-read-ephemeral-emacs-bug-group num))))) (defcustom bug-reference-push-button-action 'bug-reference-browse-url "Function called on clicking a bug reference button." :group 'bug-reference :type '(radio (function-item bug-reference-browse-url) (function-item bug-reference-gnus-read-ephemeral-emacs-bug-group) function)) (defun bug-reference-push-button (&optional pos _use-mouse-action) "Take appropriate action on the bug reference at POS. The action depends on the value of the user option `bug-reference-push-button-action'." (interactive (list (if (integerp last-command-event) (point) last-command-event))) (if (and (not (integerp pos)) (eventp pos)) ;; POS is a mouse event; switch to the proper window/buffer (let ((posn (event-start pos))) (with-current-buffer (window-buffer (posn-window posn)) (bug-reference-push-button (posn-point posn) t))) ;; POS is just normal position. (funcall bug-reference-push-button-action pos))) > BTW, bug-reference.el could be improved to support also links > to revision numbers like "revno:109985" that opens an URL like > http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/109985 That would be useful, though it's going beyond bug references. Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 12 16:57:31 2012 Received: (at 12396) by debbugs.gnu.org; 12 Sep 2012 20:57:31 +0000 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 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 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) From: Juri Linkov To: Stephen Berman Subject: Re: bug#12396: 24.2.50; [PATCH] extend usability of gnus-read-ephemeral-emacs-bug-group Organization: JURTA 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> Date: Wed, 12 Sep 2012 23:54:05 +0300 In-Reply-To: <87vcfk88af.fsf@rosalinde.fritz.box> (Stephen Berman's message of "Wed, 12 Sep 2012 01:11:04 +0200") Message-ID: <87627jatr2.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 12396 Cc: Lars Ingebrigtsen , 12396@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > 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. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 13 16:40:01 2012 Received: (at 12396) by debbugs.gnu.org; 13 Sep 2012 20:40:01 +0000 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 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 Received: (qmail invoked by alias); 13 Sep 2012 20:39:01 -0000 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 From: Stephen Berman To: Juri Linkov Subject: Re: bug#12396: 24.2.50; [PATCH] extend usability of gnus-read-ephemeral-emacs-bug-group 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> Date: Thu, 13 Sep 2012 22:38:59 +0200 In-Reply-To: <87627jatr2.fsf@mail.jurta.org> (Juri Linkov's message of "Wed, 12 Sep 2012 23:54:05 +0300") Message-ID: <87sjalr730.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Y-GMX-Trusted: 0 X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 12396 Cc: Lars Ingebrigtsen , 12396@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.4 (--) 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 From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 13 19:45:20 2012 Received: (at 12396) by debbugs.gnu.org; 13 Sep 2012 23:45:20 +0000 Received: from localhost ([127.0.0.1]:60838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCJ5z-0006Kj-8c for submit@debbugs.gnu.org; Thu, 13 Sep 2012 19:45:19 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:57397 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCJ5x-0006Ka-EN for 12396@debbugs.gnu.org; Thu, 13 Sep 2012 19:45:18 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 4DA31451CC40; Thu, 13 Sep 2012 16:44:21 -0700 (PDT) From: Juri Linkov To: Stephen Berman Subject: Re: bug#12396: 24.2.50; [PATCH] extend usability of gnus-read-ephemeral-emacs-bug-group Organization: JURTA 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> <87sjalr730.fsf@rosalinde.fritz.box> Date: Fri, 14 Sep 2012 02:35:55 +0300 In-Reply-To: <87sjalr730.fsf@rosalinde.fritz.box> (Stephen Berman's message of "Thu, 13 Sep 2012 22:38:59 +0200") Message-ID: <87392lee3g.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 12396 Cc: Lars Ingebrigtsen , 12396@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > 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. 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. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 14 11:38:10 2012 Received: (at 12396) by debbugs.gnu.org; 14 Sep 2012 15:38:10 +0000 Received: from localhost ([127.0.0.1]:33968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCXy5-0003s9-A5 for submit@debbugs.gnu.org; Fri, 14 Sep 2012 11:38:09 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:47915) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1TCXy2-0003s0-Id for 12396@debbugs.gnu.org; Fri, 14 Sep 2012 11:38:07 -0400 Received: (qmail invoked by alias); 14 Sep 2012 15:37:07 -0000 Received: from i59F54610.versanet.de (EHLO rosalinde.fritz.box) [89.245.70.16] by mail.gmx.net (mp069) with SMTP; 14 Sep 2012 17:37:07 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX18fIHdans8fxLm/WOgcRHKQVzUya/5fqO0Ja9hgea fgZio3zN/5DVAh From: Stephen Berman To: Juri Linkov Subject: Re: bug#12396: 24.2.50; [PATCH] extend usability of gnus-read-ephemeral-emacs-bug-group 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> <87sjalr730.fsf@rosalinde.fritz.box> <87392lee3g.fsf@mail.jurta.org> Date: Fri, 14 Sep 2012 17:37:05 +0200 In-Reply-To: <87392lee3g.fsf@mail.jurta.org> (Juri Linkov's message of "Fri, 14 Sep 2012 02:35:55 +0300") Message-ID: <87txv01uqm.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Y-GMX-Trusted: 0 X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 12396 Cc: Lars Ingebrigtsen , 12396@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.4 (--) On Fri, 14 Sep 2012 02:35:55 +0300 Juri Linkov 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 From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 14 19:01:27 2012 Received: (at 12396) by debbugs.gnu.org; 14 Sep 2012 23:01:27 +0000 Received: from localhost ([127.0.0.1]:34429 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCet3-0006q7-P6 for submit@debbugs.gnu.org; Fri, 14 Sep 2012 19:01:27 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:55098 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCesv-0006pf-Qs for 12396@debbugs.gnu.org; Fri, 14 Sep 2012 19:01:19 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id E9925451CCC7; Fri, 14 Sep 2012 16:00:16 -0700 (PDT) From: Juri Linkov To: Stephen Berman Subject: Re: bug#12396: 24.2.50; [PATCH] extend usability of gnus-read-ephemeral-emacs-bug-group Organization: JURTA 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> <87sjalr730.fsf@rosalinde.fritz.box> <87392lee3g.fsf@mail.jurta.org> <87txv01uqm.fsf@rosalinde.fritz.box> Date: Sat, 15 Sep 2012 01:54:31 +0300 In-Reply-To: <87txv01uqm.fsf@rosalinde.fritz.box> (Stephen Berman's message of "Fri, 14 Sep 2012 17:37:05 +0200") Message-ID: <87mx0s5jkw.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 12396 Cc: Lars Ingebrigtsen , 12396@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > 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. I use the same configuration, but this still doesn't work in the Summary buffer, because my Summary buffer is in the thread mode where the subject line is displayed only for the top article of the thread. So for other articles in the thread in the Summary buffer gnus-get-emacs-bug-number doesn't find a bug reference from the current line. From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 25 16:55:54 2012 Received: (at 12396) by debbugs.gnu.org; 25 Dec 2012 21:55:54 +0000 Received: from localhost ([127.0.0.1]:59684 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TncTY-0002rZ-Jb for submit@debbugs.gnu.org; Tue, 25 Dec 2012 16:55:53 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:41463) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TncTU-0002rG-Ps for 12396@debbugs.gnu.org; Tue, 25 Dec 2012 16:55:50 -0500 Received: from ip-90-20-179-93.dialup.ice.net ([93.179.20.90] helo=rusty) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1TncSh-0000bi-Ie; Tue, 25 Dec 2012 22:55:00 +0100 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#12396: 24.2.50; [PATCH] extend usability of gnus-read-ephemeral-emacs-bug-group 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> <87sjalr730.fsf@rosalinde.fritz.box> <87392lee3g.fsf@mail.jurta.org> <87txv01uqm.fsf@rosalinde.fritz.box> <87mx0s5jkw.fsf@mail.jurta.org> X-Now-Playing: Winston Tong's _Theoretically Chinese_ Date: Tue, 25 Dec 2012 22:54:56 +0100 In-Reply-To: <87mx0s5jkw.fsf@mail.jurta.org> (Juri Linkov's message of "Sat, 15 Sep 2012 01:54:31 +0300") Message-ID: <87y5glpzkf.fsf@gnus.org> User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1TncSh-0000bi-Ie X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1357077300.54639@iNsQL7AfxZczhk6WeH2dKg X-Spam-Status: No X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 12396 Cc: 12396@debbugs.gnu.org, Stephen Berman X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.5 (/) My take on this is still that the most obvious interface here is to put point at the bug number and then use the command. So I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) http://lars.ingebrigtsen.no * Lars Magne Ingebrigtsen From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 25 16:55:55 2012 Received: (at control) by debbugs.gnu.org; 25 Dec 2012 21:55:55 +0000 Received: from localhost ([127.0.0.1]:59686 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TncTb-0002ri-Cf for submit@debbugs.gnu.org; Tue, 25 Dec 2012 16:55:55 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:41470) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TncTX-0002rR-4p for control@debbugs.gnu.org; Tue, 25 Dec 2012 16:55:51 -0500 Received: from ip-90-20-179-93.dialup.ice.net ([93.179.20.90] helo=rusty) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1TncSo-0000bt-Ru for control@debbugs.gnu.org; Tue, 25 Dec 2012 22:55:07 +0100 Date: Tue, 25 Dec 2012 22:55:04 +0100 Message-Id: <87wqw5pzk7.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #12396 X-MailScanner-ID: 1TncSo-0000bt-Ru X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1357077307.37855@/ron9v+VZ2L365/l16yvVQ X-Spam-Status: No X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) close 12396 From unknown Sat Sep 06 21:08:06 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 23 Jan 2013 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator