all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ken Brown <kbrown@cornell.edu>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: 32246@debbugs.gnu.org
Subject: bug#32246: 27.0.50; files-tests failure on Cygwin
Date: Thu, 26 Jul 2018 10:54:38 -0400	[thread overview]
Message-ID: <d776e3b7-e81a-bbbf-446c-a18af6ff0df8@cornell.edu> (raw)
In-Reply-To: <87fu06w16z.fsf@gmx.de>

On 7/26/2018 9:56 AM, Michael Albinus wrote:
> Michael Albinus <michael.albinus@gmx.de> writes:

Hi Michael,

> It looks that on cygwin, file-name-case-insensitive-p returns different
> values for existing and non-existing files:
> 
> --8<---------------cut here---------------start------------->8---
> M-! touch /tmp/foo
> 
> (file-name-case-insensitive-p "/tmp/foo")
> => nil
> 
> (file-name-case-insensitive-p "/tmp/bar")
> => t
> --8<---------------cut here---------------end--------------->8---

Right.  If the file doesn't exist, then the call to pathconf fails with 
ENOENT, as required by POSIX 
(http://pubs.opengroup.org/onlinepubs/009695299/functions/fpathconf.html). 
  The fallback code in file_name_case_insensitive_p then kicks in and 
returns true on Cygwin.

> The doc of file-name-case-insensitive-p does not require that FILENAME exists.

I think the doc is ambiguous on that.  The first sentence of the doc in 
the elisp manual says, "Sometimes file names or their parts need to be 
compared as strings, in which case it’s important to know whether the 
underlying filesystem is case-insensitive."  This certainly suggests 
that the file should exist, but there's no indication of what the 
function returns for a non-existent file.  And the code doesn't attempt 
to detect this case.

I don't know what the right solution is.

Thanks for tracking down the problem.

Best regards,

Ken





  reply	other threads:[~2018-07-26 14:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-22 18:10 bug#32246: 27.0.50; files-tests failure on Cygwin Ken Brown
2018-07-22 18:23 ` Michael Albinus
2018-07-23 17:01   ` Ken Brown
2018-07-25 12:00     ` Michael Albinus
2018-07-25 13:37       ` Ken Brown
2018-07-25 16:46         ` Michael Albinus
2018-07-25 16:56           ` Ken Brown
2018-07-25 17:33             ` Michael Albinus
2018-07-26 13:56               ` Michael Albinus
2018-07-26 14:54                 ` Ken Brown [this message]
2018-07-26 15:03                   ` Michael Albinus
2018-07-27 18:34                     ` Ken Brown
2018-07-27 19:30                       ` Michael Albinus
2018-07-27 20:30                         ` Ken Brown
2018-07-27 21:10                         ` Eli Zaretskii
2018-07-27 21:32                           ` Ken Brown
2018-07-27 21:34                             ` Ken Brown
2018-07-26 17:38                   ` Eli Zaretskii
2018-07-27 15:27                     ` Michael Albinus

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=d776e3b7-e81a-bbbf-446c-a18af6ff0df8@cornell.edu \
    --to=kbrown@cornell.edu \
    --cc=32246@debbugs.gnu.org \
    --cc=michael.albinus@gmx.de \
    /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.