all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Cc: lennart.borgman.073@student.lu.se, emacs-devel@gnu.org
Subject: Re: copy-file: ok-if-already-exists versus mustbenew
Date: Tue, 16 May 2006 00:28:47 -0400	[thread overview]
Message-ID: <E1FfrAt-0007wW-1u@fencepost.gnu.org> (raw)
In-Reply-To: <200605151757.k4FHv4Ov014980@jane.dms.auburn.edu> (message from Luc Teirlinck on Mon, 15 May 2006 12:57:04 -0500 (CDT))

There are two meaningful non-nil settings for MUSTBENEW: `excl' and
anything else (such as t).

Using t seems to be more or less equivalent to specifying an integer
for OK_IF_ALREADY_EXISTS, but `excl' does something different: it
passes the flag to `open' which causes it to fail if the file exists.
That feature is used in `backup-buffer-copy'.

It would be easy to eliminate the special case for t, since that
does nothing new.  However, the `excl' case does something new.
I see two ways to eliminate it:

* Set the O_EXCL flag for OK_IF_ALREADY_EXISTS = `excl' instead.

* Set the O_EXCL flag when OK_IF_ALREADY_EXISTS is any symbol.

Does anyone see a problem with either of these?

      parent reply	other threads:[~2006-05-16  4:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-15 16:09 copy-file: ok-if-already-exists versus mustbenew Lennart Borgman
2006-05-15 17:57 ` Luc Teirlinck
2006-05-15 20:11   ` Lennart Borgman
2006-05-16  4:28   ` Richard Stallman [this message]

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=E1FfrAt-0007wW-1u@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=lennart.borgman.073@student.lu.se \
    /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.