From unknown Mon Jun 23 02:25:40 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6338: 23.2; line-encoding not recognized in short files Resent-From: David Reitter Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bugs@aquamacs.org, bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Jun 2010 02:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6338 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 6338@debbugs.gnu.org Cc: bugs@aquamacs.org X-Debbugs-Original-To: Bug-Gnu-Emacs X-Debbugs-Original-Xcc: bugs@aquamacs.org Received: via spool by submit@debbugs.gnu.org id=B.127553148731882 (code B ref -1); Thu, 03 Jun 2010 02:19:01 +0000 Received: (at submit) by debbugs.gnu.org; 3 Jun 2010 02:18:07 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OK00V-0008IB-5z for submit@debbugs.gnu.org; Wed, 02 Jun 2010 22:18:07 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OK00T-0008Hp-7K for submit@debbugs.gnu.org; Wed, 02 Jun 2010 22:18:06 -0400 Received: from lists.gnu.org ([199.232.76.165]:57344) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OK00P-0008CC-PA for submit@debbugs.gnu.org; Wed, 02 Jun 2010 22:18:01 -0400 Received: from [140.186.70.92] (port=42126 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OK00O-0000Fd-6m for bug-gnu-emacs@gnu.org; Wed, 02 Jun 2010 22:18:01 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FREEMAIL_REPLY, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OK00J-0007oM-5u for bug-gnu-emacs@gnu.org; Wed, 02 Jun 2010 22:18:00 -0400 Received: from mail-gw0-f41.google.com ([74.125.83.41]:38515) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OK00I-0007o6-Vu for bug-gnu-emacs@gnu.org; Wed, 02 Jun 2010 22:17:55 -0400 Received: by gwaa18 with SMTP id a18so162763gwa.0 for ; Wed, 02 Jun 2010 19:17:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:content-type:subject :date:references:to:message-id:mime-version:x-mailer; bh=0QDYsUEYbI8mj2fYAnLPJNeyt/I+K5+LovGcG5XQsno=; b=JgVpC/KgL0SLh85kG4hDdSdh0Kk/qOeyqX4kj5TmX80qwTJcayiqHO05NxaODRaBOL TLpYgL8laIEVrgs9iQfmv8E8I9mjXAhZUSQa4zQwLf6H8R6LESbcGpRbSdMCA9eiO9XF 92oFlb48wcYq6gD45l5sI8da53r055kf3EPY4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:content-type:subject:date:references:to:message-id :mime-version:x-mailer; b=sjMcl7ufyKuc6KScjAWvQNuL9gUhJhr1zxAgl2+sc/0zODk7L+Wrlc1yOurm6Av1ps HB84vF6JTAUFZOCgyYqdcML7II0dSWOah5Ywrg0wd4jRcvet79cNXXMXB74sDd2FRy2G QxbN5oXMR0H8BxsVvgCf+umMiePhj+H4p/Z9Y= Received: by 10.100.26.12 with SMTP id 12mr9828235anz.177.1275531473788; Wed, 02 Jun 2010 19:17:53 -0700 (PDT) Received: from [192.168.1.17] (pool-96-235-7-98.pitbpa.east.verizon.net [96.235.7.98]) by mx.google.com with ESMTPS id t2sm45572559ani.18.2010.06.02.19.17.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 02 Jun 2010 19:17:52 -0700 (PDT) From: David Reitter Content-Type: multipart/mixed; boundary=Apple-Mail-14-871526433 Date: Wed, 2 Jun 2010 22:17:49 -0400 References: <23CF8B21-1737-4F4F-AAFC-08C06AC24794@gmail.com> Message-Id: Mime-Version: 1.0 (Apple Message framework v1078) X-Mailer: Apple Mail (2.1078) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.0 (-----) --Apple-Mail-14-871526433 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii X-Debbugs-CC: francesco.dellapietra@gmail.com X-Debbugs-CC: bugs@aquamacs.org Emacs fails to recognize the encoding of a relatively short file with = Mac-like line endings (attached). I think that this is the main = problem. This I have reproduced in a 23-based Emacs. If the file is = made longer (with more LaTeX code), line-endings seem to be recognized = correctly. The user's report is below; you can see that he is surprised by Emacs = trying to be smart and guessing the encoding from = \usepackage[mac]{inputenv} in his LaTeX file. Note that it only guesses = this when the file is re-loaded - not upon the first save. That is part = of why this is surprising "by design". (Then, the LaTeX-aware encoding = guesser seems to ignore the actual line-endings of the file being loaded = and goes for "Mac".) --Apple-Mail-14-871526433 Content-Disposition: attachment; filename=foo9.tex Content-Type: application/octet-stream; name="foo9.tex" Content-Transfer-Encoding: quoted-printable \documentclass[a4paper,10pt]{article}=0D=0D\usepackage[mac]{inputenc}=0D= \usepackage[italian]{babel}=0D=20=0D[\usepackage[intlimits]{amsmath}=20=0D= \usepackage{amsthm,booktabs}=20=0D\reversemarginpar=0D= \usepackage{amsfonts}=20=20=20=20=20=0D= \usepackage{amssymb,color,comment}=0D\usepackage[top=3D2cm,=20= bottom=3D1cm,=20left=3D1cm,=20right=3D1cm]=20=20{geometry}=0D= \begin{document}=0D\pagestyle{empty}=0D\twocolumn=0D\begin{center}=0D= \textbf{\Large=20\sc=20Analisi=20Matematica}=0D\end{center}=0D=0D%=20Due=20= Date:=20=20June=201st!=0D=0D= --Apple-Mail-14-871526433 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Begin forwarded message: > From: Francesco Della Pietra > Date: June 2, 2010 9:41:38 AM EDT > To: Bug reports for Aquamacs Emacs > Subject: Re: [Aquamacs-bugs] 23.2; files saved in wrong line end = format > Reply-To: Bug reports for Aquamacs Emacs >=20 > Yes, > but this does not happen with your file. After some tests, the minimal = text where i find this problem is the following, with these (minimal) = instructions: >=20 > - start without customizations > -command-N > -enter exactly these lines: >=20 > \documentclass[a4paper,10pt]{article} >=20 > \usepackage[mac]{inputenc} > \usepackage[italian]{babel} > \usepackage[intlimits]{amsmath}=20 > \usepackage{amsthm,booktabs}=20 > \reversemarginpar > \usepackage{amsfonts} =20 > \usepackage{amssymb,color,comment} > \usepackage[top=3D2cm, bottom=3D1cm, left=3D1cm, right=3D1cm] = {geometry} > \begin{document} > \pagestyle{empty} > \twocolumn > \begin{center} > \textbf{\Large \sc Analisi Matematica} > \end{center} >=20 > -C-x C-s foo.tex > -Command-W > -C-x C-f foo.tex >=20 > (it appears OK) >=20 > - Now modify something, for example give an empty space between lines: >=20 > \documentclass[a4paper,10pt]{article} >=20 > \usepackage[mac]{inputenc} > \usepackage[italian]{babel} >=20 > \usepackage[intlimits]{amsmath}=20 > \usepackage{amsthm,booktabs}=20 > \reversemarginpar > \usepackage{amsfonts} =20 > \usepackage{amssymb,color,comment} > \usepackage[top=3D2cm, bottom=3D1cm, left=3D1cm, right=3D1cm] = {geometry} > \begin{document} > \pagestyle{empty} > \twocolumn > \begin{center} > \textbf{\Large \sc Analisi Matematica} > \end{center} >=20 > -C-x C-s > -Command-W > -C-x C-f foo.tex >=20 > Now appears >=20 > = \documentclass[a4paper,10pt]{article}^M^M\usepackage[mac]{inputenc}^M\usep= ackage[italian]{babel}^M^M\usepackage[intlimits]{amsmath}=20 > = ^M\usepackage{amsthm,booktabs}^M\reversemarginpar^M\usepackage{amsfonts} = ... > and so on. >=20 >=20 >=20 > Thanks for the time you spent on my problem. >=20 --Apple-Mail-14-871526433-- From unknown Mon Jun 23 02:25:40 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6338: 23.2; line-encoding not recognized in short files Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Aug 2016 02:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6338 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: David Reitter Cc: bugs@aquamacs.org, 6338@debbugs.gnu.org Received: via spool by 6338-submit@debbugs.gnu.org id=B6338.147217912819936 (code B ref 6338); Fri, 26 Aug 2016 02:39:02 +0000 Received: (at 6338) by debbugs.gnu.org; 26 Aug 2016 02:38:48 +0000 Received: from localhost ([127.0.0.1]:40971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bd72e-0005BP-GM for submit@debbugs.gnu.org; Thu, 25 Aug 2016 22:38:48 -0400 Received: from mail-it0-f43.google.com ([209.85.214.43]:33737) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bd72c-0005B6-LG; Thu, 25 Aug 2016 22:38:47 -0400 Received: by mail-it0-f43.google.com with SMTP id j128so468289ith.0; Thu, 25 Aug 2016 19:38:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=wZMf+AZuvp/Y+ztuGIzviENjJCXepHmORd25SApj044=; b=QGST3uITkuItuzNvWpe4s0InGyljIuZe5qnd2zekP/EyyOwobkHrKR0rKWBJZceZDT 0f9LIQ/yOmwdLps23C4YUd7pU/u44XyOR033U8UtNWkmQCxGdxFeq46gsREeelpvYqXK CqfnwZKgNv8hR7+Jl2YG8qclMEHF7i5JDuGUWcCLJPoyTa9tqIy6sc3JQNVbCtOF7b01 2D+dQSVD7fm31X+1vtPASv8YAbA1dJ69W/TMslxWsNRLXlv1i3LMrnkEVsGTO+UPDJ4P 8EmxLxdc1/la4YLl+HFK3iEbo8UYbOEbBvH9Aqdpy8+03agCuAJeBhG031FVeqrlhJIx FgaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=wZMf+AZuvp/Y+ztuGIzviENjJCXepHmORd25SApj044=; b=GvZpz7XbmSvOWkcz9NVhndDnw1tesn3TOFfz+jwcw7I6HYnbmzHH7MYJSfwVFlKNgr 4wGGCrFffBZlWnQm4JO8aXr7nhwsJ9UrirCWJi6Jx43c+rdGbkHK4TC2N+vOuPXTs3px x3x4YR6azNwEqPaYxlxI5FV9+OIawHlZ2sGDFYSRPY3sslq9WMzoRn2Y9IGwII4J8jDR w88DWr1WEQTpRNdrb2kLDAO7gvbuJlLO7rImYnayE9sz8EUVwtzRYfRq38akzSTA+fBC jHjnbzlnB43scl7y9KtI8TTOXmWdf8eCqRkoKCdUIb0N0N9NrFN7O8OApQfmi7DIPyv8 lYLg== X-Gm-Message-State: AE9vXwPRHmI18InaS58LEvBpi0Hbxei0D7TknHEcMdKiS+MFV+aWht20XjO4nh+8bPlEcA== X-Received: by 10.107.159.147 with SMTP id i141mr877993ioe.29.1472179119824; Thu, 25 Aug 2016 19:38:39 -0700 (PDT) Received: from zony ([45.2.7.130]) by smtp.googlemail.com with ESMTPSA id 192sm14996848itk.17.2016.08.25.19.38.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 Aug 2016 19:38:39 -0700 (PDT) From: npostavs@users.sourceforge.net References: <23CF8B21-1737-4F4F-AAFC-08C06AC24794@gmail.com> Date: Thu, 25 Aug 2016 22:38:56 -0400 In-Reply-To: (David Reitter's message of "Wed, 2 Jun 2010 22:17:49 -0400") Message-ID: <874m68tfsv.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) found 6338 24.2 tags 6338 fixed close 6338 24.3 quit David Reitter writes: > Emacs fails to recognize the encoding of a relatively short file with > Mac-like line endings (attached). I think that this is the main > problem. This I have reproduced in a 23-based Emacs. If the file is > made longer (with more LaTeX code), line-endings seem to be recognized > correctly. > Opening that file with Emacs up to version 24.2 results in a single line containing ^M in the buffer. In Emacs 24.3 and up the Mac line endings are recognized correctly, so I'm closing this as fixed.