all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: mac/dos/unix newline conversion without specify from
Date: Fri, 07 Dec 2007 17:35:13 -0500	[thread overview]
Message-ID: <jwvve7af87e.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: a04c9c11-03af-434e-a0de-5672d36592b6@t1g2000pra.googlegroups.com

> <<That's because html-mode sets require-final-newline to t. >>
> Thanks for finding the cause.

That's probably not the cause of your original problem.  It's the cause
of the problem you saw when you tried the replace-string thingy to
replace "all" CRs into LFs.  If you used the C-x RET f mac RET method
I suggested earlier to convert unix-style files to mac-style files, this
problem shouldn't appear.

> Anyhow, for what's worth, i think this is still something emacs (in
> particular Mac versions) should fixup. Basically, the scenario is that
> a user opens mac classic html files, work on it, save it, then next
> time he opens the files shows ^M. (this actually happens to me a lot

That's a clear bug, indeed.  But I can guarantee that it normally works,
so please give us more details so we can track down the problem.
The only know case where a Mac file is misidentified is if it contains
LF chars, which shouldn't happen in normal circumstances.

> since i work on a server with non-professional coders and they use
> BBEdit that is still set to CR as newline) In contrast, i open the
> same file (with CR as eol but a LF at the end) in Xcode, TextWrangler,
> TextEdit, all opens correctly and indicate as Mac files.

The final LF is clearly an error in the file.  You need to track down
its origin.

> * perhaps require-final-newline should insert the right EOL char based
> on the encoding.

It does.


        Stefan

  reply	other threads:[~2007-12-07 22:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-02 18:14 mac/dos/unix newline conversion without specify from Xah Lee
2007-12-04 14:18 ` David Reitter
2007-12-05 14:37   ` Xah Lee
2007-12-05 15:05     ` David Kastrup
2007-12-05 16:16       ` Xah Lee
2007-12-05 16:25         ` David Kastrup
2007-12-05 16:51           ` Xah Lee
2007-12-05 17:05             ` David Kastrup
2007-12-07 18:03               ` Xah Lee
2007-12-07 22:35                 ` Stefan Monnier [this message]
2007-12-07 16:27         ` Stefan Monnier
2007-12-07 18:04           ` Xah Lee
2007-12-07 22:30             ` Stefan Monnier
2007-12-08  0:38               ` Xah Lee
2007-12-08 11:47                 ` Eli Zaretskii
     [not found]                 ` <mailman.4757.1197114470.18990.help-gnu-emacs@gnu.org>
2007-12-08 17:12                   ` Xah Lee
2007-12-09  1:23                     ` David Kastrup

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvve7af87e.fsf-monnier+gnu.emacs.help@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.