Loading ...
Sorry, an error occurred while loading the content.

21541RE: [Clip] Re: continued problems with carriage returns

Expand Messages
  • John Shotsky
    Feb 18, 2011
    • 0 Attachment
      \R means any combination of CR/LF. \n is line feed, \r is carriage return.
      (memory trick: no ‘r’ in linefeed.) In Windows, you really need both, so you
      really should replace \R with \r\n, which I do dozens of times in my clips
      without a single extra line, ever. I suggest that if you are getting
      doubles, you may have accidentally used \n\n without noticing it.



      Mac/*nix/and Windows all use different line ends, and \R consumes them all,
      while \r\n provides a ‘clean’ result. It is the first thing I do in all my
      clips, so that all line ends are in a known state. When I first started
      writing clips, I also used \n only, but eventually that got me into trouble,
      and my whole library had to be converted to use \r\n. (My library is now
      about 800K.)



      Regards,

      John



      From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf
      Of Axel Berger
      Sent: Friday, February 18, 2011 5:42 AM
      To: ntb-clips@yahoogroups.com
      Subject: Re: [Clip] Re: continued problems with carriage returns





      tf_ntp wrote:
      > I have found that many times it helps to paste the text into NoteTab
      > then select all (Ctrl+A) then hit Modify>Lines>Adjust Line Breaks.

      That was exactly what I was going to suggest, but then I failed to find
      the correct menu item. Thanks, Frank. Should a clip be run anyway, then
      a
      ^!Replace "\R" >> "\n" WRASTI
      in there might be better.

      N.B: The replace string ought to be "\r\n" really, but I've found that
      sometimes gives me two newlines in place of one while just "\n" always
      works. I've never looked into it but just kept using the "wrong" term.

      Axel

      --
      Dipl.-Ing. F. Axel Berger Tel: +49/ 2174/ 7439 07
      Johann-Häck-Str. 14 Fax: +49/ 2174/ 7439 68
      D-51519 Odenthal-Heide eMail: Axel-Berger@...
      <mailto:Axel-Berger%40Nexgo.De>
      Deutschland (Germany) http://berger-odenthal.de





      [Non-text portions of this message have been removed]
    • Show all 7 messages in this topic