emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Xi Shen <davidshen84@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: "Emacs-orgmode@gnu.org" <Emacs-orgmode@gnu.org>
Subject: Fwd: Request to support Cygwin in convert-standard-filename function
Date: Sun, 12 Jun 2016 10:33:50 +0000	[thread overview]
Message-ID: <CANO68EP=-4j4CzSF+x1KOZ9up=xcCvjWoagrpESj5BMyE5L_tA@mail.gmail.com> (raw)
In-Reply-To: <837fduhofh.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1972 bytes --]

Hi Nicolas,

So according to Emacs upstream developer Eli' reply, the current
`convert-standard-filename` function's result is as expected. Since the
Cygwin environment is defined as a "Posix" environment. In my patch, I was
trying to call a Windows command inside a Posix environment, and
intentionally pass a file path in Windows format. This is a very special
case, and should be taken care of individually.

So I think I will update my patch to add a `org-babel-sql-convert-filename`
function.


Thanks,
David


---------- Forwarded message ---------
From: Eli Zaretskii <eliz@gnu.org>
Date: Sun, Jun 12, 2016 at 3:10 PM
Subject: Re: Request to support Cygwin in convert-standard-filename function
To: Xi Shen <davidshen84@gmail.com>
Cc: <emacs-devel@gnu.org>


> From: Xi Shen <davidshen84@gmail.com>
> Date: Sun, 12 Jun 2016 02:51:14 +0000
>
> I encounter a problem with `convert-standard-filename`,
>
https://www.gnu.org/software/emacs/manual/html_node/elisp/Standard-File-Names.html.
I call this function
> within a Cygwin environment, and this function could not return me a
MS-DOS/Windows format path. I think it
> treats Cygwin environment as a normal *nix environment.
>
> In Cygwin environment, the Emacs has a function called
`cygwin-convert-file-name-to-windows` which
> converts a expanded path to a Windows path, e.g.:
>
> /cygdrive/c/Windows => c:\Windows
>
> According to the description of the `convert-standard-filename`, it is
expected to be used only in places where
> the callee wants to convert a *nix path to the underline OS path. I think
it is appropriate we invoke the
> `cygwin-convert-file-name-to-windows` function inside the
`convert-standard-filename` function if it is called
> within a Cygwin environment.

Yes, Cygwin is a Posix environment, and convert-standard-filename is
documented to be a no-op in such an environment.

For the conversion you need, you can call
cygwin-convert-file-name-to-windows directly.
-- 

Thanks,
David S.

[-- Attachment #2: Type: text/html, Size: 2861 bytes --]

       reply	other threads:[~2016-06-12 10:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CANO68EP9x5eOr=KA7rocOgOeUZnNrbP+D4ZeqZrVryedreV90w@mail.gmail.com>
     [not found] ` <837fduhofh.fsf@gnu.org>
2016-06-12 10:33   ` Xi Shen [this message]
2016-06-12 11:32     ` Fwd: Request to support Cygwin in convert-standard-filename function Nicolas Goaziou

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.orgmode.org/

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

  git send-email \
    --in-reply-to='CANO68EP=-4j4CzSF+x1KOZ9up=xcCvjWoagrpESj5BMyE5L_tA@mail.gmail.com' \
    --to=davidshen84@gmail.com \
    --cc=Emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).