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: Thu, 7 Nov 2013 12:23:22 +0200 [thread overview]
Message-ID: <CAM9Zgm3n_Qpkrf1=k99B2vC2z9VEG=NAMyzOSzhKrYWWbU-9aA@mail.gmail.com> (raw)
In-Reply-To: <527AB880.4040207@yandex.ru>
[-- Attachment #1: Type: text/plain, Size: 1769 bytes --]
On 6 November 2013 23:45, Dmitry Gutov <dgutov@yandex.ru> wrote:
> On 06.11.2013 19:10, Bozhidar Batsov wrote:
>
>> Here's a patch for making the comment format customizable. How does it
>> look to you?
>>
>
> There might be a problem with weird template formats a user would be
> technically allowed to choose: if the template doesn't match either of the
> regexps used in `ruby-mode-set-encoding', the coding comment will be added
> at the first line of the buffer, even if it already contains (the
> non-standard) one. Not sure if that's a real problem, but maybe we should
> relax the regexps and/or reject all non-matching templates.
>
Yeah, I though of this, but decided we can assume that few people would run
into this and they'll probably understand their mistake pretty soon.
>
> Other than that, looks fine to me. Possible improvements, if you like:
>
> 1. Move "#" also inside the template. It'll make the code a bit simpler
> and get rid of the implicit requirement that the template starts with a
> space.
>
Actually the template should not necessary start with a space, that why I
did not put the `#` in it. A comment like #coding:utf-8 is perfectly valid
(albeit it looks kind of ugly). But yeah, might be easier for people of the
`#` was in the template itself.
>
> 2. Add predefined values to the customize widget? (:type (choice ...))
> Allow the user to choose between Emacs-style and Ruby-style.
>
Makes sense.
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.
[-- Attachment #2: Type: text/html, Size: 2601 bytes --]
next prev parent reply other threads:[~2013-11-07 10:23 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
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 [this message]
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='CAM9Zgm3n_Qpkrf1=k99B2vC2z9VEG=NAMyzOSzhKrYWWbU-9aA@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.