From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Arne =?utf-8?Q?J=C3=B8rgensen?= Newsgroups: gmane.emacs.devel Subject: Re: auto-coding-function for LaTeX Date: Thu, 11 Nov 2004 23:50:09 +0100 Organization: emfle birnan Message-ID: <87654ct2zi.fsf@seamus.arnested.dk> References: <87u0ryah75.fsf@seamus.arnested.dk> <87654coxm9.fsf@jurta.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1100213465 24053 80.91.229.6 (11 Nov 2004 22:51:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 11 Nov 2004 22:51:05 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 11 23:50:57 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CSNmL-0005YE-00 for ; Thu, 11 Nov 2004 23:50:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CSNur-0008Su-P2 for ged-emacs-devel@m.gmane.org; Thu, 11 Nov 2004 17:59:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CSNui-0008SU-R2 for emacs-devel@gnu.org; Thu, 11 Nov 2004 17:59:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CSNuh-0008Ru-Qy for emacs-devel@gnu.org; Thu, 11 Nov 2004 17:59:36 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CSNuh-0008Rr-JU for emacs-devel@gnu.org; Thu, 11 Nov 2004 17:59:35 -0500 Original-Received: from [80.91.229.2] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CSNlh-0000bp-2m for emacs-devel@gnu.org; Thu, 11 Nov 2004 17:50:18 -0500 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CSNlg-0004Ws-00 for ; Thu, 11 Nov 2004 23:50:16 +0100 Original-Received: from 213.237.94.152 ([213.237.94.152]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Nov 2004 23:50:15 +0100 Original-Received: from arne by 213.237.94.152 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Nov 2004 23:50:15 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 51 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 213.237.94.152 X-Face: 5t,7/Y$&<1A_t.$vC2{pWZ{m@3_06; kcm]no{hgEL/}Uz(>XV6cl4}xO\v?-h3%>znNaZtq `~rf,GY1T%r=a.zH`hOb(-]'x)nI088Z&|e;V^h;/TShou User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:8rb7IcQ8yk9mJ4TqhTEyZ6ViaYE= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:29765 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:29765 Juri Linkov writes: > Arne Jørgensen writes: >> If included it should probably be added to mule.el. I'm don't know >> whether the latex-auto-coding-function should be added to >> auto-coding-functions by default (sooner or later there will be a lot >> of functions in there). I know it should be in my >> auto-coding-functions though :-) > > I think there should be a new variable for "mode to auto-coding-function" > mapping to be able to define > > (latex-mode . latex-auto-coding-function). > > And the fact that currently `auto-coding-functions' contains by default > `(sgml-xml-auto-coding-function sgml-html-meta-auto-coding-function)' > doesn't seem right. They are called for every buffer, not just HTML > and XML. Yes. That was why I thouhgt it might not be a good idea to just add it to `auto-coding-functions'. It looks like a general problem to have too many functions inspecting _every_ file you open. > Thanks to the new variable `magic-mode-alist' now it is possible > to set SGML and HTML major modes depending on buffer contents. > So these functions could be added to "mode to auto-coding-function" > mapping to make them mode-dependent: > > (xml-mode . sgml-xml-auto-coding-function) > (html-mode . sgml-html-meta-auto-coding-function) > > instead of adding them to the default of `auto-coding-functions'. [ remember I'm no expert so there is a good chance the following is wrong ] As I understand it it is too late to change the coding system in a proper way after the file is loaded into a buffer. I looked a bit at various functions and `revert-buffer-with-coding-system' is close to being useful, but I still asks me if I'm sure I want to revert the buffer. [ well ... this _is_ how I understand it ... but there _should_ be a way to change the coding system afterwards ] Kind regards, -- Arne Jørgensen Gammel Kongevej 7, 1. th., DK-1610 Copenhagen V, Denmark mobile: +45 21 65 01 13 email: arne@arnested.dk,