From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Small improvements to ruby-mode Date: Sat, 10 Aug 2013 14:45:28 +0300 Message-ID: <520627D8.8090206@yandex.ru> References: <2A6700DEDCA640EF92B326002717596D@gmail.com> <51DB6516.1090708@yandex.ru> <51DC43CE.3090206@yandex.ru> <51DDA366.9020700@yandex.ru> <51E06787.8020401@yandex.ru> <51E1A62A.1030204@yandex.ru> <51E55CFB.7060303@yandex.ru> <52040BD8.20902@yandex.ru> <52042FC9.6000505@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1376135154 23372 80.91.229.3 (10 Aug 2013 11:45:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 10 Aug 2013 11:45:54 +0000 (UTC) Cc: Bozhidar Batsov , emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 10 13:45:56 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V87cJ-0007bM-R6 for ged-emacs-devel@m.gmane.org; Sat, 10 Aug 2013 13:45:56 +0200 Original-Received: from localhost ([::1]:40193 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V87cJ-0002uE-0m for ged-emacs-devel@m.gmane.org; Sat, 10 Aug 2013 07:45:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41912) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V87c7-0002ho-Hu for emacs-devel@gnu.org; Sat, 10 Aug 2013 07:45:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V87c0-00014u-Hg for emacs-devel@gnu.org; Sat, 10 Aug 2013 07:45:43 -0400 Original-Received: from forward5h.mail.yandex.net ([84.201.186.23]:33746) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V87bz-00014U-TN for emacs-devel@gnu.org; Sat, 10 Aug 2013 07:45:36 -0400 Original-Received: from smtp1h.mail.yandex.net (smtp1h.mail.yandex.net [84.201.187.144]) by forward5h.mail.yandex.net (Yandex) with ESMTP id 402F0D00A74; Sat, 10 Aug 2013 15:45:32 +0400 (MSK) Original-Received: from smtp1h.mail.yandex.net (localhost [127.0.0.1]) by smtp1h.mail.yandex.net (Yandex) with ESMTP id B4DE91340364; Sat, 10 Aug 2013 15:45:31 +0400 (MSK) Original-Received: from 62-107-247.netrun.cytanet.com.cy (62-107-247.netrun.cytanet.com.cy [62.228.107.247]) by smtp1h.mail.yandex.net (nwsmtp/Yandex) with ESMTP id vQADXWyvQl-jUnq6XxJ; Sat, 10 Aug 2013 15:45:30 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1376135131; bh=/6GwNDlibBZ4vBiAFACPhbr/Y7OG5PjvZ4ILlZq/CUU=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=tXWvp65l10zVosPR0gZ3GeJLtekJleBo4KzWiG/xWUJ1700HyyysZ40gTJkiB28vM I5YNxOEStnA84yS3+ol/PD2hdWbCC2iJfejOadtXN4shj4tOxYVSbZn26Q2/FfhjVw HCNi7Sz2DcBN01pFh0XIkyz8BPUOfw+Hyn5ccXMk= Authentication-Results: smtp1h.mail.yandex.net; dkim=pass header.i=@yandex.ru User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 84.201.186.23 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:162548 Archived-At: 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. 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? 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.