unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: Sam Steingold <sds@gnu.org>, emacs-devel@gnu.org
Subject: bug-reference and revisions
Date: Fri, 28 Dec 2012 00:45:30 +0200	[thread overview]
Message-ID: <87han7cdl6.fsf_-_@mail.jurta.org> (raw)
In-Reply-To: <87k3s3rwhc.fsf@yandex.ru> (Dmitry Gutov's message of "Thu, 27 Dec 2012 20:55:27 -0100")

>>>> -	from 109911 (see the new test).
>>>> +	from Bug#109911 (see the new test).
>>>
>>> This change is inaccurate. 109911 is a Bazaar revision, not a bug number.
>>
>> To avoid ambiguity and misunderstanding revisions should have a prefix
>> similar to bug numbers, e.g. revno#109911 or revno:109911.
>
> Thanks, will do next time.
> I guess I'm used to Git, where you don't usually prefix commit ids with
> anything.

Support for links to revision numbers could be added to bug-reference.el
to fontify strings like "revno:109911" where clicking on them will open
http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/109911

This is possible with a small patch that adds these formats:

revno#109911
revno:109911
revision#109911
revision:109911

=== modified file 'lisp/progmodes/bug-reference.el'
--- lisp/progmodes/bug-reference.el	2012-10-06 20:30:27 +0000
+++ lisp/progmodes/bug-reference.el	2012-12-27 22:43:01 +0000
@@ -69,7 +69,7 @@ (put 'bug-reference-url-format 'safe-loc
                 (get s 'bug-reference-url-format)))))
 
 (defcustom bug-reference-bug-regexp
-  "\\([Bb]ug ?#\\|[Pp]atch ?#\\|RFE ?#\\|PR [a-z-+]+/\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)"
+  "\\([Bb]ug ?#\\|[Pp]atch ?#\\|[Rr]ev\\(?:no\\|ision\\) ?[#:]\\|RFE ?#\\|PR [a-z-+]+/\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)"
   "Regular expression matching bug references.
 The second subexpression should match the bug reference (usually a number)."
   :type 'string


Then evaluating this will open the link:
(setq bug-reference-url-format
      "http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/%s")

but unfortunately it will override "http://debbugs.gnu.org/%s".

To handle two URL types requires customizing `bug-reference-url-format'
to a function that would decide which URL format to use.



  reply	other threads:[~2012-12-27 22:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1ToH53-0003nX-W3@vcs.savannah.gnu.org>
2012-12-27 18:24 ` /srv/bzr/emacs/trunk r111349: * lisp/progmodes/cperl-mode.el (cperl-calculate-indent): Do not stagger Dmitry Gutov
2012-12-27 19:39   ` Juri Linkov
2012-12-27 20:12     ` Sam Steingold
2012-12-27 21:55     ` Dmitry Gutov
2012-12-27 22:45       ` Juri Linkov [this message]
2012-12-27 23:20         ` bug-reference and revisions Dmitry Gutov
2012-12-28  0:49       ` /srv/bzr/emacs/trunk r111349: * lisp/progmodes/cperl-mode.el (cperl-calculate-indent): Do not stagger Stephen J. Turnbull
2012-12-28  4:36         ` Xue Fuqiao
2012-12-28  6:49           ` Stephen J. Turnbull

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87han7cdl6.fsf_-_@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=sds@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).