From: Lennart Borgman <lennart.borgman.073@student.lu.se>
Subject: Re: [h-e-w] Tramp adds ^M^M to end of line
Date: Mon, 12 Jun 2006 22:06:56 +0200 [thread overview]
Message-ID: <448DC960.3080203@student.lu.se> (raw)
In-Reply-To: <4489BCE4.1020000@student.lu.se>
Lennart Borgman wrote:
> This is probably specific to w32 and CVS Emacs (I use CVS Emacs from
> today on w32).
>
> I am using `copy-file' to upload single files to a web site on a unix
> host. I did not notice any problems as long as I just uploaded
> html-files, but when I uploaded a perl script I got into troubles. I
> took me quite some time to find out that `copy-file' somehow added
> ^M^M to end of line for all lines.
>
> After some testing I found that this happens when the line ending
> style is DOS, but not if it is UNIX. So it seems like a ^M is added
> instead of removed in that case.
>
> This site is reached through ftp. I use the ftp program from
> ftp://ftp.gnu.org/old-gnu/emacs/windows/contrib/ftp-for-win32.zip that
> is recommended at http://www.emacswiki.org/cgi-bin/wiki/AngeFtp#toc7.
> And `ange-ftp-ftp-program-args' has the standard value.
>
> I do not know if this is a bug in the ftp-program, Emacs or my setup.
> I would be glad for some hints here! (I am cross-posting to be able to
> collect more info.)
I have to admit I have done something stupid again. Ange-ftp is in no
way to blame here. Nothing in Emacs is to blame here.
This is what happened:
- I uploaded the file using `copy-file' it was uploaded with ftp as binary.
- When I downloaded the file again using another ftp program that was
aware of that the host was a unix host and I was using w32. This program
added ^M before ^J. So the line ending became ^M^M^J (ie CR-CR-LF).
How I found out? Downloaded the file using http instead. Http does not
try to convert line endings as far as I know.
I see no good way of fixing this if I have CR-LF line endings in the
files I want to upload to a unix host. So, finally, I accept the advice
of many here to use LF line endings (ie unix style line endings) for
most of what I do. (And I will implement something to take care of this
in nxhtml-mode.)
Sorry for the noise.
/Wheel-inventor 5 000 000 000
prev parent reply other threads:[~2006-06-12 20:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-09 18:24 Tramp adds ^M^M to end of line Lennart Borgman
2006-06-12 20:06 ` Lennart Borgman [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=448DC960.3080203@student.lu.se \
--to=lennart.borgman.073@student.lu.se \
/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 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).