From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: doc-view.el: make-directory Date: Fri, 14 Mar 2008 14:23:59 +0100 Message-ID: <87r6ed4exc.fsf@member.fsf.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1205501069 1313 80.91.229.12 (14 Mar 2008 13:24:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Mar 2008 13:24:29 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 14 14:24:58 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 1Ja9u4-000667-On for ged-emacs-devel@m.gmane.org; Fri, 14 Mar 2008 14:24:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ja9tV-0004GT-Gj for ged-emacs-devel@m.gmane.org; Fri, 14 Mar 2008 09:24:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ja9tG-0004BK-M8 for emacs-devel@gnu.org; Fri, 14 Mar 2008 09:24:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ja9tD-0004AA-Rr for emacs-devel@gnu.org; Fri, 14 Mar 2008 09:24:06 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ja9tD-0004A5-L2 for emacs-devel@gnu.org; Fri, 14 Mar 2008 09:24:03 -0400 Original-Received: from out2.smtp.messagingengine.com ([66.111.4.26]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ja9tD-0004hK-JL for emacs-devel@gnu.org; Fri, 14 Mar 2008 09:24:03 -0400 Original-Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id E59AFCCB90 for ; Fri, 14 Mar 2008 09:24:02 -0400 (EDT) Original-Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Fri, 14 Mar 2008 09:24:02 -0400 X-Sasl-enc: IFlm8/A9eFb8/KTjWkKf75vMEZB+MjJKXFw91jYAPqyO 1205501042 Original-Received: from localhost (dslb-084-063-020-027.pools.arcor-ip.net [84.63.20.27]) by mail.messagingengine.com (Postfix) with ESMTPA id C01A211F5F for ; Fri, 14 Mar 2008 09:24:01 -0400 (EDT) Mail-Followup-To: emacs-devel@gnu.org In-Reply-To: (Reiner Steib's message of "Thu, 13 Mar 2008 23:24:45 +0100") User-Agent: Gnus/5.110007 (No Gnus v0.7) 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:92544 Archived-At: Reiner Steib writes: >> --- doc-view.el 12 Mar 2008 15:26:48 -0000 1.56 >> +++ doc-view.el 13 Mar 2008 18:11:37 -0000 1.57 >> @@ -600,7 +600,8 @@ >> >> (defun doc-view-doc->txt (txt callback) >> "Convert the current document to text and call CALLBACK when done." >> - (make-directory (doc-view-current-cache-dir)) >> + (unless (file-exists-p (doc-view-current-cache-dir)) >> + (make-directory (doc-view-current-cache-dir))) > > Wouldn't using non-nil `parents' be a more simple solution? > > (make-directory (doc-view-current-cache-dir) t) Indeed. I'll change that tomorrow if nobody does it till then. Bye, Tassilo -- "Emacs is not a development tool but a way of life." - David Kastrup in alt.religion.emacs -