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


View this message in rfc822 format

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 6390 <at> debbugs.gnu.org
Subject: bug#6390: Should not regexp-quote quote newline?
Date: Thu, 10 Jun 2010 20:07:42 +0200
On Thu, Jun 10, 2010 at 7:03 PM, Andreas Schwab <schwab <at> linux-m68k.org> wrote:
> Lennart Borgman <lennart.borgman <at> gmail.com> writes:
>
>> Thanks, but that does not apply to the situation I am talking about.
>
> No, it is exactly what you want.


Yes, you are right. Something like this seems to do what I want:

(defun my-quote-string (str)
  "Return string STR quoted like `prin1' do it."
  (let ((ret (prin1-to-string str)))
    (substring ret 1 -1)))


>> But since misunderstandings are great here I might clarify the
>> situation: I am thinking about situations where you want to edit a
>> regexp. One such situation is for example editing the isearch regexp.
>
> You want to edit a (kind of) print representation of a string, not a
> quoted regexp (the only purpose of which is to create a regexp that
> matches exactly a given string).


Yes, I agree now. It is better to keep it conceptually separated like
that. However I then miss the function above.




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.