Re: [code][textadept] Restoring 'session' fails

From: Mitchell <m.att.foicica.com>
Date: Fri, 14 Jun 2019 20:40:13 -0400 (EDT)

Hi Lukas,

On Thu, 13 Jun 2019, Procházka Lukáš Ing. wrote:

> Hello Mitchell,
>
> here is my situation when TA fails to restore last session.
>
> I'm attaching all related files - they are zipped including the absolute path
> ("DISC_D" stands for "d:").
>
> Note that:
>
> - TA on my comp is placed in "D:\Programs\TextAd" and
> - I'm running TA by "textadept.exe -u d:\Lukas\Miscell\TextAdept" from
> "D:\Programs\TextAd" directory.
>
> (As I'm working on some extensions to TA/ConTeXt, there is "Init.lua" in
> "d:\Lukas\Miscell\TextAdept" which adds some exts... The work is still being
> developed...)

In your *ConTeXt.lua* lexer, the line:

   local lex = lexer.new('context')

needs to be:

   local lex = lexer.new('ConTeXt')

because your *init.lua* has:

   textadept.file_types.extensions.mkiv = 'ConTeXt'

When splitting a view upon session restore, the new view initially contains the current buffer, which is a '.mkiv' file, and so the lexer for it is loaded, but fails this ultimately throws an error.

Updating the lexer name fixes your issue on my side.

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.
Received on Fri 14 Jun 2019 - 20:40:13 EDT

This archive was generated by hypermail 2.2.0 : Sat 15 Jun 2019 - 06:33:53 EDT