* bug#7169: cannot specify coding via dir-locals
@ 2010-10-06 19:39 Glenn Morris
2010-10-06 20:49 ` Eli Zaretskii
0 siblings, 1 reply; 8+ messages in thread
From: Glenn Morris @ 2010-10-06 19:39 UTC (permalink / raw)
To: 7169
Package: emacs
I added:
(coding . utf-8)
to the change-log-mode section in the Emacs .dir-locals.el file, then did
./src/emacs -Q lisp/ChangeLog.1
The file was opened in undecided-unix. I was hoping to be able to
remove the "coding: utf-8" that many of the Emacs ChangeLog files
(but not that particular example) have.
It seems `find-auto-coding' handles the coding: cookie independently
of the local-variables mechanism. It would be nice if it would check
for a directory-local coding if no file-local setting is found.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#7169: cannot specify coding via dir-locals
2010-10-06 19:39 bug#7169: cannot specify coding via dir-locals Glenn Morris
@ 2010-10-06 20:49 ` Eli Zaretskii
2010-10-06 21:00 ` Glenn Morris
2010-10-07 8:04 ` Stefan Monnier
0 siblings, 2 replies; 8+ messages in thread
From: Eli Zaretskii @ 2010-10-06 20:49 UTC (permalink / raw)
To: Glenn Morris; +Cc: 7169
> From: Glenn Morris <rgm@gnu.org>
> Date: Wed, 06 Oct 2010 15:39:29 -0400
> Cc:
>
> Package: emacs
>
> I added:
>
> (coding . utf-8)
>
> to the change-log-mode section in the Emacs .dir-locals.el file, then did
>
> ./src/emacs -Q lisp/ChangeLog.1
>
> The file was opened in undecided-unix. I was hoping to be able to
> remove the "coding: utf-8" that many of the Emacs ChangeLog files
> (but not that particular example) have.
Independently of the potential bug, why is it a good idea to have such
a setting in the Emacs tree? There are some files for which this will
do the wrong thing.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#7169: cannot specify coding via dir-locals
2010-10-06 20:49 ` Eli Zaretskii
@ 2010-10-06 21:00 ` Glenn Morris
2010-10-07 3:53 ` Eli Zaretskii
2010-10-07 8:04 ` Stefan Monnier
1 sibling, 1 reply; 8+ messages in thread
From: Glenn Morris @ 2010-10-06 21:00 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 7169
Eli Zaretskii wrote:
> Independently of the potential bug, why is it a good idea to have such
> a setting in the Emacs tree? There are some files for which this will
> do the wrong thing.
It will?
There are 59 ChangeLog* files in the Emacs tree.
50 have a coding: cookie.
All but one of those (an old Gnus ChangeLog) use utf-8.
I assume people just forget to add it to the other 9.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#7169: cannot specify coding via dir-locals
2010-10-06 21:00 ` Glenn Morris
@ 2010-10-07 3:53 ` Eli Zaretskii
2010-10-07 4:18 ` Glenn Morris
0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2010-10-07 3:53 UTC (permalink / raw)
To: Glenn Morris; +Cc: 7169
> Cc: 7169@debbugs.gnu.org
> From: Glenn Morris <rgm@gnu.org>
> Date: Wed, 06 Oct 2010 17:00:02 -0400
>
> Eli Zaretskii wrote:
>
> > Independently of the potential bug, why is it a good idea to have such
> > a setting in the Emacs tree? There are some files for which this will
> > do the wrong thing.
>
> It will?
> There are 59 ChangeLog* files in the Emacs tree.
> 50 have a coding: cookie.
> All but one of those (an old Gnus ChangeLog) use utf-8.
I wasn't talking about ChangeLog files. Unless I misunderstand, your
addition will be in effect with any file in the tree.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#7169: cannot specify coding via dir-locals
2010-10-07 3:53 ` Eli Zaretskii
@ 2010-10-07 4:18 ` Glenn Morris
2010-10-07 4:20 ` Glenn Morris
2010-10-07 13:44 ` Eli Zaretskii
0 siblings, 2 replies; 8+ messages in thread
From: Glenn Morris @ 2010-10-07 4:18 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 7169
Eli Zaretskii wrote:
> I wasn't talking about ChangeLog files. Unless I misunderstand, your
> addition will be in effect with any file in the tree.
I wrote:
> I added:
>
> (coding . utf-8)
>
> to the change-log-mode section in the Emacs .dir-locals.el file
^^^^^^^^^^^^^^^^^^^^^^^
So like the settings for bug-reference-url-format etc, it would only
apply to ChangeLog files.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#7169: cannot specify coding via dir-locals
2010-10-07 4:18 ` Glenn Morris
@ 2010-10-07 4:20 ` Glenn Morris
2010-10-07 13:44 ` Eli Zaretskii
1 sibling, 0 replies; 8+ messages in thread
From: Glenn Morris @ 2010-10-07 4:20 UTC (permalink / raw)
To: Eli Zaretskii, 7169
Maybe it is impossible to do, because find-auto-coding doesn't yet
know the mode when it runs. I don't know, that's why this is a bug
report.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#7169: cannot specify coding via dir-locals
2010-10-06 20:49 ` Eli Zaretskii
2010-10-06 21:00 ` Glenn Morris
@ 2010-10-07 8:04 ` Stefan Monnier
1 sibling, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2010-10-07 8:04 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 7169
>> I added:
>> (coding . utf-8)
>> to the change-log-mode section in the Emacs .dir-locals.el file, then did
>>
>> ./src/emacs -Q lisp/ChangeLog.1
>>
>> The file was opened in undecided-unix. I was hoping to be able to
>> remove the "coding: utf-8" that many of the Emacs ChangeLog files
>> (but not that particular example) have.
> Independently of the potential bug, why is it a good idea to have such
> a setting in the Emacs tree? There are some files for which this will
> do the wrong thing.
FWIW, I think such a setting should be provided for all Emacs files
rather than just for change-log-mode ones. This would mean "in the
absence of a coding tag in the file, use utf-8", which seems like it
can only be better than the current "in the absence of a coding tag in
the file, use whatever the user happens to prefer".
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#7169: cannot specify coding via dir-locals
2010-10-07 4:18 ` Glenn Morris
2010-10-07 4:20 ` Glenn Morris
@ 2010-10-07 13:44 ` Eli Zaretskii
1 sibling, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2010-10-07 13:44 UTC (permalink / raw)
To: Glenn Morris; +Cc: 7169
> Cc: 7169@debbugs.gnu.org
> From: Glenn Morris <rgm@gnu.org>
> Date: Thu, 07 Oct 2010 00:18:22 -0400
>
> > I added:
> >
> > (coding . utf-8)
> >
> > to the change-log-mode section in the Emacs .dir-locals.el file
> ^^^^^^^^^^^^^^^^^^^^^^^
Sorry.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-10-07 13:44 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-06 19:39 bug#7169: cannot specify coding via dir-locals Glenn Morris
2010-10-06 20:49 ` Eli Zaretskii
2010-10-06 21:00 ` Glenn Morris
2010-10-07 3:53 ` Eli Zaretskii
2010-10-07 4:18 ` Glenn Morris
2010-10-07 4:20 ` Glenn Morris
2010-10-07 13:44 ` Eli Zaretskii
2010-10-07 8:04 ` Stefan Monnier
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.