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: Sun, 03 Nov 2013 13:22:34 +0400 Message-ID: <87wqkpalgl.fsf@yandex.ru> References: <61BBE6C8D4D349B6963A0F429237A3A8@gmail.com> <87txfvad0a.fsf@yandex.ru> <52755D62.1070700@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1383470569 10346 80.91.229.3 (3 Nov 2013 09:22:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 Nov 2013 09:22:49 +0000 (UTC) Cc: emacs-devel To: Bozhidar Batsov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 03 10:22:54 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 1VcttV-0004uT-Rx for ged-emacs-devel@m.gmane.org; Sun, 03 Nov 2013 10:22:53 +0100 Original-Received: from localhost ([::1]:44526 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VcttV-0008Ak-CR for ged-emacs-devel@m.gmane.org; Sun, 03 Nov 2013 04:22:53 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52758) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VcttN-0008Ad-Ui for emacs-devel@gnu.org; Sun, 03 Nov 2013 04:22:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VcttI-0002Ps-Pa for emacs-devel@gnu.org; Sun, 03 Nov 2013 04:22:45 -0500 Original-Received: from mail-lb0-x231.google.com ([2a00:1450:4010:c04::231]:54120) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VcttI-0002Pf-IF for emacs-devel@gnu.org; Sun, 03 Nov 2013 04:22:40 -0500 Original-Received: by mail-lb0-f177.google.com with SMTP id u14so4566642lbd.22 for ; Sun, 03 Nov 2013 01:22:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=HE4b6TqayX7xdS/fnOFzdGivcTFNi17BeqNXiex5P9c=; b=FVj/AGEXzvh0MXYOt9lUXSKJNrcs4+A7fp8LC4C8lhRZ3q/jmVDhGZl/RYrU34VKFA fGSm5k7cPuV8bdLVmrBzg1G/3q9Y835FwW112eh8URx4ORVIrFYTCy40QJbvItZY9o7p 1AdaMGvDZFhqcY5q4yIwXZ+yApw4t0skVKHY4w5zH2g0MIGdhGuyH2CnhihbOqvZfwFL BZh/NWEbd/FbYpeZM2WGzCFpzRajHz3cYziYdi2QxzlGSJA4prO6R1mY1JitAEreJSbX V+5JLSBIANNMZhPUd8abGh6IA7I8lUosgJiDisya6yQSz5lgH489Yv9EfNj6lw7SKXmZ ozDA== X-Received: by 10.152.120.73 with SMTP id la9mr7498951lab.3.1383470559123; Sun, 03 Nov 2013 01:22:39 -0800 (PST) Original-Received: from axl ([178.252.98.87]) by mx.google.com with ESMTPSA id vo1sm12498352lbb.1.2013.11.03.01.22.37 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 03 Nov 2013 01:22:38 -0800 (PST) In-Reply-To: (Bozhidar Batsov's message of "Sun, 3 Nov 2013 09:35:01 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::231 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:164893 Archived-At: Bozhidar Batsov writes: > Sorry about the lack of clarity - I meant that if you have a Ruby 2.0 only project you likely don't > want the insertion of utf-8 coding comments. > > ... > > Yeah, I'm aware of that. In my open source projects I still keep 1.9 compatibility and generally > include those cookies in every file. Since I want them included unconditionally (AFAIK many other > Ruby programmers do this as well for the sake of consistency) the magic-comment functionality in > ruby-mode is quite useless to me even for Ruby 1.9. Now I get it, thanks for the explanation. > If we add the option to include the magic > comment unconditionally that might increase the usefulness of the > setting for some people. Sure, as long as it's not on by default. For example, add a new possible value of `ruby-insert-encoding-magic-comment': `always'. Or `always-utf8'. In this case, `ruby-mode-set-encoding' might short-circuit the whole encoding detection logic and just always write `coding: utf-8'.