unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#6338: 23.2;  line-encoding not recognized in short files
       [not found] <23CF8B21-1737-4F4F-AAFC-08C06AC24794@gmail.com>
@ 2010-06-03  2:17 ` David Reitter
  2016-08-26  2:38   ` npostavs
  0 siblings, 1 reply; 2+ messages in thread
From: David Reitter @ 2010-06-03  2:17 UTC (permalink / raw)
  To: 6338; +Cc: bugs

[-- Attachment #1: Type: text/plain, Size: 810 bytes --]

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".)



[-- Attachment #2: foo9.tex --]
[-- Type: application/octet-stream, Size: 444 bytes --]

\documentclass[a4paper,10pt]{article}\r\r\usepackage[mac]{inputenc}\r\usepackage[italian]{babel}\r \r[\usepackage[intlimits]{amsmath} \r\usepackage{amsthm,booktabs} \r\reversemarginpar\r\usepackage{amsfonts}     \r\usepackage{amssymb,color,comment}\r\usepackage[top=2cm, bottom=1cm, left=1cm, right=1cm]  {geometry}\r\begin{document}\r\pagestyle{empty}\r\twocolumn\r\begin{center}\r\textbf{\Large \sc Analisi Matematica}\r\end{center}\r\r% Due Date:  June 1st!\r\r

[-- Attachment #3: Type: text/plain, Size: 2069 bytes --]


Begin forwarded message:

> From: Francesco Della Pietra <francesco.dellapietra@gmail.com>
> Date: June 2, 2010 9:41:38 AM EDT
> To: Bug reports for Aquamacs Emacs <aquamacs-bugs@aquamacs.org>
> Subject: Re: [Aquamacs-bugs] 23.2; files saved in wrong line end format
> Reply-To: Bug reports for Aquamacs Emacs <aquamacs-bugs@aquamacs.org>
> 
> 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:
> 
> - start without customizations
> -command-N
> -enter exactly these lines:
> 
> \documentclass[a4paper,10pt]{article}
> 
> \usepackage[mac]{inputenc}
> \usepackage[italian]{babel}
> \usepackage[intlimits]{amsmath} 
> \usepackage{amsthm,booktabs} 
> \reversemarginpar
> \usepackage{amsfonts}     
> \usepackage{amssymb,color,comment}
> \usepackage[top=2cm, bottom=1cm, left=1cm, right=1cm]  {geometry}
> \begin{document}
> \pagestyle{empty}
> \twocolumn
> \begin{center}
> \textbf{\Large \sc Analisi Matematica}
> \end{center}
> 
> -C-x C-s foo.tex
> -Command-W
> -C-x C-f foo.tex
> 
> (it appears OK)
> 
> - Now modify something, for example give an empty space between lines:
> 
> \documentclass[a4paper,10pt]{article}
> 
> \usepackage[mac]{inputenc}
> \usepackage[italian]{babel}
> 
> \usepackage[intlimits]{amsmath} 
> \usepackage{amsthm,booktabs} 
> \reversemarginpar
> \usepackage{amsfonts}     
> \usepackage{amssymb,color,comment}
> \usepackage[top=2cm, bottom=1cm, left=1cm, right=1cm]  {geometry}
> \begin{document}
> \pagestyle{empty}
> \twocolumn
> \begin{center}
> \textbf{\Large \sc Analisi Matematica}
> \end{center}
> 
> -C-x C-s
> -Command-W
> -C-x C-f foo.tex
> 
> Now appears
> 
> \documentclass[a4paper,10pt]{article}^M^M\usepackage[mac]{inputenc}^M\usepackage[italian]{babel}^M^M\usepackage[intlimits]{amsmath} 
> ^M\usepackage{amsthm,booktabs}^M\reversemarginpar^M\usepackage{amsfonts} ...
> and so on.
> 
> 
> 
> Thanks for the time you spent on my problem.
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#6338: 23.2;  line-encoding not recognized in short files
  2010-06-03  2:17 ` bug#6338: 23.2; line-encoding not recognized in short files David Reitter
@ 2016-08-26  2:38   ` npostavs
  0 siblings, 0 replies; 2+ messages in thread
From: npostavs @ 2016-08-26  2:38 UTC (permalink / raw)
  To: David Reitter; +Cc: 6338, bugs

found 6338 24.2
tags 6338 fixed
close 6338 24.3
quit

David Reitter <david.reitter@gmail.com> 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.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-26  2:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <23CF8B21-1737-4F4F-AAFC-08C06AC24794@gmail.com>
2010-06-03  2:17 ` bug#6338: 23.2; line-encoding not recognized in short files David Reitter
2016-08-26  2:38   ` npostavs

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).