From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.help Subject: Re: TRAMP corrupting files (it's OS X's fault) Date: Tue, 19 May 2009 01:17:21 -0400 Message-ID: References: <6ee1e6090905072244j13994d04kca17ba993a205ed0@mail.gmail.com> <6ee1e6090905181840s78904ca7h81335f07e7e3db60@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v935.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1242710297 19975 80.91.229.12 (19 May 2009 05:18:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 19 May 2009 05:18:17 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Will Willis Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 19 07:18:10 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M6HiL-0007nN-Uc for geh-help-gnu-emacs@m.gmane.org; Tue, 19 May 2009 07:18:10 +0200 Original-Received: from localhost ([127.0.0.1]:51841 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M6HiK-0004ZZ-Ln for geh-help-gnu-emacs@m.gmane.org; Tue, 19 May 2009 01:18:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M6Hhj-0004Wt-Ft for help-gnu-emacs@gnu.org; Tue, 19 May 2009 01:17:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M6Hhd-0004Oy-Sk for help-gnu-emacs@gnu.org; Tue, 19 May 2009 01:17:30 -0400 Original-Received: from [199.232.76.173] (port=52197 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M6Hhd-0004Of-Fg for help-gnu-emacs@gnu.org; Tue, 19 May 2009 01:17:25 -0400 Original-Received: from vpn.merrillpress.com ([64.61.107.78]:47172) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M6Hhd-00038j-6i for help-gnu-emacs@gnu.org; Tue, 19 May 2009 01:17:25 -0400 Original-Received: from cpe-67-246-181-235.buffalo.res.rr.com ([67.246.181.235] helo=[192.168.1.102]) by mars.merrillpress.net with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1M6Hha-0007OY-HZ; Tue, 19 May 2009 01:17:22 -0400 In-Reply-To: <6ee1e6090905181840s78904ca7h81335f07e7e3db60@mail.gmail.com> X-Mailer: Apple Mail (2.935.3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:64560 Archived-At: On May 18, 2009, at 9:40 PM, Will Willis wrote: > I'm going to start using rsync to see if that helps.. I wish I were > making this up. I've had files corrupt on me as many as 3 times in one I ran into the same problem. It's actually OS X's fault: OS X (at least 10.5) doesn't give Emacs any locale environment variables. Emacs guesses it's running under 8859-1, which has disastrous consequences for tramp. (If you want to test it, run locale under eshell. In the terminal, you see the expected locale output because Terminal.app *itself* sets up the correct environment before running your shell.) One solution is to just give Emacs the right environment variables. I've outlined how to do that here: http://qtmstr.livejournal.com/19155.html (Modify the specific environment variable values according to taste.) Another approach is to add this to your Emacs initialization: (when (eq system-type 'darwin) (prefer-coding-system 'utf-8)) These fixed the corruption issue *I* was having. YMMV. > I'd love to upgrade to Carbon Emacs 23, but I'm still on OS X > 10.4, holding out for snow leopard. There is no CarbonEmacs 23. The OS X support will be provided via a new Cocoa port which, to put it kindly, is broken. You might want to stick with CarbonEmacs for now.