Re: [code] Problem with snippets

From: Russell Dickenson <russelldickenson.att.gmail.com>
Date: Tue, 13 Oct 2015 14:00:07 +1000

Mitchell,

Ah... now I recall mention of the snippets handling being rewritten. I
look forward to testing the nightly when it's available.

-- 
Russell Dickenson
On 13 October 2015 at 12:34, Mitchell <m.att.foicica.com> wrote:
> Hi Russell,
>
> On Tue, 13 Oct 2015, Russell Dickenson wrote:
>
>> I am again trying Textadept for about the 10th time. Rest assured the
>> problem is with my brain, not Textadept.
>
>
> In this case you've given Textadept too much credit! What you've described
> below is a bug that will be fixed in tonight's nightly.
>
> Thanks for your patience and report! The latest release of Textadept
> overhauled its underlying snippet engine, and small bugs have been popping
> up here and there.
>
> Cheers,
> Mitchell
>
>
>> As I write documentation in DocBook XML format, an extremely "wordy"
>> and highly-structured format, I am keen to establish a set of
>> snippets. I created one which went well, but am having trouble with a
>> more advanced one.
>>
>> The following [1] is the content of textadept-snippets.lua which I am
>> calling from init.lua. When I type "para" and press [Tab] I get the
>> expected result, which is the text at [2] inserted and the caret at
>> '_'. When I type "varlist" and press [Enter] I get the text at [3]. My
>> issues are that (1) I don't understand if the "/" symbol is causing
>> the issue and if so, why, (2) Textadept happily outputs the error text
>> into the document. Anyone less Eagle-eyed might miss the fact that
>> unwanted text had been inserted.
>>
>>
>> Example [1]
>> snippets.xml = {
>>  ['para']    = '<para>\n\t%1\n</para>',
>>  ['literal'] = '<literal>%1</literal>',
>>  ['varlist'] =
>>
>> '<variablelist>\n<title>%1</title>\n<varlistentry>\n\t<term>\n\t<filename>\n%2</filename>\n</term>\n<listitem>\n<para>\n%3</para>\n</listitem>\n</varlistentry>\n</variablelist>\n'
>> }
>>
>>
>> Example [2]
>> <para>
>>  _
>> </para>
>>
>>
>> Example [3]
>> <variablelist>
>> <title>[string "return /title"]:1: unexpected symbol near '/'
>> <varlistentry>
>>  <term>
>>  <filename>
>> [string "return /filename"]:1: unexpected symbol near '/'
>> </term>
>> <listitem>
>> <para>
>> [string "return /para"]:1: unexpected symbol near '/'
>> </listitem>
>> </varlistentry>
>> </variablelist>
>>
>>
>>
>
> 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.
>
-- 
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 13 Oct 2015 - 00:00:07 EDT

This archive was generated by hypermail 2.2.0 : Tue 13 Oct 2015 - 06:46:36 EDT