* log-view-current-tag doesn't return SCCS revision
@ 2003-06-26 18:37 Kevin Rodgers
0 siblings, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2003-06-26 18:37 UTC (permalink / raw)
>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):
*** 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 12:24:59 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 4) (match-string 5))))
(unless (re-search-forward log-view-file-re pt t)
rev))))))
--
<a href="mailto:<kevin.rodgers@ihs.com>">Kevin Rodgers</a>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: log-view-current-tag doesn't return SCCS revision
[not found] <mailman.8695.1056655038.21513.bug-gnu-emacs@gnu.org>
@ 2003-06-26 22:38 ` Kevin Rodgers
2003-06-26 23:43 ` Kevin Rodgers
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2003-06-26 22:38 UTC (permalink / raw)
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: log-view-current-tag doesn't return SCCS revision
[not found] <mailman.8695.1056655038.21513.bug-gnu-emacs@gnu.org>
2003-06-26 22:38 ` log-view-current-tag doesn't return SCCS revision Kevin Rodgers
@ 2003-06-26 23:43 ` Kevin Rodgers
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2003-06-26 23:43 UTC (permalink / raw)
BTW, the log-view-file-re constant and log-view-current-file function seem
to be already in sync.
--
<a href="mailto:<kevin.rodgers@ihs.com>">Kevin Rodgers</a>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-06-26 23:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.8695.1056655038.21513.bug-gnu-emacs@gnu.org>
2003-06-26 22:38 ` log-view-current-tag doesn't return SCCS revision Kevin Rodgers
2003-06-26 23:43 ` Kevin Rodgers
2003-06-26 18:37 Kevin Rodgers
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.