From: yary <not.com@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: elisp to change line endings for new remote file
Date: Tue, 7 Oct 2008 08:41:34 -0700 (PDT) [thread overview]
Message-ID: <e6e626ef-4021-45c8-9d07-63b2e6dc2ce5@w1g2000prk.googlegroups.com> (raw)
In-Reply-To: mailman.434.1223372672.25473.help-gnu-emacs@gnu.org
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...)
next prev parent reply other threads:[~2008-10-07 15:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-06 17:07 elisp to change line endings for new remote file yary
2008-10-06 23:50 ` Giorgos Keramidas
2008-10-07 6:42 ` Kevin Rodgers
2008-10-07 9:43 ` Peter Dyballa
[not found] ` <mailman.434.1223372672.25473.help-gnu-emacs@gnu.org>
2008-10-07 15:41 ` yary [this message]
2008-10-08 1:29 ` Kevin Rodgers
[not found] ` <mailman.516.1223429355.25473.help-gnu-emacs@gnu.org>
2008-10-17 0:08 ` yary
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=e6e626ef-4021-45c8-9d07-63b2e6dc2ce5@w1g2000prk.googlegroups.com \
--to=not.com@gmail.com \
--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.