[PATCH 3d/3] Allow custom key tables for e.g. multiple keystroke bindings.

2014-05-15 Thread Keith Amling
> > + format_add(ft, "client_keytablename", "%s", c->keytable->name); > > Let's call it client_key_table to fit the style of most of the others. Done. > > +struct key_table * > > +key_bindings_lookup_table(const char *name, int create) > > I don't think it is intuitive for a lookup function t

Re: [PATCH 2/3] Copy mode commands left-prune and right-prune to match screen's c and C.

2014-05-15 Thread Keith Amling
;$" from the screen version of this) might cut it although it seems very weird. Keith Thus spake Nicholas Marriott, at Thu, May 15, 2014 at 10:36:30AM +0100: > Date: Thu, 15 May 2014 10:36:30 +0100 > From: Nicholas Marriott > To: Keith Amling > CC: tmux-users@lists.sourceforge.n

[PATCH 3c/3] Allow custom key tables for e.g. multiple keystroke bindings.

2014-05-14 Thread Keith Amling
*) Merged key_binding_map_{value|entry}, now key_table *) Renamed key_binding_map to key_tables *) Fixed backward -n in unbind-key *) Inlined/rearranged bind-key last three code paths Keith --- cmd-bind-key.c | 16 +-- cmd-list-keys.c | 80 +++ cmd-swit

Re: [PATCH 3b/3] Allow custom key tables for e.g. multiple keystroke bindings.

2014-05-14 Thread Keith Amling
> - What's the point of having key_binding_map_value and > key_binding_map_entry? Why not just one key_table struct? > key_bindings_remove can remove it from the tree and unref it, the > unref func can free it when it hits 0. > > - Also if we just have key_table then key_binding_map could be

Re: [PATCH 3/3] Copy mode command change-joinmode to match screen's J.

2014-05-14 Thread Keith Amling
. Keith Thus spake Nicholas Marriott, at Wed, May 14, 2014 at 07:29:19AM +0100: > Date: Wed, 14 May 2014 07:29:19 +0100 > From: Nicholas Marriott > To: Keith Amling > CC: tmux-users@lists.sourceforge.net > Subject: Re: [PATCH 3/3] Copy mode command change-joinmode to match > screen&

Re: [PATCH 2/3] Copy mode commands left-prune and right-prune to match screen's c and C.

2014-05-14 Thread Keith Amling
t; on the longest row then wail on "j" to navigate to the bottom row). Keith Thus spake Nicholas Marriott, at Wed, May 14, 2014 at 07:25:03AM +0100: > Date: Wed, 14 May 2014 07:25:03 +0100 > From: Nicholas Marriott > To: Keith Amling > CC: tmux-users@lists.sourceforge.net &

Re: [PATCH] Allow custom key tables for e.g. multiple keystroke bindings.

2014-05-14 Thread Keith Amling
> > > Or are you thinking of creating the table after running the set command? > > > This shouldn't work - you shouldn't be able to set a client to a > > > nonexistent table. > > > > I guess I don't super care what happens since I won't personally be > > writing any switch-client -T into an empty

Re: [PATCH] Allow custom key tables for e.g. multiple keystroke bindings.

2014-05-14 Thread Keith Amling
but then just smooshed it all to send without thinking about it. I'm also curious what the history on that is, it wasn't clear to me why that was there in the first place. > - You will save me a little time if you use "for (;;)" instead of "while > (1)".

Re: [PATCH] Allow custom key tables for e.g. multiple keystroke bindings.

2014-05-14 Thread Keith Amling
> > Well, I agree it needs to be destroyed eventually but the issue is that > > if a user thinks of the client as being set to [read from] a keytable > > with a name then they will likely think binding a key into a keytable of > > that name will be the same table even if the bind happens after the

Re: [PATCH] Allow custom key tables for e.g. multiple keystroke bindings.

2014-05-14 Thread Keith Amling
The various things I didn't quote are all straight-forward and will be my pleasure to fix. > I don't think it'd be that much compatibility code. > > We could just maintain a flag for the "option-set" prefix in the root > table, and that can be used for prefix/send-prefix. The root table can > nev

[PATCH 3/3] Copy mode command change-joinmode to match screen's J.

2014-05-13 Thread Keith Amling
This patch is less clear than the preceding two. First, should this be bound to anything by default? 'J' is already taken in vi-copy. Second, the current way of surfacing the current join mode is the best thing I could think of but it's sort of ugly and space-wasting. Screen just shows a tempor

[PATCH 2/3] Copy mode commands left-prune and right-prune to match screen's c and C.

2014-05-13 Thread Keith Amling
This is mostly straight-forward although it feels like there are a lot of layers to push it through. Also, I have no idea what's appropriate [if anything] to bind this to in emacs copy mode. Keith --- mode-key.c| 4 screen.c | 12 ++- tmux.h| 7 ++- window-co

[PATCH 1/3] Simplify line copying.

2014-05-13 Thread Keith Amling
I was confused by this complex block for a few moments before managing to parse "rest start x", "last end x", etc. This may or may not help the next reader of this code but I think it's undoubtedly simpler. Keith --- window-copy.c | 16 1 file changed, 4 insertions(+), 12 delet

[PATCH 3b/3] Allow custom key tables for e.g. multiple keystroke bindings.

2014-05-13 Thread Keith Amling
To my great shame that last patch (3 of 3) was very wrong (and undertested). This should be less wrong and maybe a little less confused in e.g. unbinding. Keith --- cmd-bind-key.c | 44 +++-- cmd-list-keys.c | 80 +++--- cmd-switch-client.c | 16

[PATCH 3/3] Allow custom key tables for e.g. multiple keystroke bindings.

2014-05-13 Thread Keith Amling
Keith --- cmd-bind-key.c | 44 +++-- cmd-list-keys.c | 80 +++--- cmd-switch-client.c | 16 +- cmd-unbind-key.c| 27 +++ format.c| 3 +- key-bindings.c | 137 +--- s

[PATCH 2/3] Rename "key table" to "mode key table" in some places.

2014-05-13 Thread Keith Amling
Keith --- cmd-bind-key.c | 8 cmd-unbind-key.c | 8 tmux.1 | 8 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cmd-bind-key.c b/cmd-bind-key.c index 4ff3ac8431bc..27a03ce11ad7 100644 --- a/cmd-bind-key.c +++ b/cmd-bind-key.c @@ -29,12 +29,1

[PATCH 1/3] Remove dead_key_bindings.

2014-05-13 Thread Keith Amling
Keith --- key-bindings.c | 17 ++--- server.c | 1 - tmux.h | 1 - 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/key-bindings.c b/key-bindings.c index f725508bce62..58be0c6fe896 100644 --- a/key-bindings.c +++ b/key-bindings.c @@ -27,7 +27,6 @@ RB_GE

[PATCH] Allow custom key tables for e.g. multiple keystroke bindings.

2014-05-12 Thread Keith Amling
Sorry if this isn't formatted as expected, I'm not at all familiar with the operation of git's e-mail tools. Keith --- Makefile.am| 1 + cmd-bind-key.c | 52 - cmd-list-keys.c| 80 +++--- cmd-set-keytable.c | 44 +++

Contributing to tmux?

2014-05-12 Thread Keith Amling
As a long-time screen user I had been meaning to switch to tmux and when I sat down to try it for real I was generally impressed but I realized unfortunately I use some of screen's more esoteric features extensively and they aren't all in tmux. In particular I got caught up on (a) lack of custom k