unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Eli Zaretskii <eliz@gnu.org>
Cc: guile-devel@gnu.org
Subject: Re: Windows file name separators
Date: Thu, 03 Jul 2014 19:11:41 +0200	[thread overview]
Message-ID: <87lhsa2wqa.fsf@gnu.org> (raw)
In-Reply-To: <83d2dm32cb.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 03 Jul 2014 18:10:28 +0300")

Eli Zaretskii <eliz@gnu.org> skribis:

>> From: ludo@gnu.org (Ludovic Courtès)
>> Cc: guile-devel@gnu.org
>> Date: Wed, 02 Jul 2014 22:57:41 +0200
>> 
>> Eli Zaretskii <eliz@gnu.org> skribis:
>> 
>> >> From: ludo@gnu.org (Ludovic Courtès)
>> >> Cc: guile-devel@gnu.org
>> >> Date: Tue, 01 Jul 2014 17:38:04 +0200
>> 
>> [...]
>> 
>> >> You can look at load.c, and in particular scm_init_load_path.
>> >
>> > OK, thanks for the pointer.
>> >
>> > I've reviewed the related code, and below is what I suggest to push.
>> > (This supersedes what I sent in
>> > http://lists.gnu.org/archive/html/guile-devel/2014-06/msg00066.html.)
>> 
>> Also, could you add tests for that?  Namely, a ‘search-path’ use that
>> currently returns a file name with backslashes, and will now return a
>> file name with forward slashes.
>
> Is the below OK?

Looks good to me, OK to push.

[...]

> --- test-suite/tests/ports.test~2	2014-06-29 16:06:51 +0300
> +++ test-suite/tests/ports.test	2014-07-03 10:55:30 +0300
> @@ -1866,6 +1865,17 @@
>      (with-fluids ((%file-port-name-canonicalization 'absolute))
>        (port-filename (open-input-file (%search-load-path "ice-9/q.scm"))))))
>  
> +(with-test-prefix "file name separators"
> +
> +  (pass-if "no backslash separators in Windows file names"
> +    ;; In Guile 2.0.11 and earlier, %load-path on Windows could
> +    ;; include file names with backslashes, and `getcwd' on Windows
> +    ;; would always return a directory name with backslashes.
> +    (or (not (file-name-separator? #\\))
> +	(with-load-path (cons (getcwd) %load-path)
> +	  (not (string-index (%search-load-path (basename (test-file)))
> +			     #\\))))))

No tabs in Scheme files please (if you use Emacs, there’s a
.dir-locals.el that should set it up correctly.)

Thanks!

Ludo’.



  reply	other threads:[~2014-07-03 17:11 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-08 15:04 MinGW issues in Guile 2.0.11 Eli Zaretskii
2014-06-09 15:47 ` Eli Zaretskii
2014-06-09 18:01 ` Mark H Weaver
2014-06-09 18:25   ` Eli Zaretskii
2014-06-09 19:30 ` MinGW vs. setlocale Ludovic Courtès
2014-06-10 16:17   ` Eli Zaretskii
2014-06-11 13:13     ` Ludovic Courtès
2014-06-11 15:33       ` Eli Zaretskii
2014-06-12  8:39         ` Ludovic Courtès
2014-06-12 18:18           ` Eli Zaretskii
2014-06-15 17:23             ` Eli Zaretskii
2014-06-21 11:17               ` Eli Zaretskii
2014-06-21 15:02               ` Ludovic Courtès
2014-06-21 15:11                 ` Eli Zaretskii
2014-06-21 21:23                   ` Ludovic Courtès
2014-06-22 16:13                     ` Eli Zaretskii
2014-06-19  4:53       ` Doug Evans
2014-06-19  8:16         ` Ludovic Courtès
2014-06-09 19:32 ` MinGW vs. c-api.test Ludovic Courtès
2014-06-10  9:05   ` Neil Jerram
2014-06-10 11:42     ` Ludovic Courtès
2014-06-10 15:32     ` Eli Zaretskii
2014-06-10 15:56       ` David Kastrup
2014-06-10 18:00         ` Eli Zaretskii
2014-06-11  0:36           ` dsmich
2014-06-11  2:52             ` Eli Zaretskii
2014-06-10 11:44   ` Ludovic Courtès
2014-06-10 15:39     ` Eli Zaretskii
2014-06-11 12:37       ` Ludovic Courtès
2014-06-11 15:08         ` Eli Zaretskii
2014-06-12  8:29           ` Ludovic Courtès
2014-06-12 17:16             ` Eli Zaretskii
2014-06-12 19:48               ` Ludovic Courtès
2014-06-12 19:59                 ` Eli Zaretskii
2014-06-12 21:20                   ` Ludovic Courtès
2014-06-13  9:15                     ` Neil Jerram
2014-06-13 16:04                       ` Ludovic Courtès
2014-06-13 16:19                         ` Eli Zaretskii
2014-06-13 16:26                           ` Neil Jerram
2014-06-13 16:31                         ` Mike Gerwitz
2014-06-13 18:09                           ` Eli Zaretskii
2014-06-09 19:42 ` Windows file name separators Ludovic Courtès
2014-06-10 16:00   ` Eli Zaretskii
2014-06-30 11:15     ` Ludovic Courtès
2014-06-30 14:56       ` Eli Zaretskii
2014-07-01  9:36         ` Ludovic Courtès
2014-07-01 15:30           ` Eli Zaretskii
2014-07-01 15:38             ` Ludovic Courtès
2014-07-02 16:04               ` Eli Zaretskii
2014-07-02 20:56                 ` Ludovic Courtès
2014-07-02 20:57                 ` Ludovic Courtès
2014-07-03 15:10                   ` Eli Zaretskii
2014-07-03 17:11                     ` Ludovic Courtès [this message]
2014-07-03 18:09                       ` Eli Zaretskii
2014-07-07 20:53                         ` Mark H Weaver
2014-07-08  2:37                           ` Eli Zaretskii
2014-07-02 16:13               ` Fix 'dirname' and 'basename' on MS-Windows Eli Zaretskii
2014-07-09 14:22                 ` Ludovic Courtès
2014-07-09 14:53                   ` Eli Zaretskii
2014-07-02 16:16               ` Provide reasonable stack limit " Eli Zaretskii
2014-07-02 21:02                 ` Ludovic Courtès
2014-07-03 16:28                   ` Eli Zaretskii
2014-07-02 16:30               ` Bug in scm_getaffinity Eli Zaretskii
2014-07-02 21:04                 ` Ludovic Courtès
2014-07-03 16:31                   ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lhsa2wqa.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=eliz@gnu.org \
    --cc=guile-devel@gnu.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).