From: Juri Linkov <juri@jurta.org>
Cc: emacs-devel@gnu.org
Subject: Re: auto-coding-function for LaTeX
Date: Sat, 13 Nov 2004 16:14:51 +0200 [thread overview]
Message-ID: <8765496dk4.fsf@jurta.org> (raw)
In-Reply-To: <87y8h8rlbs.fsf@seamus.arnested.dk> (Arne Jørgensen's message of "Fri, 12 Nov 2004 00:56:55 +0100")
Arne Jørgensen <arne@arnested.dk> writes:
> I look a bit more in to it. And it actually seems more reasonable to
> put the function (slightly changed) into `file-coding-system-alist'.
> [...]
> (add-to-list 'file-coding-system-alist '("\\.tex\\|\\.ltx\\'" . latex-find-file-coding-system))
I think this is not the most right thing to do since there may
be LaTeX file extensions other than .tex and .ltx. The standard value
of `auto-mode-alist' has also .sty, .cl[so], .bbl as file extensions
corresponding to latex-mode. And users can add own mappings to
`auto-mode-alist' or use `-*- mode:latex -*-' headers.
In that case `file-coding-system-alist' wouldn't work.
> The function is being called with an argument (arg) but I don't know
> what I'm supposed to do with the argument so I ignore it at the
> moment.
`arg' is a list (operation, file-name, ...).
For an example of using it, you could look at the file
textmodes/po.el which is completely devoted to setting correct
encoding for PO files according to the "Charset=..." header.
Perhaps this file should be generalized to support more file types
like you want to do for LaTeX files with `inputenc' cookie.
--
Juri Linkov
http://www.jurta.org/emacs/
next prev parent reply other threads:[~2004-11-13 14:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-09 20:41 auto-coding-function for LaTeX Arne Jørgensen
2004-11-11 12:59 ` Bug in widget-complete (was: auto-coding-function for LaTeX) Arne Jørgensen
2004-11-11 21:59 ` auto-coding-function for LaTeX Juri Linkov
2004-11-11 22:50 ` Arne Jørgensen
2004-11-11 23:56 ` Arne Jørgensen
2004-11-12 1:12 ` Reiner Steib
2004-11-12 6:44 ` Arne Jørgensen
2004-11-12 20:51 ` Reiner Steib
2004-11-12 21:07 ` Reiner Steib
2004-11-13 14:14 ` Juri Linkov [this message]
2004-11-13 14:47 ` David Kastrup
2004-11-13 16:38 ` Richard Stallman
2004-12-07 0:53 ` Arne Jørgensen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8765496dk4.fsf@jurta.org \
--to=juri@jurta.org \
--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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).