Re: [code] Head-scratcher with file_types.patterns

From: Michael Richter <ttmrichter.att.gmail.com>
Date: Wed, 28 Oct 2015 11:28:50 +0800

I figured out the problem and it was, as expected, utterly stupid.

The shebang lines are in the form of "#!/usr/bin/env regina" which means
there's obviously no backslash before "regina" as the pattern demands. The
fix was to get rid of the backslash requirement.

Thanks for the pointer to shebang lines that worked. That gave me the info
I needed to find out what my utter dunderheadedness was. :)

On 26 October 2015 at 22:10, Mitchell <m.att.foicica.com> wrote:

> Hi Michael,
>
> On Mon, 26 Oct 2015, Michael Richter wrote:
>
> I have these three lines of code in my init.lua:
>>
>> textadept.file_types.patterns['^#!.+/regina'] = 'rexx'
>>
>>> textadept.file_types.patterns['^#!.+/rexx'] = 'rexx'
>>> textadept.file_types.patterns['ft=rexx'] = 'rexx'
>>>
>>
>>
>> The last one works (as long as it's in the first line of the file). The
>> first two do not. I cannot find any set of incantations that will make
>> the
>> first two work. I'm positive I'm doing something utterly stupid here, but
>> I just can't see what it would be.
>>
>
> Very odd indeed. What are the shbang lines of the files that are not being
> detected properly? Your patterns worked for me for "#!/usr/bin/regina" and
> "#!/usr/bin/rexx".
>
> Cheers,
> Mitchell
> --
> You are subscribed to code.att.foicica.com.
> To change subscription settings, send an e-mail to code+help.att.foicica.com.
> To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
>
>

-- 
"Perhaps people don't believe this, but throughout all of the discussions
of entering China our focus has really been what's best for the Chinese
people. It's not been about our revenue or profit or whatnot."
--Sergey Brin, demonstrating the emptiness of the "don't be evil" mantra.
-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Tue 27 Oct 2015 - 23:28:50 EDT

This archive was generated by hypermail 2.2.0 : Wed 28 Oct 2015 - 06:53:47 EDT