delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/02/25/17:12:47

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-transfer-encoding
:mime-version; q=dns; s=default; b=DmQGjtrJbO4cT/Lo3anBsIlUl106p
oZOb58Knat2deysxb82XtxeRdAAfMvqlj0Lt6hACydl1Ai5Hi9liZlbpNtdSubtV
U2/tfWW9fFtFXcKfX2zii2ERqTTc7ccfEf5tUA1G907uzbeGhqRD6H0tkHSeWNR/
qhcjRvEr6p3Eg4=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-transfer-encoding
:mime-version; s=default; bh=Gk0SXwGXq4ibOkZoF4fuB29oIG4=; b=kS+
SM6rGzNT6vrOpTxrjq8ot4SB8/EkWcwe/kWicO66U5FSTZTEit4QUYbNJA8HEWAs
WkWfY5JkZHgh1VAR9ruz6zr3SGauha+yPQkqH7h2hPAd3C25H04ya5R7C5ZFS+Gk
RoTnb2FioY+W5j8c0HJeN50+uaiIUkAR/vjM8wu8=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,MIME_BASE64_BLANKS,SPF_PASS autolearn=ham version=3.3.2 spammy=stranger, Want, fighting
X-HELO: mx0b-002fa001.pphosted.com
From: "Taylor, Kit" <ktaylor AT hvac DOT mea DOT com>
To: L A Walsh <cygwin AT tlinx DOT org>, "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: RE: vim 64 conflict with windows slash and swapfile
Date: Mon, 25 Feb 2019 22:10:06 +0000
Message-ID: <BC7744E4F0B5814F8580C8C80E4356D1B41D63@excdag03.meus.corp>
References: <BC7744E4F0B5814F8580C8C80E4356D1B4187A AT excdag03 DOT meus DOT corp> <5C74655E DOT 9080500 AT tlinx DOT org>
In-Reply-To: <5C74655E.9080500@tlinx.org>
MIME-Version: 1.0
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id x1PMCkJs018803

Thanks for the response.  My curiosity about it was that 32-bit vim works fine, only 64-bit vim shows the problem (both same version, of course).
Even stranger, it doesn't happen every time.

My guess is there is an embedded path internally, which uses a separator, and the 32-bit one either does not include that path, or handles it differently.
As I say, I can live with it.  Was just hoping for an easy config fix.

I'm familiar with the path separators - been fighting that since the late 80s.  My bad for using Cygwin apps from the Windows command line, but there are compatibility issues otherwise...

Thanks.
Kit

-----Original Message-----
From: L A Walsh [mailto:cygwin AT tlinx DOT org] 
Sent: Monday, February 25, 2019 5:00 PM
To: cygwin AT cygwin DOT com; Taylor, Kit <ktaylor AT hvac DOT mea DOT com>
Subject: Re: vim 64 conflict with windows slash and swapfile

On 2/20/2019 8:28 AM, Taylor, Kit wrote:
> Don't know if this is a VIM bug or CYGWIN bug.  Probably something I have configured incorrectly.
>
> I just cut over to Cygwin 64-bit, on Windows 10, VIM 8.0, Windows command line (not bash).
> When opening a file to edit, using back slashes in the path, VIM warns "unable to open swapfile".  

I'm not sure why it would be prevented from creating a .FILENAME.swp, but paths in cygwin (and linux and posix) use '/'.  Internally at the NT level, many of the windows libraries, '/' is accepted.  The same may not be true of all windows libraries.  However, you should use the '/' delimiter for the cygwin version of vim. 

Note, '\' is a character in linux/posix/cygwin meaning to quote the next character.  So an unquoted or double quote string will get rid of the backslashes and produce a decoded output.

If you are in bash and want to use '\', you need to either double the backslashes (thus quoting the '\') or put the whole string in single quotes.

From the bash manpage:
backslash-escaped characters replaced as specified by the
       ANSI C standard.  Backslash escape sequences, if present,  are decoded
       as follows:
              \a     alert (bell)
              \b     backspace
              \e
              \E     an escape character
              \f     form feed
              \n     new line
              \r     carriage return
              \t     horizontal tab
              \v     vertical tab
              \\     backslash
              \'     single quote
              \"     double quote
              \?     question mark
              \nnn   the  eight-bit  character  whose value is the octal
value
                     nnn (one to three digits)
              \xHH   the eight-bit character whose value  is  the 
hexadecimal
                     value HH (one or two hex digits)
              \uHHHH the  Unicode (ISO/IEC 10646) character whose value is the
                     hexadecimal value HHHH (one to four hex digits)
              \UHHHHHHHH
                     the Unicode (ISO/IEC 10646) character whose value is  the
                     hexadecimal value HHHHHHHH (one to eight hex digits)
              \cx    a control-x character
--------

> Swap file is not, in fact, created.
>   
Depending on the filename, if it contained any of the above escape sequences, they'd be replaced with their indicated decoding.

> Not a large bug, but a nuisance.  Thanks.
>   
---
    Want to talk about nuisances...

    Bill Gates changed the file-system object separator from '/' to '\' so that DOS would look less like CP/M -- a competing micro OS at the time that copied the use of '/' from unix.  He was trying to avoid the impression that he got the idea of using '/' to delineate file system hierarchy as there was more concern about lawsuits by some companies in "look-alike" interfaces. 

    Example: Apple, besides suing MS for its "Recycling Bin" as Apple had a trashbin on their desktop with similar functionality also sued some companies producing "lookalikes (Franklin) out of business.

    Apple eventually lost their lawsuit against MS as interfaces became "uncopyrightable", while it was pointed out that Apple had stolen many of its GUI concepts from Xerox who invented and used them first -- and had demoed them to Wozniak and Jobs.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019