GNU bug report logs - #39290
[PATCH] Correct regexp for flags in 'format' doc string

Previous Next

Package: emacs;

Reported by: Mattias Engdegård <mattiase <at> acm.org>

Date: Sun, 26 Jan 2020 14:22:01 UTC

Severity: normal

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Mattias Engdegård <mattiase <at> acm.org>
Subject: bug#39290: closed ([PATCH] Correct regexp for flags in 'format'
 doc string)
Date: Sun, 26 Jan 2020 18:09:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#39290: [PATCH] Correct regexp for flags in 'format' doc string

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 39290 <at> debbugs.gnu.org.

-- 
39290: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=39290
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: 39290-done <at> debbugs.gnu.org
Subject: [PATCH] Correct regexp for flags in 'format' doc string
Date: Sun, 26 Jan 2020 10:08:17 -0800
Thanks, I installed that in your name into the emacs-27 branch. I think doc 
fixes like that are still good for the emacs-27 branch.

[Message part 3 (message/rfc822, inline)]
From: Mattias Engdegård <mattiase <at> acm.org>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Correct regexp for flags in 'format' doc string
Date: Sun, 26 Jan 2020 15:21:02 +0100
[Message part 4 (text/plain, inline)]
The doc string for 'format' contains

  where field is [0-9]+ followed by a literal dollar "$", flags is
  [+ #-0]+, width is [0-9]+, and precision is a literal period "."
  followed by [0-9]+.

The spec for flags isn't a correct regexp; the hyphen should be last.  This matters, because people copy it into their code without thinking (observed in the wild).

Patch acceptable for emacs-27?

[0001-Correct-regexp-for-flags-in-format-doc-string.patch (application/octet-stream, attachment)]

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

Previous Next


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