all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
Cc: bug-gnu-emacs@gnu.org
Subject: Re: the -*-coding: -*- stuff doesn't check for invalid codings
Date: Thu, 14 Jul 2005 22:00:38 +0200	[thread overview]
Message-ID: <f7ccd24b05071413006407ea77@mail.gmail.com> (raw)
In-Reply-To: <db6d1r$v8s$1@sea.gmane.org>

On 7/14/05, Kevin Rodgers <ihs_4664@yahoo.com> wrote:

> I think it would be better to signal an error there than to fall back on
> the default coding system, since the author of the file clearly intends
> that a specific coding system be used.

>From the Python docs:

"If a comment in the first or second line of the Python script matches
the regular expression coding[=:]\s*([-\w.]+), this comment is
processed as an encoding declaration; the first group of this
expression names the encoding of the source code file. The recommended
forms of this expression are

  # -*- coding: <encoding-name> -*-

which is recognized also by GNU Emacs, and 

  # vim:fileencoding=<encoding-name>

which is recognized by Bram Moolenaar's VIM."

The Python encodings are largely those of Emacs, but with some
differences. For example, coding: latin_1 is valid for Python,
unrecognized by Emacs.

Not sure whether this is an argument for throwing an error, or adding
more aliases to Emacs encodings, though.

-- 
                    /L/e/k/t/u

      reply	other threads:[~2005-07-14 20:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-09  2:18 the -*-coding: -*- stuff doesn't check for invalid codings Dan Jacobson
2005-07-11 17:16 ` Kevin Rodgers
2005-07-14 19:05   ` Kevin Rodgers
2005-07-14 20:00     ` Juanma Barranquero [this message]

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=f7ccd24b05071413006407ea77@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=bug-gnu-emacs@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.