Re: [code][textadept] Some observations/corrections for beta 2

From: Mitchell <m.att.foicica.com>
Date: Sat, 16 Jun 2018 23:56:49 -0400 (EDT)

Hi Keresztes,

On Fri, 15 Jun 2018, Mitchell wrote:

> Hi Keresztes,
>
> Sorry for the late reply.
>
> On Tue, 12 Jun 2018, Keresztes Barna wrote:
>
>> Hi,
>> I took a look at the latest beta of Textadept 10, here are some small
>> observations or corrections:
>>
>> 1. Makefile: for Linux installation it's better to use
>> /usr/share/applications for the .desktop files instead
>> /usr/local/share/applications (this path doesn't exists normally).
>> Line 75 should be changed from:
>>     XDG_DATA_DIR ?= $(PREFIX)/share/applications
>> to:
>>     XDG_DATA_DIR ?= /usr/share/applications
>> This would be consistent with the icon file location too.
>
> The FreeDesktop specification says XDG_DATA_DIR is
> "/usr/local/share:/usr/share" by default, so if
> /usr/local/share/applications/ does exist, it will be read from. In general,
> Linux applications should install to the /usr/local/ prefix by default, so
> the Makefile does not deviate from it.
>
>> 2. Markdown lexer: the second level lists are considered blockcodes.
>> The list definition should be moved before the blockcode definition or the
>> blockcode definition should be updated to ignore the lines beginning with
>> [spaces/tabs+bullet(-+*)].
>
> Thanks. I'll apply a fix.

Fixed[1].

>> 3. I'm glad that my suggestion of calling buffer:set_theme any moment was
>> implemented :)
>> I connected it to the LEXER_LOADED event to set a light theme for text
>> files
>> (latex or markdown). My code is the following:
>>
>> events.connect(events.LEXER_LOADED, function(lang)
>>   if lang == 'markdown' or lang == 'latex' then
>>       buffer.wrap_mode = buffer.WRAP_WORD
>>       buffer.wrap_visual_flags = buffer.WRAPVISUALFLAG_MARGIN
>>       buffer:set_theme(not CURSES and 'base16-tomorrow-light' or 'term')
>>   else
>>     buffer:set_theme(not CURSES and 'base16-monokai-dark' or 'term')
>>     buffer.wrap_mode = buffer.WRAP_NONE
>>   end
>> end)
>>
>> This sets correctly the color theme for different lexers, but won't set the
>> lexer (highlighting) for markdown and latex. If I don't change the theme,
>> the
>> lexer will be correctly applied. Is there an explanation for this?
>
> I think you've found a bug. I will look into this.

Fixed[2] I think.

The latter fix will show up in the nightly build for 17 Jun. The former will show up in a week or so when I next update Scintilla.

Cheers,
Mitchell

[1]: https://foicica.com/hg/scintilla/rev/fb90629f275b
[2]: https://foicica.com/hg/textadept/rev/e51b85a3a5a4

-- 
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 Sat 16 Jun 2018 - 23:56:49 EDT

This archive was generated by hypermail 2.2.0 : Sun 17 Jun 2018 - 06:41:49 EDT