From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.devel Subject: Re: auto-coding-function for LaTeX Date: Fri, 12 Nov 2004 21:51:09 +0100 Message-ID: References: <87u0ryah75.fsf@seamus.arnested.dk> <87654coxm9.fsf@jurta.org> <87654ct2zi.fsf@seamus.arnested.dk> <87y8h8rlbs.fsf@seamus.arnested.dk> <87lld7sh07.fsf@seamus.arnested.dk> Reply-To: Reiner Steib NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1100292703 22998 80.91.229.6 (12 Nov 2004 20:51:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 12 Nov 2004 20:51:43 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 12 21:51:27 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 1CSiOF-0003wb-00 for ; Fri, 12 Nov 2004 21:51:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CSiWo-0004U4-I0 for ged-emacs-devel@m.gmane.org; Fri, 12 Nov 2004 16:00:18 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CSiWi-0004Tu-1y for emacs-devel@gnu.org; Fri, 12 Nov 2004 16:00:12 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CSiWh-0004Ta-AO for emacs-devel@gnu.org; Fri, 12 Nov 2004 16:00:11 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CSiWh-0004TQ-4X for emacs-devel@gnu.org; Fri, 12 Nov 2004 16:00:11 -0500 Original-Received: from [134.60.1.1] (helo=mail-new.rz.uni-ulm.de) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CSiO4-0005cF-DP for emacs-devel@gnu.org; Fri, 12 Nov 2004 15:51:16 -0500 Original-Received: from lumberjack.physik.uni-ulm.de (lumberjack.physik.uni-ulm.de [134.60.10.173]) by mail.uni-ulm.de (8.13.1/8.13.1) with ESMTP id iACKp9Wh000120; Fri, 12 Nov 2004 21:51:09 +0100 (MET) Original-Received: by lumberjack.physik.uni-ulm.de (Postfix, from userid 170) id 4E1DB18180; Fri, 12 Nov 2004 21:51:09 +0100 (CET) Mail-Followup-To: =?iso-8859-1?q?Arne_J=F8rgensen?= , emacs-devel@gnu.org Original-To: =?iso-8859-1?q?Arne_J=F8rgensen?= X-Face: :6KQZ[nyoS_edmB.%gw-=)BYth^|2+Y+^cu%I$FSx!&>-'om>3H7A|M&n(V7fIo3P.; yo.b yq4$p; ZaBtkv)\}biaiBQe"mD}iib1AA@99-fZ7i*bLhNRVC&0Wkxg9)SH?oWc@{ User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) X-DCC-sonic.net-Metrics: gemini 1156; Body=2 Fuz1=2 Fuz2=2 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:29782 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:29782 On Fri, Nov 12 2004, Arne J=C3=B8rgensen wrote: > None of the coding systems you added are present in my Emacs. So why > add them? To make it easier for a user to customized when/if they are > added? Or are they present in your Emacs? All mentioned cp* codings are available, but not by default, see `M-x codepage-setup RET TAB TAB'. I don't know if there is some mechanism in Emacs call `codepage-setup' automatically. I'm not sure about the cp437 vs. cp437de issue (=CE=B2 =3D \beta vs. =C3=9F= =3D \ss =3D S SHARP). Maybe this is good enough, see [1]. It seems that both, `code-pages.el' and `codepage.el', use S SHARP. > The re-search-forward searches until position 1000. Should that > number be customizable? The functions in `auto-coding-alist' get an > argument of 249 for number of positions to search, but I think that > is not enough for LaTeX files. Yes, a limit of 249 surely is not enough for typical LaTeX files. Maybe the search could stop either at a certain number or when "\begin{document}" was found. It should also be checked that the "inputenc cookie" isn't a LaTeX comment. If your code cannot be integrated in Emacs, I would propose to add it to AUCTeX. Bye, Reiner. [1] See e.g. this article by Markus Kuhn in a German newsgroup: ,----[ Translation of the most relevant part: ] | Microsoft Code Page 437 officially contains LATIN SMALL LETTER SHARP | S on position 0xE1 (though the designers of IBM CGA card ROM's | apparently thought more of a beta at that time (~1979)). Many | conversation programs ([...]) map both s sharp (U+00DF) and beta | (U+03B2) to 0xE1 in CP437. Hopefully GNU iconv starting from glibc | 2.2 will get this right. `---- ,----[ Original article: ] | From: mgk25@cl.cam.ac.uk (Markus Kuhn) | Subject: Re: recode latin1:cp437 und '=C3=9F' | Newsgroups: de.comp.os.unix.apps, de.comp.standards | Date: 2000/04/22 | Message-ID: <8ds839$anv$1@pegasus.csx.cam.ac.uk> |=20 | >> Georg Schwarz wrote: | >>=20 | >> > Wenn ich Text auf einem Epson Stylus 800+ direkt drucke, schiebt der | >> > Druckertreiber ihn zun=C3=A4chst durch recode latin1:cp437 (GNU reco= de | >> > 3.4.1). Allerdings wird ein '=C3=9F' nicht korrekt ausgegeben. Ich d= enke da=C3=9F | >> > code page 437 gar kein =C3=9F enth=C3=A4lt. |=20 | Microsoft Code Page 437 enth=C3=A4lt offiziell LATIN SMALL LETTER SHARP S= auf | position 0xE1 (auch wenn die Designer des IBM CGA-Karten ROM's | offensichtlich damals (~1979) eher wohl an ein beta gedacht haben). | Sehr gute Konvertierprogramme (und dazu darf man GNU recode 3.5 wegen | der vielen Fehler in den zudem nur injektiven Tabellen leider | noch nicht zaehlen!) mappen sowohl das scharfe s (U+00DF) als auch as | kleine beta (U+03B2) auf 0xE1 in CP437. GNU iconv wird das hoffentlich | ab glibc 2.2 entlich richtig hinkriegen. | [...] | Quellen: |=20 | ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP437.TXT | ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP850.TXT `---- --=20 ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/