unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [Emacs-diffs] master a59839d: file-truename now uses realpath for local files
@ 2019-09-07  7:27 Eli Zaretskii
  2019-09-07  8:02 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Eli Zaretskii @ 2019-09-07  7:27 UTC (permalink / raw)
  To: Paul Eggert; +Cc: emacs-devel

Paul,

I had to revert this commit, as it had multiple issues:

 . It breaks the MS-Windows build, because there's no realpath (and we
   cannot use the Gnulib replacement, due to non-ASCII file names
   Gnulib doesn't support well on Windows).
 . Even when I modified file--truename to always signal an error on
   MS-Windows, Emacs wouldn't build, probably because the
   corresponding change in files.el has another mistake.  Did you test
   the build when realpath signals an error?
 . I don't think it's a good idea to favor GNU/Linux systems by
   punishing the rest.  We should have a better way than signaling an
   error on platforms where realpath doesn't work well enough.  And in
   any case, using Gnulib's realpath will not make file-truename
   faster on those other systems.
 . The code of file--truename incorrectly looked for the trailing
   slash ion the encoded file name, something you can only do reliably
   if the file-name encoding is UTF-8, because other encodings don't
   guarantee a single slash is never part of a multibyte sequence.
 . Last, but not least: there was no documentation of the new
   primitive.

For all of these reasons, I think we need to talk about the issue
before implementing it, and the implementation, if we will have one,
should resolve all of the problems mentioned above.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Emacs-diffs] master a59839d: file-truename now uses realpath for local files
  2019-09-07  7:27 [Emacs-diffs] master a59839d: file-truename now uses realpath for local files Eli Zaretskii
@ 2019-09-07  8:02 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2019-09-07  8:02 UTC (permalink / raw)
  To: eggert; +Cc: emacs-devel

> Date: Sat, 07 Sep 2019 10:27:05 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@gnu.org
> 
> For all of these reasons, I think we need to talk about the issue
> before implementing it, and the implementation, if we will have one,
> should resolve all of the problems mentioned above.

One possible solution would be to have file--truename bound only on
platforms which have the realpath function natively in their libc.
Then files.el could test that with fboundp.  I see no reason to
replace a loop in files.el by a loop in Gnulib's realpath emulation,
so we might as well not pretend realpath exists when it doesn't.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-09-07  8:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-07  7:27 [Emacs-diffs] master a59839d: file-truename now uses realpath for local files Eli Zaretskii
2019-09-07  8:02 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

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

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 read-only IMAP folder(s) and NNTP newsgroup(s).