Gnus development mailing list
 help / color / mirror / Atom feed
From: Daniel Pittman <daniel@rimspace.net>
Subject: Re: Q: Use external editor for Gnus?
Date: Sun, 28 Oct 2001 20:37:22 +1100	[thread overview]
Message-ID: <87ofms2jhp.fsf@inanna.rimspace.net> (raw)
In-Reply-To: <87bsis7l6y.fsf@deneb.enyo.de> (Florian Weimer's message of "Sun, 28 Oct 2001 00:49:25 +0200")

On Sun, 28 Oct 2001, Florian Weimer wrote:
> Daniel Pittman <daniel@rimspace.net> writes:
> 
>>   (let ((filename (make-temp-name "silly.vi.user."))
>> 	(message  (current-buffer)))
>>     (with-temp-buffer filename
> 
> This code results in a nasty /tmp race.  

Creates a nasty race in the current working directory of Emacs,
actually, unless `make-temp-name' is different under Emacs than XEmacs.

> You should use 'make-temp-file' instead, or create a subdirectory in
> which you store the file.

It's not portable, nor is the FFI interface. :)  Seriously, though, even
the almost-latest XEmacs doesn't support `make-temp-file', which means
that I would need to emulate it...

Creating a directory in a world-writable folder wouldn't help. I really
should have done:

(let ((filename (expand-file-name (make-temp-name "silly.vi.user.") "~/")))
  ...

That would ensure that one of two things are true:
1) The rest of the world can't write the area the file is in.
2) The rest of the world can write '.emacs'[1], which means the user is
   losing anyway...

        Daniel

Footnotes: 
[1]  ...or .profile, or...

-- 
Show me a sane man and I will cure him for you.
        -- Carl Jung



  reply	other threads:[~2001-10-28  9:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-22 21:07 Kai Großjohann
2001-10-23  2:44 ` Daniel Pittman
2001-10-23  8:12   ` Kai Großjohann
2001-10-23  8:52     ` Daniel Pittman
2001-10-27 22:49       ` Florian Weimer
2001-10-28  9:37         ` Daniel Pittman [this message]
2001-10-23 13:53     ` Samuel Padgett
2001-10-23 15:03       ` Kai Großjohann
2001-10-24  2:30         ` Samuel Padgett

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=87ofms2jhp.fsf@inanna.rimspace.net \
    --to=daniel@rimspace.net \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).