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: Re: ange-ftp-file-size Date: Sat, 17 Oct 2009 22:03:06 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1255831414 7296 80.91.229.12 (18 Oct 2009 02:03:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 18 Oct 2009 02:03:34 +0000 (UTC) Cc: emacs-devel@gnu.org To: Toru TSUNEYOSHI Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 18 04:03:26 2009 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 1MzL7E-0002mT-Oj for ged-emacs-devel@m.gmane.org; Sun, 18 Oct 2009 04:03:25 +0200 Original-Received: from localhost ([127.0.0.1]:42959 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MzL7D-0001xa-KC for ged-emacs-devel@m.gmane.org; Sat, 17 Oct 2009 22:03:23 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MzL78-0001wy-TR for emacs-devel@gnu.org; Sat, 17 Oct 2009 22:03:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MzL74-0001wN-DO for emacs-devel@gnu.org; Sat, 17 Oct 2009 22:03:18 -0400 Original-Received: from [199.232.76.173] (port=40564 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MzL74-0001wK-BE for emacs-devel@gnu.org; Sat, 17 Oct 2009 22:03:14 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:16625 helo=ironport2-out.pppoe.ca) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MzL73-0001Fn-Q3 for emacs-devel@gnu.org; Sat, 17 Oct 2009 22:03:13 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqEEAPcT2krO+IKD/2dsb2JhbACBUdV9hDEEgVuGKg X-IronPort-AV: E=Sophos;i="4.44,579,1249272000"; d="scan'208";a="47750219" Original-Received: from 206-248-130-131.dsl.teksavvy.com (HELO pastel.home) ([206.248.130.131]) by ironport2-out.pppoe.ca with ESMTP; 17 Oct 2009 22:03:12 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id C6F0A7FD5; Sat, 17 Oct 2009 22:03:06 -0400 (EDT) In-Reply-To: (Toru TSUNEYOSHI's message of "Sat, 17 Oct 2009 11:21:36 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: 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:116215 Archived-At: >> Now that I look at it: isn't it problematic to set the mode to `ascii' >> here? If the mode was binary before and we call it with ascii-mode=nil, >> we end up switching to ascii mode unwittingly, don't we? > I read the code of `ange-ftp.el'. > The follows is written... > In comments: > By default ange-ftp transfers files in ASCII mode. > In code: > (defun ange-ftp-... > ... > (unwind-protect > (progn > ... > (if binary > (ange-ftp-set-binary-mode host user)) > ...) > (if binary > (ange-ftp-set-ascii-mode host user))) > ...) > So, I understood that `ASCII mode' is basic mode. > I wrote after the style. > (In my former patch, I should have used `unwind-protect'.) OK, thanks, I've changed the prog2 to an unwind-protect. Stefan