GNU bug report logs - #17814
24.3.91; better string manipulation in subr-x

Previous Next

Package: emacs;

Reported by: Shigeru Fukaya <shigeru.fukaya <at> gmail.com>

Date: Thu, 19 Jun 2014 19:12:01 UTC

Severity: wishlist

Found in version 24.3.91

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Shigeru Fukaya <shigeru.fukaya <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 17814 <at> debbugs.gnu.org
Subject: bug#17814: 24.3.91; better string manipulation in subr-x
Date: Sat, 21 Jun 2014 13:07:27 +0900
>The above string-match will fail on a string that has a newline, and the
>subsequent code will use whatever was the old match-data, resulting in
>broken behavior.

"." in "\\`[\s\t\n\r]*\\(.*?\\)[\s\t\n\r]*\\'" must be "\\(.\\|\n\\)", sorry.

>Other than that, I don't have any opinion on such changes (I've never
>heard anyone complain about code size or cpu-time of any of those
>functions, so I think it largely doesn't matter either way).

Using string-trim-to-right and string-trim-to-left creates unnecessary
temporary string if both sides need triming may matter, then?

Anyway, I think I'm just sending a small proposal.  I don't care much
if you throw it away.  Thank you for spending your time.


Regards,
Shigeru
t




This bug report was last modified 6 years and 253 days ago.

Previous Next


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