all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bozhidar Batsov <bozhidar@batsov.com>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Subject: [PATCH] * lisp/progmodes/ruby-mode.el: Set `ruby-insert-encoding-magic-comment' to nil by default.
Date: Sun, 3 Nov 2013 09:35:01 +0200	[thread overview]
Message-ID: <CAM9Zgm2tibHZk4aSN3PL3cp8sb7v8TqHcScfp9ytrzfQ9E7Q7A@mail.gmail.com> (raw)
In-Reply-To: <52755D62.1070700@yandex.ru>

[-- Attachment #1: Type: text/plain, Size: 1859 bytes --]

On 2 November 2013 22:15, Dmitry Gutov <dgutov@yandex.ru> wrote:

> On 02.11.2013 14:38, Bozhidar Batsov wrote:
>
>>     Also see
>>     http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00236.html
>>
>>
>> Disabling this by default is not directly related to improving it. While
>> I think your suggestions for running this in an after-save-hook are
>> sound, I feel that the majority of Ruby programmers out there no longer
>> need this, so it doesn't make sense to have it on by default just to
>> make people search how to disable it (unless it stops messing with files
>> that are already using utf-8, which as you note is problematic for users
>> of Ruby 1.9).
>>
>
> I don't understand what you mean with the sentence in parentheses.
>

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.


>
> Ruby 1.9 still requires "coding: utf-8" cookies in unicode files that have
> non-ascii characters. There was a problem with inserting it ("coding:
> unknown" was often inserted instead), but that has been fixed.


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. If we add the option
to include the magic comment unconditionally that might increase the
usefulness of the setting for some people.


>
>
>  P.S. I also think we should insert the comment in Ruby style (e.g. "#
>> encoding: utf-8") instead of the current Emacs style encoding comment
>> (or make this customizable).
>>
>
> Maybe. I'm not sure what would be the benefit, but it sounds fine to me.
>

[-- Attachment #2: Type: text/html, Size: 2943 bytes --]

  reply	other threads:[~2013-11-03  7:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-01 12:59 Subject: [PATCH] * lisp/progmodes/ruby-mode.el: Set `ruby-insert-encoding-magic-comment' to nil by default Bozhidar Batsov
2013-11-01 17:46 ` Stefan Monnier
2013-11-01 18:51   ` Bozhidar Batsov
2013-11-02  0:00 ` Dmitry Gutov
2013-11-02 10:38   ` Bozhidar Batsov
2013-11-02 20:15     ` Dmitry Gutov
2013-11-03  7:35       ` Bozhidar Batsov [this message]
2013-11-03  9:22         ` Dmitry Gutov
2013-11-04 13:40           ` Bozhidar Batsov
2013-11-06 17:10             ` Bozhidar Batsov
2013-11-06 21:45               ` Dmitry Gutov
2013-11-07 10:23                 ` Bozhidar Batsov
2013-11-07 11:06                   ` Dmitry Gutov
2013-11-13 14:36                     ` Bozhidar Batsov
2013-11-13 19:19                       ` Dmitry Gutov
2013-11-14  9:53                         ` Bozhidar Batsov
2013-11-14 13:23                           ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAM9Zgm2tibHZk4aSN3PL3cp8sb7v8TqHcScfp9ytrzfQ9E7Q7A@mail.gmail.com \
    --to=bozhidar@batsov.com \
    --cc=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.