s-news
[Top] [All Lists]

Re: Scanning a line for a carriage return

To: Stuart Luppescu <s-luppescu@uchicago.edu>
Subject: Re: Scanning a line for a carriage return
From: "J. S. Gangolly" <gangolly@csc.albany.edu>
Date: Fri, 9 Mar 2007 13:42:45 -0500 (EST)
Cc: s-news@lists.biostat.wustl.edu
In-reply-to: <1173461880.17614.11.camel@musuko.uchicago.edu>
References: <5B833E900330354F9FDA984D06F9242801559A8C@ca-exchange.corp.pharsight.com> <Pine.GSO.4.58.0703091006150.19494@cayley.ba.albany.edu> <1173454600.17614.4.camel@musuko.uchicago.edu> <Pine.GSO.4.58.0703091205130.19655@cayley.ba.albany.edu> <1173461880.17614.11.camel@musuko.uchicago.edu>
Thank you for the trick. I should have thought about it.
It will make my life a lot simpler.

Thank you again.

Jagdish

On Fri, 9 Mar 2007, Stuart Luppescu wrote:

> On 金, 2007-03-09 at 12:10 -0500, J. S. Gangolly wrote:
> > Sure you can replace just about anything coded in ascii
> > using replace-string in emacs. Unfortunately, many of these
> > control characters are not encoded in ascii. That is why
> > you don't see them in text editors. In emacs, SR-NL shows
> > up as ^M for example. However, I don't think you can
> > remove them, since ^M in ascii is semantically not the same
> > as Meta-M or Ctrl-M in the encoding.
>
> Right. That's why you use the quote character to indicate an actual ^M.
> As in my example:
>
> M-x replace-string<ENTER>C-q C-m<ENTER><ENTER>
>
> C-q (^Q) quotes the next character so it enters an actual ^M. If you
> don't do that, emacs interprets the C-m (^M) the same as <ENTER>.
> --
> Stuart Luppescu -=-=- slu <AT> ccsr <DOT> uchicago <DOT> edu
> CCSR at U of C ,.;-*^*-;.,  ccsr.uchicago.edu
>      (^_^)/    才文と智奈美の父
> Thank God I'm an atheist!
>

--
Jagdish S. Gangolly, Associate Professor (j.gangolly@albany.edu)
Chairperson, Department of Accounting & Law, School of Business
Director, PhD Program in Information Science,
College of Computing & Information
State University of New York at Albany, Albany, NY 12222.
Phone: (518) 442-4949
URL: http://www.albany.edu/acc/gangolly

"We must remember that there are many men who, without being
productive, are anxious to say something important, and the
results are most curious." --Goethe


<Prev in Thread] Current Thread [Next in Thread>