all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bozhidar Batsov <bozhidar@batsov.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
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: Fri, 1 Nov 2013 20:51:07 +0200	[thread overview]
Message-ID: <CAM9Zgm3dUiFGnwn+TUPLD8cSsXGABHGc5U1om6Nj5pk12iNmxw@mail.gmail.com> (raw)
In-Reply-To: <jwvvc0cqatr.fsf-monnier+emacs@gnu.org>

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

I cannot imagine why would anyone want to use any encoding other than utf-8
for their code. As for Ruby 1.9 - I think it makes sense to simply set the
magic comment to utf-8 if a file contains non-ascii characters. Keep in
mind that I'm not suggesting to remove the functionality, but simply to
disable it by default, since it's not something that most Ruby hackers
today would want to use.


On 1 November 2013 19:46, Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> > Since Ruby 1.8 reached end of life in the summer and most projects these
> > days use Ruby 2.0 (which assumes source files use utf8 by default) having
> > ruby-insert-encoding-magic-comment’ doesn’t make much sense.  Most people
> > just disable it anyways, so why not have it disabled by default?
>
> IIUC, Ruby-2.0 doesn't require source code to be utf-8, so the
> magic-comment is not obsolete.  IOW, what needs to be done is to make
> Emacs prefer utf-8 for ruby files (it's probably the case already), and
> to make ruby-mode-set-encoding only insert the magic comment if it is
> different from utf-8.
>
>
>         Stefan "not a Ruby user"
>
>
> PS: The `ruby' package in Debian stable is still at 1.9.1.
>

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

  reply	other threads:[~2013-11-01 18:51 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 [this message]
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
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=CAM9Zgm3dUiFGnwn+TUPLD8cSsXGABHGc5U1om6Nj5pk12iNmxw@mail.gmail.com \
    --to=bozhidar@batsov.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.