[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: elisp to change line endings for new remote file
From: |
yary |
Subject: |
Re: elisp to change line endings for new remote file |
Date: |
Tue, 7 Oct 2008 08:41:34 -0700 (PDT) |
User-agent: |
G2/1.0 |
Thanks all. I already knew about add-untranslated-filesystem. tramp/
plink is smart enough to not translate its files, so that's not the
solution for creating new files with unix line endings.
On Oct 7, 2:43 am, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
> Am 06.10.2008 um 19:07 schrieb yary:
...
> There is before-save-hook. It could be (time-stamp). You could add
> (via the customisation interface) another function that changes from
> DOS to UNIX file endings, (set-buffer-file-coding-system coding-
> system &optional force nomodify).
...
That seems close to the right thing, but I'd want to call after
opening a new "tramp" file, not before saving- if it has MS-DOS line
endings already, I want to change it manually.
> Another option is to put into your init file:
>
> (prefer-coding-system 'utf-8-unix)
>
> although I doubt that this would change *existing* line endings.
That's also a good answer, as I don't want to change existing endings-
just want to make my new files correct for the platform. Though I'd
have a problem when I opened up a new file on the Windows side.
(Curse that CR, how many thousands of hours have been wasted due to
you...)