comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: IDLWAVE fontlock / fontify weirdness in Xemacs
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: IDLWAVE fontlock / fontify weirdness in Xemacs [message #22298] Thu, 02 November 2000 09:14
riglerej is currently offline  riglerej
Messages: 5
Registered: November 2000
Junior Member
In article <8tnlfu$luf$1@nnrp1.deja.com>,
jrigler@Colorado.EDU wrote:
> I have Xemacs 21.1.12 (default with RH Linux 7.0 Respin), and updated
> all of my packages to the most recent versions as of 10/31/00 (which
> means IDLWAVE 1.22...or a modified version 4.5 I assume).
>
> The problem I'm experiencing is in the fontification. For whatever
> reason, all of a suddent every time I start a new line, or even modify
> an old line for that matter, it all turns green (the color for
> strings). this only really happens after a certain block in the code.
> The possibly offending code (which works, and I see no syntax problems
> with it) follows. Any ideas?
>
> ; Convert MJD to a YYYYMMDD (see - http://bowie.gsfc.nasa.gov/time/)
> caldat,date_beg+2400000.5,month_beg,day_beg,year_beg
> caldat,date_end+2400000.5,month_end,day_end,year_end
>
> month_beg=string(month_beg,format='(i2.2)')
> day_beg=string(day_beg,format='(i2.2)')
> year_beg=string(year_beg,format='(i4.4)')
>
> To clarify a little more, what happens is that I can type anything
> before the line with the first "format" statement, and it works
> perfectly. If I add, or modify anything after the "format" statement,
> the whole line becomes green, as if IDLWAVE thought it were a string.
>
> I really don't like the IDLDE, so I sure hope there is a solution to
> this.
>
> Thanks,
>
> Josh
>




OK, here's a little additional information that may shed some insight on
the problem I described above. This only happens AFTER I save my file.
If I simply open the file, and edit things, no problems. HOWEVER, if
then save some of those changes, go back to a point below the format
statements I listed above, and try to type something, I get the
fontification problem.

If somebody REALLY wants to help me by looking at my entire program, by
all means let me know, and I'll post it, but I don't think that is
really necessary, and I don't want to clutter up the group needlessly.

-Josh (again)


Sent via Deja.com http://www.deja.com/
Before you buy.
Re: IDLWAVE fontlock / fontify weirdness in Xemacs [message #22299 is a reply to message #22298] Thu, 02 November 2000 09:02 Go to previous message
riglerej is currently offline  riglerej
Messages: 5
Registered: November 2000
Junior Member
In article <3A018A24.2C84D752@astro.cornell.edu>,
"J.D. Smith" <jdsmith@astro.cornell.edu> wrote:
> Martin Schultz wrote:
>>
>> jrigler@Colorado.EDU wrote:
>>>
>>> I have Xemacs 21.1.12 (default with RH Linux 7.0 Respin), and
updated
>>> all of my packages to the most recent versions as of 10/31/00
(which
>>> means IDLWAVE 1.22...or a modified version 4.5 I assume).
>>>
>>> The problem I'm experiencing is in the fontification. For
whatever
>>> reason, all of a suddent every time I start a new line, or even
modify
>>> an old line for that matter, it all turns green (the color for
>>> strings). this only really happens after a certain block in the
code.
>>> The possibly offending code (which works, and I see no syntax
problems
>>> with it) follows. Any ideas?
>>>
>>> ; Convert MJD to a YYYYMMDD (see -
http://bowie.gsfc.nasa.gov/time/)
>>> caldat,date_beg+2400000.5,month_beg,day_beg,year_beg
>>> caldat,date_end+2400000.5,month_end,day_end,year_end
>>>
>>> month_beg=string(month_beg,format='(i2.2)')
>>> day_beg=string(day_beg,format='(i2.2)')
>>> year_beg=string(year_beg,format='(i4.4)')
>>>
>>> To clarify a little more, what happens is that I can type anything
>>> before the line with the first "format" statement, and it works
>>> perfectly. If I add, or modify anything after the "format"
statement,
>>> the whole line becomes green, as if IDLWAVE thought it were a
string.
>>>
>>> I really don't like the IDLDE, so I sure hope there is a solution
to
>>> this.
>>>
>>> Thanks,
>>>
>>> Josh
>>>
>>> Sent via Deja.com http://www.deja.com/
>>> Before you buy.
>>
>> yes, I have seen a similar thing already in earlier versions of
>> idlwave (presumably 3.12). I never succeeded in tracking down the
part
>> of the code that caused it but haven't tried to hard either.
>> Interestingly, it sometimes appeared to work better once I exited
>> xemacs and restarted again. Then again: sometimes this didn't help
>> either.
>>
>> Cheers,
>> Martin
>>
>> PS: I know, this was a terrible bug report ;-) But perhaps it helps
to
>> know that it occured in earlier versions...
>
> I presume Carsten will weigh in authoritatively on this question, but
I
> just wanted to make sure you're using the latest IDLWAVE... version
4.5,
> available at http://www.strw.leidenuniv.nl/~dominik/Tools/idlwave/. I
> presume you have your font-lock fontifier working, or you wouldn't
know
> to complain, but make sure you've set:
>
> (global-font-lock-mode 1)
>
> or some such in your .emacs.
>
> One other gotcha: if you've extracted this code fragment from a
larger
> file, the details of what's in that file are important. IDLWAVE
> fontifies based on the entire buffer, not line by line. An example
> screw-up:
>
> a='this is a string
> b=a+c ; this isn't fontified correctly
>
> Here the closing quote is forgotten. IDLWAVE notices and tells you
> about it after you leave the string, but if you leave it or load in a
> file with this error, you'll see the fontification past there looks
like
> one big string, until you start typing and IDLWAVE does more local
> fontification. This is quite useful, since it gives you immediate
> visual clues as to where the error occurs.
>
> JD
>

I've made this mistake in the past, so it was the first thing I looked
for. I can find no forgotten quotation marks, or mismatched
single/double quotes. The segment of code I included is not the entire
thing, but I included it because the problem systematically shows up
when something is typed AFTER the first line with the format statement.
If I type on any line before that, I get no errors. This problem does
not go away if I restart Xemacs.

-Josh


Sent via Deja.com http://www.deja.com/
Before you buy.
Re: IDLWAVE fontlock / fontify weirdness in Xemacs [message #22302 is a reply to message #22299] Thu, 02 November 2000 07:37 Go to previous message
John-David T. Smith is currently offline  John-David T. Smith
Messages: 384
Registered: January 2000
Senior Member
Martin Schultz wrote:
>
> jrigler@Colorado.EDU wrote:
>>
>> I have Xemacs 21.1.12 (default with RH Linux 7.0 Respin), and updated
>> all of my packages to the most recent versions as of 10/31/00 (which
>> means IDLWAVE 1.22...or a modified version 4.5 I assume).
>>
>> The problem I'm experiencing is in the fontification. For whatever
>> reason, all of a suddent every time I start a new line, or even modify
>> an old line for that matter, it all turns green (the color for
>> strings). this only really happens after a certain block in the code.
>> The possibly offending code (which works, and I see no syntax problems
>> with it) follows. Any ideas?
>>
>> ; Convert MJD to a YYYYMMDD (see - http://bowie.gsfc.nasa.gov/time/)
>> caldat,date_beg+2400000.5,month_beg,day_beg,year_beg
>> caldat,date_end+2400000.5,month_end,day_end,year_end
>>
>> month_beg=string(month_beg,format='(i2.2)')
>> day_beg=string(day_beg,format='(i2.2)')
>> year_beg=string(year_beg,format='(i4.4)')
>>
>> To clarify a little more, what happens is that I can type anything
>> before the line with the first "format" statement, and it works
>> perfectly. If I add, or modify anything after the "format" statement,
>> the whole line becomes green, as if IDLWAVE thought it were a string.
>>
>> I really don't like the IDLDE, so I sure hope there is a solution to
>> this.
>>
>> Thanks,
>>
>> Josh
>>
>> Sent via Deja.com http://www.deja.com/
>> Before you buy.
>
> yes, I have seen a similar thing already in earlier versions of
> idlwave (presumably 3.12). I never succeeded in tracking down the part
> of the code that caused it but haven't tried to hard either.
> Interestingly, it sometimes appeared to work better once I exited
> xemacs and restarted again. Then again: sometimes this didn't help
> either.
>
> Cheers,
> Martin
>
> PS: I know, this was a terrible bug report ;-) But perhaps it helps to
> know that it occured in earlier versions...

I presume Carsten will weigh in authoritatively on this question, but I
just wanted to make sure you're using the latest IDLWAVE... version 4.5,
available at http://www.strw.leidenuniv.nl/~dominik/Tools/idlwave/. I
presume you have your font-lock fontifier working, or you wouldn't know
to complain, but make sure you've set:

(global-font-lock-mode 1)

or some such in your .emacs.

One other gotcha: if you've extracted this code fragment from a larger
file, the details of what's in that file are important. IDLWAVE
fontifies based on the entire buffer, not line by line. An example
screw-up:


a='this is a string
b=a+c ; this isn't fontified correctly

Here the closing quote is forgotten. IDLWAVE notices and tells you
about it after you leave the string, but if you leave it or load in a
file with this error, you'll see the fontification past there looks like
one big string, until you start typing and IDLWAVE does more local
fontification. This is quite useful, since it gives you immediate
visual clues as to where the error occurs.

JD

--
J.D. Smith | WORK: (607) 255-6263
Cornell Dept. of Astronomy | (607) 255-5842
304 Space Sciences Bldg. | FAX: (607) 255-5875
Ithaca, NY 14853 |
Re: IDLWAVE fontlock / fontify weirdness in Xemacs [message #22307 is a reply to message #22302] Thu, 02 November 2000 00:52 Go to previous message
Martin Schultz is currently offline  Martin Schultz
Messages: 515
Registered: August 1997
Senior Member
jrigler@Colorado.EDU wrote:
>
> I have Xemacs 21.1.12 (default with RH Linux 7.0 Respin), and updated
> all of my packages to the most recent versions as of 10/31/00 (which
> means IDLWAVE 1.22...or a modified version 4.5 I assume).
>
> The problem I'm experiencing is in the fontification. For whatever
> reason, all of a suddent every time I start a new line, or even modify
> an old line for that matter, it all turns green (the color for
> strings). this only really happens after a certain block in the code.
> The possibly offending code (which works, and I see no syntax problems
> with it) follows. Any ideas?
>
> ; Convert MJD to a YYYYMMDD (see - http://bowie.gsfc.nasa.gov/time/)
> caldat,date_beg+2400000.5,month_beg,day_beg,year_beg
> caldat,date_end+2400000.5,month_end,day_end,year_end
>
> month_beg=string(month_beg,format='(i2.2)')
> day_beg=string(day_beg,format='(i2.2)')
> year_beg=string(year_beg,format='(i4.4)')
>
> To clarify a little more, what happens is that I can type anything
> before the line with the first "format" statement, and it works
> perfectly. If I add, or modify anything after the "format" statement,
> the whole line becomes green, as if IDLWAVE thought it were a string.
>
> I really don't like the IDLDE, so I sure hope there is a solution to
> this.
>
> Thanks,
>
> Josh
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.


yes, I have seen a similar thing already in earlier versions of
idlwave (presumably 3.12). I never succeeded in tracking down the part
of the code that caused it but haven't tried to hard either.
Interestingly, it sometimes appeared to work better once I exited
xemacs and restarted again. Then again: sometimes this didn't help
either.

Cheers,
Martin

PS: I know, this was a terrible bug report ;-) But perhaps it helps to
know that it occured in earlier versions...

--
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[[ Dr. Martin Schultz Max-Planck-Institut fuer Meteorologie [[
[[ Bundesstr. 55, 20146 Hamburg [[
[[ phone: +49 40 41173-308 [[
[[ fax: +49 40 41173-298 [[
[[ martin.schultz@dkrz.de [[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDL 5.4. Neato. NOT.
Next Topic: Re: Old Timers ??

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:57:05 PDT 2025

Total time taken to generate the page: 0.00635 seconds