GNU bug report logs - #6390
Should not regexp-quote quote newline?

Previous Next

Package: emacs;

Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>

Date: Thu, 10 Jun 2010 14:43:02 UTC

Severity: wishlist

Tags: wontfix

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 6390 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Lennart Borgman'" <lennart.borgman <at> gmail.com>, <6390 <at> debbugs.gnu.org>
Subject: RE: bug#6390: Should not regexp-quote quote newline?
Date: Thu, 10 Jun 2010 08:22:52 -0700
> (setq x (regexp-quote "a
> b"))
> (message "length x=%d" (length x))
> 
> The length of x will be 3 because the string returned
> by regexp-quote includes a newline.
> Would it not be more practical if the result was "a\nb"?

I, for one, do not understand you.

(setq y "a
b")
(setq x (regexp-quote y))
(setq z "a\nb")
(equal x y) = (equal x z) = t
(length x) = (length z) = 3

What are you trying to say?
And what does it mean to "quote newline"?

Please try to explain clearly what the problem is that you see, or what you are
trying to do that does not succeed as you expect.





This bug report was last modified 13 years and 317 days ago.

Previous Next


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