From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.help Subject: Re: temporary file name, with a twist Date: Fri, 08 Sep 2006 08:30:44 +0200 Organization: Organization?!? Message-ID: <858xkuq38r.fsf@lola.goethe.zz> References: <1157643092.523576.197680@b28g2000cwb.googlegroups.com> <1157694775.190912.163280@i42g2000cwa.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1157697661 17949 80.91.229.2 (8 Sep 2006 06:41:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 8 Sep 2006 06:41:01 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 08 08:41:01 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GLa2r-0000a3-Um for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Sep 2006 08:40:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GLa2r-0001Ff-Dg for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Sep 2006 02:40:57 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsinpeer00.lnd.ops.eu.uu.net!bnewsinpeer00.bru.ops.eu.uu.net!emea.uu.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:PKDxwkgR64XGWqw6NVgjwwl9aDU= Original-Lines: 30 Original-NNTP-Posting-Date: 08 Sep 2006 08:31:57 CEST Original-NNTP-Posting-Host: f62c3c0b.newsspool4.arcor-online.net Original-X-Trace: DXC=JjI0e>Z7YNNI7\_^6>c20J4IUK\BH3YBi8b^WcBV6[NCV`H8_`hhQD^9QSCVg3dOFlR6Na 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:37223 Archived-At: nobrowser@gmail.com writes: > Reiner Steib wrote: >> On Thu, Sep 07 2006, nobrowser@gmail.com wrote: >> >> > in my lisp code, I need to get a unique temporary file name, but >> > _with a specific suffix_. >> >> `make-temp-file' or `make-temp-name'? >> > > Nope, that's what I started with. Doesn't do the suffix part. Emacs CVS has make-temp-file is a compiled Lisp function in `files.el'. (make-temp-file PREFIX &optional DIR-FLAG SUFFIX) Create a temporary file. The returned file name (created by appending some random characters at the end of PREFIX, and expanding against `temporary-file-directory' if necessary), is guaranteed to point to a newly created empty file. You can then use `write-region' to write new data into the file. If DIR-FLAG is non-nil, create a new empty directory instead of a file. If SUFFIX is non-nil, add that at the end of the file name. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum