Re: [code] [textadept] Buffer/view properties

From: Mitchell <>
Date: Tue, 17 Feb 2015 16:06:23 -0500 (EST)

Hi Robert,

On Tue, 17 Feb 2015, Robert Gieseke wrote:

> Hi Mitchell,
> Am 13/02/15 um 18:03 schrieb Mitchell:
>> On Fri, 13 Feb 2015, Robert Gieseke wrote:
>>> Am 11/02/15 um 18:00 schrieb Mitchell:
>>> [...]
>>>>> As for storing the margins, this would be useful for Textredux,
>>>>> textadept-vi and changing the width for buffers with 10.000s of lines.
>>>>> Not sure if any styles should be stored as well.
>>>> I don't think I like the idea of making margin widths and types
>>>> "per-buffer". That would open the door to "why not save all properties
>>>> associated with views, not buffers?"
>>> I can understand this concern, but the problem is that if it's not done
>>> by Textadept then the other modules need to do it themselves (probably
>>> conflicting with each other or each duplicating it) or they need to
>>> agree on an extra-module that needs to be installed before. There were
>>> also your Lua debugger[1] and Quicknav[2] which made use of the margins.
>>> All might conflict with other modules using the margins.
>> Thanks for your feedback. I will consider this over the weekend.
> maybe a different solution could be setting these properties after a
> buffer or view switch by storing them in a buffer specific table and
> looking up defaults in a meta-table if necessary? Something like
> buffer._settings = {
> wrap_mode = buffer.WRAP_WORD
> margin_width_n = {0, 20}
> view_eol = false
> }
> And a respective complete meta-table for the defaults.
> So instead of saving all properties on every switch, the code changing
> these properties would need to store them in _settings as well if they
> should persist.

No, that's too complicated. I think I'll commit your suggestion with the
margin settings in a day or two.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Tue 17 Feb 2015 - 16:06:23 EST

This archive was generated by hypermail 2.2.0 : Wed 18 Feb 2015 - 06:32:18 EST