From: Michael Albinus <michael.albinus@gmx.de>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: Eli Zaretskii <eliz@gnu.org>,
Stefan Monnier <monnier@IRO.UMontreal.CA>,
emacs-devel@gnu.org
Subject: Re: master fails to build on FreeBSD when ACL support is on
Date: Sun, 21 Jan 2018 13:14:33 +0100 [thread overview]
Message-ID: <87tvvfflxy.fsf@gmx.de> (raw)
In-Reply-To: 5456c404-af18-7350-2e18-1683e7a14e85@cs.ucla.edu
Paul Eggert <eggert@cs.ucla.edu> writes:
Hi Paul,
> Michael Albinus wrote:
>> What about `make-nearby-temp-file'?
>
> When TARGET is relative and default-directory/TARGET is in a different
> file system from default-directory, I worried that
> (make-nearby-temp-file TARGET) would be worse than (make-temp-file
> (expand-file-name TARGET)) because it'd put the temp file into
> default-directory's file system, not into TARGET's file
> system.
I have a mounted directory on "/net/ford/albinus". I get:
--8<---------------cut here---------------start------------->8---
(let ((default-directory "/net/ford"))
(make-nearby-temp-file "albinus/foo"))
=> "/net/ford/albinus/fooDnIYRm"
(let ((default-directory "/net/ford"))
(make-temp-file (expand-file-name "albinus/foo")))
=> "/net/ford/albinus/foo8SyB9H"
--8<---------------cut here---------------end--------------->8---
So it is almost the same. However, it differs, if the function
`temporary-file-directory' got another implementation for the underlying
file system:
--8<---------------cut here---------------start------------->8---
(let ((default-directory "/sftp::~/"))
(make-nearby-temp-file "albinus"))
=> "/sftp:localhost:/tmp/albinustrjpRx"
(let ((default-directory "/sftp::~/"))
(make-temp-file (expand-file-name "albinus")))
=> "/sftp:localhost:/home/albinus/albinusOCUmTW"
--8<---------------cut here---------------end--------------->8---
It is the responsibility of the `make-nearby-temp-file' implementation
to respect file system boundaries. I don't claim it is bug-free,
especially in the Tramp case it might not be as careful as it should
be. To be tested.
> However, I didn't consider it all that carefully, and if you
> think it'd be better to use make-nearby-temp-file then by all means
> please improve the code (now in master, not in emacs-26).
I have no chance to test it somewhere but on GNU/Linux, so I feel
uncomfortable to provide such a patch.
Best regards, Michael.
next prev parent reply other threads:[~2018-01-21 12:14 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-16 4:20 master fails to build on FreeBSD when ACL support is on Joseph Mingrone
2018-01-16 17:06 ` Paul Eggert
2018-01-16 18:16 ` Eli Zaretskii
2018-01-18 23:40 ` Joseph Mingrone
2018-01-19 14:45 ` Eli Zaretskii
2018-01-19 14:59 ` Joseph Mingrone
2018-01-19 15:33 ` Eli Zaretskii
2018-01-19 16:38 ` Stefan Monnier
2018-01-19 18:45 ` Eli Zaretskii
2018-01-19 20:53 ` Stefan Monnier
2018-01-19 21:17 ` Glenn Morris
2018-01-21 1:04 ` Glenn Morris
2018-01-21 3:42 ` Paul Eggert
2018-11-14 23:12 ` Glenn Morris
2018-11-15 1:23 ` Paul Eggert
2018-11-15 14:48 ` Eli Zaretskii
2018-01-19 22:42 ` Paul Eggert
2018-01-20 7:52 ` Michael Albinus
2018-01-21 3:49 ` Paul Eggert
2018-01-21 12:14 ` Michael Albinus [this message]
2018-01-20 7:57 ` Eli Zaretskii
2018-01-20 20:47 ` Joseph Mingrone
2018-01-20 23:35 ` Joseph Mingrone
2018-01-21 3:41 ` Paul Eggert
2018-01-21 3:50 ` Stefan Monnier
2018-01-22 6:42 ` Paul Eggert
2018-01-22 14:11 ` Stefan Monnier
2018-01-21 15:53 ` Eli Zaretskii
2018-01-22 6:52 ` Paul Eggert
2018-01-22 15:52 ` Eli Zaretskii
2018-01-22 17:02 ` Paul Eggert
2018-01-22 17:41 ` Eli Zaretskii
2018-01-22 18:50 ` Paul Eggert
2018-01-22 20:32 ` Eli Zaretskii
2018-01-23 0:47 ` Paul Eggert
2018-01-21 15:56 ` Eli Zaretskii
2018-01-21 16:22 ` Joseph Mingrone
2018-01-20 7:46 ` Eli Zaretskii
2018-01-17 18:33 ` Ashish SHUKLA
2018-01-17 18:53 ` Joseph Mingrone
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=87tvvfflxy.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=eggert@cs.ucla.edu \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@IRO.UMontreal.CA \
/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.