all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: elisp to change line endings for new remote file
Date: Tue, 07 Oct 2008 00:42:18 -0600	[thread overview]
Message-ID: <gcf0bg$lj9$1@ger.gmane.org> (raw)
In-Reply-To: <06d7be73-e1e2-4640-b32f-4d5bd9103cd8@k36g2000pri.googlegroups.com>

yary wrote:
> Hoping someone can write a line or two of elisp for my .emacs file
> that will set the line endings to Unix for any new file opened via
> tramp. I'm using GNU Emacs 23.0.60.1 on Windows, often creating Unix
> files via plink, and usually forgetting to change the line endings
> from DOS when I do. If you've already solved this in your setup,
> please share.

 From the "Text and Binary" node of the Emacs manual:

    When you use NFS, Samba, or some other similar method to access file
systems that reside on computers using GNU or Unix systems, Emacs
should not perform end-of-line translation on any files in these file
systems--not even when you create a new file.  To request this,
designate these file systems as "untranslated" file systems by calling
the function `add-untranslated-filesystem'.  It takes one argument: the
file system name, including a drive letter and optionally a directory.
For example,

      (add-untranslated-filesystem "Z:")

designates drive Z as an untranslated file system, and

      (add-untranslated-filesystem "Z:\\foo")

designates directory `\foo' on drive Z as an untranslated file system.

    Most often you would use `add-untranslated-filesystem' in your
`.emacs' file, or in `site-start.el' so that all the users at your site
get the benefit of it.


-- 
Kevin Rodgers
Denver, Colorado, USA





  parent reply	other threads:[~2008-10-07  6:42 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 [this message]
2008-10-07  9:43 ` Peter Dyballa
     [not found] ` <mailman.434.1223372672.25473.help-gnu-emacs@gnu.org>
2008-10-07 15:41   ` yary
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='gcf0bg$lj9$1@ger.gmane.org' \
    --to=kevin.d.rodgers@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.