GNU bug report logs - #37215
[PATCH] vc-cvs-ignore writes absolute filenames and duplicate strings

Previous Next

Package: emacs;

Reported by: Wolfgang Scherer <Wolfgang.Scherer <at> gmx.de>

Date: Wed, 28 Aug 2019 22:33:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Wolfgang Scherer <Wolfgang.Scherer <at> gmx.de>
Cc: 37215 <at> debbugs.gnu.org, larsi <at> gnus.org, dgutov <at> yandex.ru
Subject: bug#37215: [PATCH] vc-cvs-ignore writes absolute filenames and duplicate strings
Date: Fri, 21 Feb 2020 11:31:03 +0200
> Cc: larsi <at> gnus.org, 37215 <at> debbugs.gnu.org, dgutov <at> yandex.ru
> From: Wolfgang Scherer <Wolfgang.Scherer <at> gmx.de>
> Date: Thu, 20 Feb 2020 00:06:11 +0100
> 
> > I'd like to install your patch, and I'd like to do it soon, so it
> > makes it into Emacs 27.  Can you please propose a modified patch which
> > adds some minimal information about what's going on to the doc string
> > and/or the comments around the code?
> 
> Here is the revised patch. I have cleared the FIXME issue mentioned by Lars and added commentary to what is going on.

Thanks, this LGTM.  Just a couple of minor nits, and we can install
this.

> (lisp/vc/pcvs.el) Call ‘vc-cvs-append-to-ignore’ with SORT argument.

Please quote 'like this' in log messages, and try to avoid non-ASCII
characters there (they are generally only necessary in people's
names).

> +Patterns follow glob(7) syntax.  Special characters \"?*[\\\" are
> +escaped with a backslash."

I'd say "should be escaped" here, since this is a requirement for the
argument passed to this function.

Also, I'd mention that FILE can be a pattern, otherwise the reference
to patterns might come as a surprise to the reader.

> +to hear about anymore.  If SORT is non-nil, sort the ines of the
> +ignore file."                                        ^^^^

Typo: should be "lines".

> +    (goto-char (point-min))
> +    (save-match-data
> +      (unless (re-search-forward (concat "^" (regexp-quote str) "$") nil t)
> +        (goto-char (point-max))

You could use non-nil, non-t 3rd argument of re-search-forward, in
which case the following goto-char would be redundant, right?




This bug report was last modified 5 years and 141 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.