[code] Re: [textadept] Feature requests: buffer/tab management

From: Joshua Krämer <joshua.kraemer.att.gmail.com>
Date: Tue, 12 Aug 2014 17:22:25 +0200

On 2014-08-12, 8:39, Mitchell wrote:

> On Mon, 11 Aug 2014, Joshua Krämer wrote:
> > Oh, I find this surprising, as this feature can also be found in
> > small editors (like mousepad, for example). I thought it may be
> > possible to add a layer between the internal buffers and the UI
> > where a list with the UI buffer order is mapped to a list with the
> > internal buffer IDs. I didn't actually ask for a way to change the
> > internal buffer order, just the order of their representation in
> > the UI. However, I'm not knowledgeable about editor programming, so
> > I may just not see the obstacles involved.
>
> Desynchronizing the tab and buffer order would cause lots of
> confusion. Not only would the buffer browser show something
> different, but also using the `_BUFFERS` Lua table in scripts would
> give unexpected results. Any buffer reordering would have to be done
> internally and the tabs would need to reflect the new order.

Of course, the buffer representation in the UI should be synchronized.
There would be one list of UI buffer representations, which would be
reflected by the tab order and the buffer browser. This list
(which could be called _BUFFERS_UI for example) would be available to
scripts, too. In other words: There would simply be a layer of
abstraction between the internal buffers and the UI. Generally, I
think such a kind of abstraction is desirable. Program internals
like the order of buffers in the memory should be hidden from users,
instead, abstract objects should be provided in the UI that simply
link to the internal equivalents. (Like you are able to sort and
rearrange files in a filemanager freely, not being restricted to the
file order on the hard disk.) However, I understand that the
implementation of such an abstraction layer may not be easy if it was
not intended in the beginning. Also, it would be a nice feature, but I
think I can live without it.

Kind regards,
Joshua

-- 
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 12 Aug 2014 - 11:22:25 EDT

This archive was generated by hypermail 2.2.0 : Wed 13 Aug 2014 - 06:26:03 EDT