Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
* [sup-devel] new branch: keybindings
@ 2011-01-28  4:26 Rich Lane
  2011-02-08  8:01 ` Gaute Hope
  0 siblings, 1 reply; 4+ messages in thread
From: Rich Lane @ 2011-01-28  4:26 UTC (permalink / raw)
  To: sup-devel

This branch makes the keybindings hook more useful. It moves the global
keymap into a new GlobalMode that all others inherit from. This lets
you write the same code to make a global keybinding as for a
mode-specific one:

class Redwood::GlobalMode
  keymap.add! :list_starred, "List all starred threads", "s"

  def list_starred
    SearchResultsMode.spawn_from_query "is:starred"
  end
end

I got rid of the "modes" local since I think it's better to just reopen
the class with normal Ruby syntax. The keybindings hook is now exactly
like the startup hook but with the O-k keybinding to reload it.

This branch also makes it easier to write keybindings by catching and
displaying exceptions from any keybinding, including builtin Sup ones.
Masking Sup bugs isn't the goal (there's still a backtrace and bug
report instructions) but the user experience is much better than losing
a half-composed email.

I've added some of my own keybindings (not using GlobalMode yet) to the
wiki: http://sup.rubyforge.org/wiki/wiki.pl?CustomizingKeys
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [sup-devel] new branch: keybindings
  2011-01-28  4:26 [sup-devel] new branch: keybindings Rich Lane
@ 2011-02-08  8:01 ` Gaute Hope
  2011-02-08  8:07   ` Gaute Hope
  0 siblings, 1 reply; 4+ messages in thread
From: Gaute Hope @ 2011-02-08  8:01 UTC (permalink / raw)
  To: sup-devel

Excerpts from Rich Lane's message of 2011-01-28 05:26:38 +0100:
> This branch makes the keybindings hook more useful. It moves the global
> keymap into a new GlobalMode that all others inherit from. This lets
> you write the same code to make a global keybinding as for a
> mode-specific one:
> 
> class Redwood::GlobalMode
>   keymap.add! :list_starred, "List all starred threads", "s"
> 
>   def list_starred
>     SearchResultsMode.spawn_from_query "is:starred"
>   end
> end
> 
> I got rid of the "modes" local since I think it's better to just reopen
> the class with normal Ruby syntax. The keybindings hook is now exactly
> like the startup hook but with the O-k keybinding to reload it.
> 
> This branch also makes it easier to write keybindings by catching and
> displaying exceptions from any keybinding, including builtin Sup ones.
> Masking Sup bugs isn't the goal (there's still a backtrace and bug
> report instructions) but the user experience is much better than losing
> a half-composed email.
> 
> I've added some of my own keybindings (not using GlobalMode yet) to the
> wiki: http://sup.rubyforge.org/wiki/wiki.pl?CustomizingKeys

Could it be that this broke continue buffer search key 'n' ?

lib/sup/buffer.rb:171

This doesn't work for me anymore, could anyone confirm that?

Best regards,
Gaute Hope


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [sup-devel] new branch: keybindings
  2011-02-08  8:01 ` Gaute Hope
@ 2011-02-08  8:07   ` Gaute Hope
  2011-02-13 18:05     ` Rich Lane
  0 siblings, 1 reply; 4+ messages in thread
From: Gaute Hope @ 2011-02-08  8:07 UTC (permalink / raw)
  To: sup-devel

Excerpts from Gaute Hope's message of 2011-02-08 09:01:44 +0100:
> Excerpts from Rich Lane's message of 2011-01-28 05:26:38 +0100:
> Could it be that this broke continue buffer search key 'n' ?
> 
> lib/sup/buffer.rb:171
> 
> This doesn't work for me anymore, could anyone confirm that?

Ah - I just noticed that I have to move down one line before I can hit
'n' to search for the next occurrence. I don't think this was the
original, or desired, behaviour?

- Gaute


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [sup-devel] new branch: keybindings
  2011-02-08  8:07   ` Gaute Hope
@ 2011-02-13 18:05     ` Rich Lane
  0 siblings, 0 replies; 4+ messages in thread
From: Rich Lane @ 2011-02-13 18:05 UTC (permalink / raw)
  To: Gaute Hope; +Cc: sup-devel

Excerpts from Gaute Hope's message of 2011-02-08 03:07:31 -0500:
> Excerpts from Gaute Hope's message of 2011-02-08 09:01:44 +0100:
> > Excerpts from Rich Lane's message of 2011-01-28 05:26:38 +0100:
> > Could it be that this broke continue buffer search key 'n' ?
> > 
> > lib/sup/buffer.rb:171
> > 
> > This doesn't work for me anymore, could anyone confirm that?
> 
> Ah - I just noticed that I have to move down one line before I can hit
> 'n' to search for the next occurrence. I don't think this was the
> original, or desired, behaviour?

I did a git bisect and had to stop at the last index format change in
May 2010. It looks like 'n' has been broken for a long time.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-02-13 17:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-28  4:26 [sup-devel] new branch: keybindings Rich Lane
2011-02-08  8:01 ` Gaute Hope
2011-02-08  8:07   ` Gaute Hope
2011-02-13 18:05     ` Rich Lane

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox