From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Automatic recognition of some specific coding systems Date: Sat, 28 Feb 2015 18:55:46 +0200 Message-ID: <83y4nirn59.fsf@gnu.org> References: <83fv9v6u5o.fsf@gnu.org> <83twya55h9.fsf@gnu.org> <83mw4168ha.fsf@gnu.org> <83ioeo6363.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1425142597 10798 80.91.229.3 (28 Feb 2015 16:56:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 28 Feb 2015 16:56:37 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Feb 28 17:56:28 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YRkgZ-0003M4-JD for geh-help-gnu-emacs@m.gmane.org; Sat, 28 Feb 2015 17:56:15 +0100 Original-Received: from localhost ([::1]:41707 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRkgY-0000D9-Ry for geh-help-gnu-emacs@m.gmane.org; Sat, 28 Feb 2015 11:56:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45937) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRkgK-0000Cz-PB for help-gnu-emacs@gnu.org; Sat, 28 Feb 2015 11:56:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YRkgF-00053s-QO for help-gnu-emacs@gnu.org; Sat, 28 Feb 2015 11:56:00 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:49228) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRkgF-00051u-Ic for help-gnu-emacs@gnu.org; Sat, 28 Feb 2015 11:55:55 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NKH00A00QV49Q00@a-mtaout22.012.net.il> for help-gnu-emacs@gnu.org; Sat, 28 Feb 2015 18:55:54 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NKH00AS9R150450@a-mtaout22.012.net.il> for help-gnu-emacs@gnu.org; Sat, 28 Feb 2015 18:55:54 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.172 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:102954 Archived-At: > From: J=FCrgen Hartmann > Date: Thu, 26 Feb 2015 23:34:05 +0100 >=20 > >=A0=A0 . Similarly, if the cp850 files' contents match some common= regexp, > >=A0=A0=A0=A0 you can customize auto-coding-regexp-alist to force t= heir decoding > >=A0=A0=A0=A0 by cp850 >=20 > That one might do the trick: In my case the only files (at least in > the big picture) that use the DOS EOL variant are those encoded wit= h > cp850 and vice versa. So one could think about a regular expression > that matches this unique EOL pattern. A more reliable test might be characters whose codepoints are between 128 and 159: those should generally be absent from ISO-8859 encodings= . (Emacs doesn't use this fact for good reasons, but in your specific case those reasons should not matter, I think.)