all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Subject: Re: temporary file name, with a twist
Date: Fri, 08 Sep 2006 08:30:44 +0200	[thread overview]
Message-ID: <858xkuq38r.fsf@lola.goethe.zz> (raw)
In-Reply-To: 1157694775.190912.163280@i42g2000cwa.googlegroups.com

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

  reply	other threads:[~2006-09-08  6:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-07 15:31 temporary file name, with a twist nobrowser
2006-09-07 16:20 ` Miles Bader
     [not found] ` <mailman.6588.1157646012.9609.help-gnu-emacs@gnu.org>
2006-09-07 16:33   ` nobrowser
2006-09-07 18:16 ` Reiner Steib
2006-09-08  5:52   ` nobrowser
2006-09-08  6:30     ` David Kastrup [this message]
2006-09-08  7:05     ` Reiner Steib
2006-09-08 13:24       ` nobrowser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=858xkuq38r.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.