On 10 August 2013 14:45, Dmitry Gutov wrote: > On 09.08.2013 17:52, Stefan Monnier wrote: > >> That's lucky for those poor minor modes: it's always really difficult to >> find good bindings for minor modes because there are very few bindings >> reserved for them, and they have the added problem of having to cohabit >> with other minor modes. >> > > I don't think it's that big of a problem. Minor minor modes either do, or > should allow the user to customize the prefix. So they can change it in > case of a conflict. And anyway, if a minor mode picks `C-c #' as its > prefix, it's the major mode that is screwed, because minor mode bindings > trump major mode ones. > > > Usually major modes prefer to use bindings which start with C-c >> C-. There are usually many such keys available and they're >> pretty easy to type since you can just keep the control key pressed. >> > > Ok, here's a possible set of bindings: > > (define-key map (kbd "C-c C-'") 'ruby-tools-to-single-quote-**string) (define-key map (kbd "C-c C-\"") 'ruby-tools-to-double-quote-**string) > (define-key map (kbd "C-c C-:") 'ruby-tools-to-symbol) > (define-key map (kbd "C-c C-;") 'ruby-tools-clear-string) > (define-key map (kbd "C-c C-#") 'ruby-tools-interpolate) > > The last one is the most problematic: it's supposed to reduce the amount > of keystrokes the user types, but typing `# { } C-b' is not that longer, > and with `autopair-mode' enabled (or `electric-pair-mode', I suppose'), we > only have to type `# {' anyway. > Maybe we should just drop it. > The interpolate functionality seems redundant to me, so I'd suggest dropping it. > > Here's another issue: ruby-tools comes with a suite of tests written using > ecukes, which is not included with Emacs, and would be incompatible with > the current test directory layout anyway. > > Should they be rewritten using ERT? Or do we drop them and risk divergence > from upstream and code breakage? > Having ERT tests is never a bad idea. That said I don't think there will be a risk of upstream divergence, since I'm pretty sure after ruby-tools is merged into ruby-mode the existing project will be decommissioned. > > N.B.: Out of two similar repositories, one with tests and one without, > it's natural for me to consider the former one as upstream. > But if our case there won't be to similar repos, as noted above - most likely the current project will cease to exist.