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: Subject: [PATCH] * lisp/progmodes/ruby-mode.el: Set `ruby-insert-encoding-magic-comment' to nil by default. Date: Wed, 13 Nov 2013 21:19:45 +0200 Message-ID: <5283D0D1.1050405@yandex.ru> References: <61BBE6C8D4D349B6963A0F429237A3A8@gmail.com> <87txfvad0a.fsf@yandex.ru> <52755D62.1070700@yandex.ru> <87wqkpalgl.fsf@yandex.ru> <527AB880.4040207@yandex.ru> <527B7433.1070101@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1384370402 9294 80.91.229.3 (13 Nov 2013 19:20:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Nov 2013 19:20:02 +0000 (UTC) Cc: emacs-devel To: Bozhidar Batsov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 13 20:20:07 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 1Vgfyw-0001lp-T7 for ged-emacs-devel@m.gmane.org; Wed, 13 Nov 2013 20:20:07 +0100 Original-Received: from localhost ([::1]:50401 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vgfyw-00078h-DB for ged-emacs-devel@m.gmane.org; Wed, 13 Nov 2013 14:20:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vgfym-00075n-Q2 for emacs-devel@gnu.org; Wed, 13 Nov 2013 14:20:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vgfyg-0005NW-Uo for emacs-devel@gnu.org; Wed, 13 Nov 2013 14:19:56 -0500 Original-Received: from mail-ee0-x236.google.com ([2a00:1450:4013:c00::236]:50422) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vgfyg-0005NP-NB for emacs-devel@gnu.org; Wed, 13 Nov 2013 14:19:50 -0500 Original-Received: by mail-ee0-f54.google.com with SMTP id e51so189203eek.27 for ; Wed, 13 Nov 2013 11:19:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=x61qdAdNcOv2UVrh3bEDYcrl7jQHk1rIps8EoMhi/Sw=; b=U+AbrulGpGkA8DDG+Kj+B/teAkvdGVVxLkIN+kUttgcQtJnZ5ZRuPxgoQmFy6cIl9H fmfhdBDLKO9oR/y2TvMf8LnIIX0/ONVywJAyEtZpiREJa1lAKvhRImV77fqorGYCMA3w YKS4CKuHPEinbXF3zBY7yqJYzblmJQMqL1X7xWyim4OwonS5nYZ2I8t9JWC7m0uPdexX caQXGOWUjPaY+/LRnBmkXuQCenbxGVH1OoqxpnOBjL1vbl3AmW4KqdP8JoHPeEz1nSi3 6ZmWu7Me5Lau/TyWzNShBXjTojWv+JgnZDajaChV6s+6j6mhZRPux3PTas7kDd4q9Llz /lWQ== X-Received: by 10.15.102.65 with SMTP id bq41mr3928295eeb.79.1384370389375; Wed, 13 Nov 2013 11:19:49 -0800 (PST) Original-Received: from [192.168.10.48] (93-245-142.netrun.cytanet.com.cy. [93.109.245.142]) by mx.google.com with ESMTPSA id z2sm91043513eee.7.2013.11.13.11.19.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 13 Nov 2013 11:19:48 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c00::236 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:165238 Archived-At: On 13.11.2013 16:36, Bozhidar Batsov wrote: > I've attached here a second patch that adds support for always inserting > a utf-8 encoding comment. I've also simplified a bit the code of > `ruby-mode-set-encoding' (by breaking it into several functions) as it > was quite convoluted. Looks good to me, with a couple of notes. 1. ruby-insert-encoding-magic-comment docstring width exceeds the default value of emacs-lisp-docstring-fill-column. Maybe you'd like to refill it. 2. I'd swap the `or' clauses in ruby--encoding-comment-required-p. The second one, though rare, should be much faster. That aside, have you managed to run the test suite? > On 7 November 2013 13:06, Dmitry Gutov > wrote: > > On 07.11.2013 12:23, Bozhidar Batsov wrote: > > Btw, Dimitry - please add some info the ruby-mode.el about > running the > tests. I tried evaluating and running them manually, but this > crashed my > Emacs (the tests hogged my CPU completely and I had to kill Emacs). > Maybe there is something wrong with them right now, or perhaps they > should invoked in some manner I'm not aware of. > > > I'm not aware of any problems running the tests, looks like a bug. > Weren't you able to stop the freezing with C-g, at least? > > I just open ruby-mode-tests.el, M-x eval-buffer, M-x ert RET. > They run fine. > >