From: Kevin Rodgers <kevin.rodgers@ihs.com>
Subject: Re: log-view-current-tag doesn't return SCCS revision
Date: Thu, 26 Jun 2003 16:38:26 -0600 [thread overview]
Message-ID: <16123.30178.476540.238460@ihs.com> (raw)
In-Reply-To: <mailman.8695.1056655038.21513.bug-gnu-emacs@gnu.org>
I wrote:
>From log-view.el:
>
> ;; In RCS, a locked revision will look like "revision N.M\tlocked by: FOO".
> (defconst log-view-message-re "^\\(revision \\([.0-9]+\\)\\(?:\t.*\\)?\\|rev \\([0-9]+\\): .*\\|D \\([.0-9]+\\) .*\\)$")
>
> Obviously, the revision may be matched by subexpression 2, 4 (not 3), or
> 5 (for SCCS):
Oops, I wasn't aware of this (from emacs-21.3/etc/NEWS):
| * Lisp changes in Emacs 21.1 (see following page for display-related features)
| ...
| ** Regular expressions now support intervals \{n,m\} as well as
| Perl's shy-groups \(?:...\) and non-greedy *? +? and ?? operators.
and this (from emacs-21.3/man/search.texi):
| `\(?: ... \)'
| specifies a "shy" group that does not record the matched substring;
| you can't refer back to it with `\D'. This is useful in
| mechanically combining regular expressions, so that you can add
| groups for syntactic purposes without interfering with the
| numbering of the groups that were written by the user.
I'd wondered why (match-string 4) returned the SCCS version but
(match-string 5) still returned nil. So the correct patch is:
*** emacs-21.3/lisp/log-view.el.orig Mon Jan 20 04:03:30 2003
--- emacs-21.3/lisp/log-view.el Thu Jun 26 16:35:43 2003
***************
*** 144,150 ****
(forward-line 1)
(let ((pt (point)))
(when (re-search-backward log-view-message-re nil t)
! (let ((rev (or (match-string 2) (match-string 3))))
(unless (re-search-forward log-view-file-re pt t)
rev))))))
--- 144,150 ----
(forward-line 1)
(let ((pt (point)))
(when (re-search-backward log-view-message-re nil t)
! (let ((rev (or (match-string 2) (match-string 3) (match-string 4))))
(unless (re-search-forward log-view-file-re pt t)
rev))))))
--
<a href="mailto:<kevin.rodgers@ihs.com>">Kevin Rodgers</a>
next parent reply other threads:[~2003-06-26 22:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.8695.1056655038.21513.bug-gnu-emacs@gnu.org>
2003-06-26 22:38 ` Kevin Rodgers [this message]
2003-06-26 23:43 ` log-view-current-tag doesn't return SCCS revision Kevin Rodgers
2003-06-26 18:37 Kevin Rodgers
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16123.30178.476540.238460@ihs.com \
--to=kevin.rodgers@ihs.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.