Author Topic: perfile.xml and PERFILEDATA_INFO and LineEndings...  (Read 1231 times)


  • Senior Community Member
  • Posts: 1714
  • Hero Points: 168
  • Text
perfile.xml and PERFILEDATA_INFO and LineEndings...
« on: August 06, 2014, 08:08:25 pm »
So, just poking around a bit...

"perfile.xml" and PERFILEDATA_INFO have a lot of information about the view state of a file (such as hex mode, character encoding, softwrap...).

But...this isn't all of the information.
The one piece I noted that is missing is the line ending (FU, FD, FM options in the load_files built in function). (I wonder what else is missing - +-L[C|Z], -LB SBCS, others?).

Hm.... I thought that Slick retained this information, but I just tested and it does not.
If I load a (CRLF) file and specify "Unix/Mac (LF)" when I load it, I can see the CR characters.
When I close the file and reload it without specifying line-endings, then slick apparently just auto-detects it instead of remembering the line endings I had most recently specified.

The recently added new feature "reload_with_encoding" doesn't work with macro-recording.
If you record a macro, and use reload_with_encoding() in the macro, when you play back the macro, reload_with_encoding() will prompt the user for what to do --- it doesn't record in the macro the choices made as it should.

In fact, it apparently cannot detect the current line-ending format nor save/restore it.
Slick should expose the buffers line ending format to script.
Ideally, the character encoding and line ending information would also be displayed in the status bar.


  • Senior Community Member
  • Posts: 360
  • Hero Points: 31
  • Jim Lang - always a student.
Re: perfile.xml and PERFILEDATA_INFO and LineEndings...
« Reply #1 on: August 07, 2014, 12:20:57 pm »
A question from someone not terribly familiar with more complex macros:

Is it possible to edit the macro and supply the arguments to the function directly?  I understand that it should have detected that in the recording of the macro, but would that work around the problem?

n.b. - I just tried it and I simply don't see it.  Now I need to investigate macros and arguments.


  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4627
  • Hero Points: 370
Re: perfile.xml and PERFILEDATA_INFO and LineEndings...
« Reply #2 on: August 21, 2014, 10:34:48 pm »
The reload_with_encoding command for v19 will support passing arguments. It will use the same arguments that are passed to the edit command. You will be able to use macro recording as a user friendly way to generate the encoding and line ending options you want. Just edit the generated macro source code.