From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (pc143-141.eduroam.uib.no [129.177.141.143]) by mx.google.com with ESMTPS id v1sm2542686bkt.5.2011.02.08.00.00.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 08 Feb 2011 00:00:36 -0800 (PST) Content-Type: text/plain; charset=UTF-8 From: Gaute Hope To: sup-devel Subject: Re: [sup-devel] new branch: keybindings In-reply-to: <1296187729-sup-7405@zyrg.net> References: <1296187729-sup-7405@zyrg.net> Date: Tue, 08 Feb 2011 09:01:44 +0100 Message-Id: <1297152028-sup-5512@qwerzila> User-Agent: Sup/git Content-Transfer-Encoding: 8bit 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