help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NTemacs: in NEGATED char-class, how to show newline? [^n]+ goes one


From: Jason Rumney
Subject: Re: NTemacs: in NEGATED char-class, how to show newline? [^n]+ goes one too far.
Date: Fri, 19 Feb 2010 07:40:41 -0800 (PST)
User-agent: G2/1.0

On Feb 18, 4:14 am, dkco...@panix.com (David Combs) wrote:
> subj: NTemacs: in NEGATED char-class, how to show newline?  [^\n]+ goes one 
> too far.
>
> Remember that this is "ntemacs" (google it, you'll see), running under
> WINDOWS xp, where line-ends are the old DEC crlf.

Emacs uses LF line ends internally, converting on read and write
(unless you explicitly use binary or *-unix as your coding system).

> (query-replace-regexp "[^\\n]+"     "BEGIN--\\&--END"      nil (if (and 
> transient-mark-mode mark-active) (region-beginning)) (if (and 
> transient-mark-mode mark-active) (region-end)))

Does the following work any better?

(query-replace-regexp ".+$" "BEGIN--\\&--END" ...)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]