OK. I'll implement the discussed customizations. On 3 November 2013 11:22, Dmitry Gutov wrote: > 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'. >