Board index » off-topic » Macintosh Files in Search Window

Macintosh Files in Search Window


2003-12-20 02:05:34 AM
off-topic2
Hi,
I just started working on a cross platform project with macintosh
developers. I was able to open the mac files correctly by setting (in
the FileOptions prefs): "Auto detect file encoding", "Auto sense file
EOL". It works great, except for the "Search window".
When I do a file grep, the results in macintosh files (with \r and no
\n) All the results show up on one line, making them almost useless.
For example the mac file:
// A
// B
// C
Would open fine, but a file grep for B would give the following on the
search line:
1 //A //B //C
Any ideas for how to get grep to recognize mac files??
Thanx,
Jake.
 
 

Re:Macintosh Files in Search Window

PDKTM (please don't kill the messenger)
EOL processing in CodeWright forces some constraints in the way everything
is done. I didn't like the conclusion when I first heard it. (Many of the
people in this newsgroup seem to share that opinion.) As an example,
CodeWright regular expressions are not identical to UNIX regular
expressions.
I feel fortunate in the fact that I do not have any Mac files on hand (my
prejudice is clearly obvious). If you would send me one I would be happy to
experiment with it.
--
-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
"Jake" < XXXX@XXXXX.COM >wrote in message
Quote
Hi,

I just started working on a cross platform project with macintosh
developers. I was able to open the mac files correctly by setting (in
the FileOptions prefs): "Auto detect file encoding", "Auto sense file
EOL". It works great, except for the "Search window".
When I do a file grep, the results in macintosh files (with \r and no
\n) All the results show up on one line, making them almost useless.

For example the mac file:

// A
// B
// C

Would open fine, but a file grep for B would give the following on the
search line:

1 //A //B //C


Any ideas for how to get grep to recognize mac files??

Thanx,
Jake.


 

Re:Macintosh Files in Search Window

You sent me a sample file and I tried a File Grep on it. The results that I
got were totally consistent with any other search output I have ever gotten.
I provided you before and after screenshot. Were the results I got
different from your results? Did I perform the correct test for you?
--
-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
"Thom Little" < XXXX@XXXXX.COM >wrote in message
Quote
PDKTM (please don't kill the messenger)

EOL processing in CodeWright forces some constraints in the way everything
is done. I didn't like the conclusion when I first heard it. (Many of
the
people in this newsgroup seem to share that opinion.) As an example,
CodeWright regular expressions are not identical to UNIX regular
expressions.

I feel fortunate in the fact that I do not have any Mac files on hand (my
prejudice is clearly obvious). If you would send me one I would be happy
to
experiment with it.

--
-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
--

"Jake" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...
>Hi,
>
>I just started working on a cross platform project with macintosh
>developers. I was able to open the mac files correctly by setting (in
>the FileOptions prefs): "Auto detect file encoding", "Auto sense file
>EOL". It works great, except for the "Search window".
>When I do a file grep, the results in macintosh files (with \r and no
>\n) All the results show up on one line, making them almost useless.
>
>For example the mac file:
>
>// A
>// B
>// C
>
>Would open fine, but a file grep for B would give the following on the
>search line:
>
>1 //A //B //C
>
>
>Any ideas for how to get grep to recognize mac files??
>
>Thanx,
>Jake.
>
>


 

{smallsort}

Re:Macintosh Files in Search Window

Thom,
Thanx for your effort. You did a 'Documents' grep, and since the
document in memory has been adjusted, it looks fine. The problem I have
is with 'File' grep (same dialog, just choose 'Files' as the source),
which gives the whole-file-on-on-line problem.
I am doing development with mac folks, and will be doing a lot of
file greps in their code base.
P.S. your settings are the same as mine.
Thanx,
Jake.
Thom Little wrote:
Quote
You sent me a sample file and I tried a File Grep on it. The results that I
got were totally consistent with any other search output I have ever gotten.

I provided you before and after screenshot. Were the results I got
different from your results? Did I perform the correct test for you?

 

Re:Macintosh Files in Search Window

Following your more tightly defined definition of requirements I get a
similar result.
I note that when there are no files loaded and I do the Grep against the
file it does not provide the carriage returns.
If I load the file and still do the Grep against the file (and not the
document) it correctly inserts the carriage returns.
I think this is a FEATURE that should be reported to Borland Technical
Support for correction.
My guess is that Grep is using BufEditFile( ) and not the newer
BufEditFileAuto( ) and as a result the Mac EOL is not being properly sensed.
Another issue (I don't normally use Grep so maybe this is the way it is
supposed to work.)
If I load your file and delete some lines containing the string to be
matched and then do a Grep against the file (and not the document) the
result is obtained by scanning the document and not the file (i.e. the
deleted lines with matching strings are not reported as matches).
Is this the way Grep should work or is it YAF (yet another FEATURE)?
--
-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
"Jake" < XXXX@XXXXX.COM >wrote in message
Quote
Thom,

Thanx for your effort. You did a 'Documents' grep, and since the
document in memory has been adjusted, it looks fine. The problem I have
is with 'File' grep (same dialog, just choose 'Files' as the source),
which gives the whole-file-on-on-line problem.
I am doing development with mac folks, and will be doing a lot of
file greps in their code base.

P.S. your settings are the same as mine.

Thanx,
Jake.




Thom Little wrote:
>You sent me a sample file and I tried a File Grep on it. The results
that I
>got were totally consistent with any other search output I have ever
gotten.
>
>I provided you before and after screenshot. Were the results I got
>different from your results? Did I perform the correct test for you?
>

 

Re:Macintosh Files in Search Window

The Grep in CodeWright for .NET in Visual Studio .NET 2003 gives the same
results I reported for CodeWright 7.5.4.
--
-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
"Jake" < XXXX@XXXXX.COM >wrote in message
Quote
Thom,

Thanx for your effort. You did a 'Documents' grep, and since the
document in memory has been adjusted, it looks fine. The problem I have
is with 'File' grep (same dialog, just choose 'Files' as the source),
which gives the whole-file-on-on-line problem.
I am doing development with mac folks, and will be doing a lot of
file greps in their code base.

P.S. your settings are the same as mine.

Thanx,
Jake.