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

1080RE: [jasspa] Bug

Expand Messages
  • Phillips, Steven
    Apr 6 5:20 AM
    • 0 Attachment
      Gabriel,

      This also catches me out and while I found it to be a feature rather than a bug (:) I still think this behaviour should be changed/avoided. But it looks to me like you are trying to do something pretty odd like reducing the whole file to one line of text? If so a much better way of doing this is to use binary mode, e.g. if you are trying to replace "\n" with the string "<NL>" load the file in binary mode (C-x 9) and do:

      replace-string " 0A " " 3C 43 52 3E "

      (tip: to get the " 3C 43 52 3E " string create a temporary text file with the required string in it, save it, delete the buffer and load the file in binary mode) You may need to do a further:

      replace-string " 0D " " "

      If the file is windows format, and job done, this also fixes the long line issue. If you are not removing the '\n' then I suggest you use magic mode and '$', i.e. to replace all '\n' with '<CR>\n' do:

      replace-string "$" "<CR>"

      If this does not help I will need a more explicit example of what you are trying to do,

      Steve

      > -----Original Message-----
      > From: first last [mailto:prelude_2_murder@...]
      > Sent: 06 April 2004 12:51
      > To: jasspa@yahoogroups.com
      > Subject: [jasspa] Bug
      >
      >
      > One bug that I have found and that it annoys me quite a lot:
      >
      > If I have a file with some text and do a "replace all" replacing "\n"
      > with whatever the file grows enormously (until the line is too long or
      > I stop it).
      >
      > I know this is caused by ME adding a "\n" at the end of the file but,
      > if it is gonna do this, it should ignore the "\n" before the EOF when
      > replacing, shouldn't it?
      >
      > As a workaround, can the "append "\n" to the end of the file" be
      > disabled?
      >
      > Also, is there any special reason for having a maximum line size? I
      > find that limit annoying sometimes, when I get data files and want to
      > convert them (replacing the "\n"s with ","s and so on).
      >
      > Thanks
      >
      > Gabriel
      >
      > ______________________________________________________________
      > __________
      > Yahoo! Messenger - Communicate instantly..."Ping"
      > your friends today! Download Messenger Now
      > http://uk.messenger.yahoo.com/download/index.html
      >
      >
      > ------------------------ Yahoo! Groups Sponsor
      > ---------------------~-->
      > Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
      > Printer at MyInks.com. Free s/h on orders $50 or more to the
      > US & Canada.
      > http://www.c1tracking.com/l.asp?cid=5511
      > http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/89EolB/TM
      > --------------------------------------------------------------
      > -------~->
      >
      > ______________________________________________________________
      > ____________
      >
      > This is an unmoderated list. JASSPA is not responsible for
      > the content of
      > any material posted to this list.
      >
      > To unsubscribe, send a mail message to
      >
      > mailto:jasspa-unsubscribe@yahoogroups.com
      >
      > or visit http://groups.yahoo.com/group/jasspa and
      > modify your account settings manually.
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
    • Show all 4 messages in this topic