From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Encoding problem with Tramp Date: Mon, 17 Mar 2008 16:29:32 -0400 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1205785807 14113 80.91.229.12 (17 Mar 2008 20:30:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Mar 2008 20:30:07 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 17 21:30:36 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JbLyV-0000fC-1E for ged-emacs-devel@m.gmane.org; Mon, 17 Mar 2008 21:30:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JbLxv-0005J2-6b for ged-emacs-devel@m.gmane.org; Mon, 17 Mar 2008 16:29:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JbLxr-0005IX-4j for emacs-devel@gnu.org; Mon, 17 Mar 2008 16:29:47 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JbLxm-0005Gg-Lv for emacs-devel@gnu.org; Mon, 17 Mar 2008 16:29:46 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JbLxm-0005GT-5k for emacs-devel@gnu.org; Mon, 17 Mar 2008 16:29:42 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JbLxl-0006DV-Ma for emacs-devel@gnu.org; Mon, 17 Mar 2008 16:29:41 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAC9x3kdMCrTo/2dsb2JhbACoQIEK X-IronPort-AV: E=Sophos;i="4.25,514,1199682000"; d="scan'208";a="16158829" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 17 Mar 2008 16:29:40 -0400 Original-Received: from pastel.home ([76.10.180.232]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id XXU83640; Mon, 17 Mar 2008 16:29:40 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 37D257F1C; Mon, 17 Mar 2008 16:29:32 -0400 (EDT) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:92846 Archived-At: --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable [ For Kai Gro=DFjohann and Michael Albinus, thanks to stupid mailers. ] Stefan --=-=-= Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 8bit Return-Path: <> X-Original-To: monnier@iro.umontreal.ca Delivered-To: monnier@iro.umontreal.ca Received: from perlin.iro.umontreal.ca (perlin.iro.umontreal.ca [132.204.24.51]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 5A5722CF6F3 for ; Mon, 17 Mar 2008 16:15:53 -0400 (EDT) Received: from ironport2-out.pppoe.ca (ironport2-out.pppoe.ca [206.248.154.182]) by perlin.iro.umontreal.ca (Postfix) with ESMTP id EB2AD148225 for ; Mon, 17 Mar 2008 16:15:33 -0400 (EDT) Received: from localhost by ironport2-out.pppoe.ca; 17 Mar 2008 16:15:33 -0400 Date: 17 Mar 2008 16:15:33 -0400 To: monnier@iro.umontreal.ca From: "Mail Delivery System" Subject: Delivery Status Notification (Failure) MIME-Version: 1.0 Content-Type: multipart/report; report-type=delivery-status; boundary="zeoy.4IAUkgJy8.1epTry.EFy59o/" Message-Id: <20080317201533.EB2AD148225@perlin.iro.umontreal.ca> X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-0.876, requis 5, BAYES_00 -2.60, MSGID_FROM_MTA_ID 1.72) X-DIRO-MailScanner-From: X-Spam-Status: No --zeoy.4IAUkgJy8.1epTry.EFy59o/ content-type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable The following message to was undeliverable. The reason for the problem: 5.1.0 - Unknown address error 550-"5.7.1 {mx069} The recipient does not acc= ept mails from 'iro.umontreal.ca' over foreign mailservers.\n5.7.1 Accordin= g to the domain's SPF record your host '206.248.154.182' is not a designate= d sender.\n5.7.1 ( http://portal.gmx.net/serverrules )" --zeoy.4IAUkgJy8.1epTry.EFy59o/ content-type: message/delivery-status Reporting-MTA: dns; ironport2-out.pppoe.ca Final-Recipient: rfc822;kai.grossjohann@gmx.net Action: failed Status: 5.0.0 (permanent failure) Remote-MTA: dns; [213.165.64.100] Diagnostic-Code: smtp; 5.1.0 - Unknown address error 550-"5.7.1 {mx069} The recipient does not accept mails from 'iro.umontreal.ca' over foreign mailservers.\n5.7.1 According to the domain's SPF record your host '206.248.154.182' is not a designated sender.\n5.7.1 ( http://portal.gmx.net/serverrules )" (delivery attempts: 0) --zeoy.4IAUkgJy8.1epTry.EFy59o/ content-type: message/rfc822 Received: from 76-10-180-232.dsl.teksavvy.com (HELO smtp.pppoe.ca) ([76.10.180.232]) by ironport2-out.pppoe.ca with ESMTP; 17 Mar 2008 16:15:32 -0400 Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 17 Mar 2008 16:15:32 -0400 Received: from pastel.home ([76.10.180.232]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id XXG40432; Mon, 17 Mar 2008 16:15:32 -0400 Received: by pastel.home (Postfix, from userid 20848) id 1CDA17F1C; Mon, 17 Mar 2008 16:15:32 -0400 (EDT) From: Stefan Monnier To: Kai =?iso-8859-1?Q?Gro=1FFFFFFFjohann?= , Michael Albinus Subject: Encoding problem with Tramp Message-ID: Date: Mon, 17 Mar 2008 16:15:32 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii I recently noticed that my home page has emacs-mule encoding, even tho it specifies latin-1. It turns out that it's because I was editing it via Tramp and that Tramp has a bug in this regard. Using good ol' print statements, it turns out that last-coding-system-used is modified in tramp-handle-write-region *after* tramp-handle-write-region was careful to save&set it. More specifically the code does: ;; Make `last-coding-system-used' have the right value. (when coding-system-used (set 'last-coding-system-used coding-system-used)))) ;; Set file modification time. (when (or (eq visit t) (stringp visit)) (set-visited-file-modtime ;; We must pass modtime explicitely, because filename can ;; be different from (buffer-file-name), f.e. if ;; `file-precious-flag' is set. (nth 5 (file-attributes filename)))) so while the first 3 lines DTRT, the subsequent 7 lines (probably just the call to file-attributes) set the last-coding-system-used back to raw-text-unix. I suggest to fix Tramp's file-attributes by wrapping a let around it that preserves the value of last-coding-system-used. If I fix it, then I get the same problem with the subsequent call to tramp-set-file-uid-gid. Maybe another way to fix those problem is to move the above 3 lines that reset last-coding-system-used to the end of tramp-handle-write-region. Although, the let-binding around tramp-handle-file-attributes seem to be good in general, since file-attributes is normally not expected to modify last-coding-system-used. Stefan --zeoy.4IAUkgJy8.1epTry.EFy59o/-- --=-=-=--