From: Tino Calancha <f92capac@gmail.com>
To: emacs-orgmode@gnu.org
Cc: "C. Calancha" <f92capac@gmail.com>
Subject: Bug 25.0: `parse-colon-path' deals with `//' diferently as unix systems
Date: Thu, 10 Sep 2015 01:32:43 +0900 (JST) [thread overview]
Message-ID: <alpine.LRH.2.20.1509100130050.17026@calancha-ilc.kek.jp> (raw)
Current implementation use `substitute-in-file-name' which substitute environment variables; that
function deal with '//' differently as expected on unix systems:
In unix systems there is no difference between:
I) /foo//bar/baz
II) /foo/bar/baz
but `substitute-in-file-name' will translate I) into:
/bar/baz
I found more sensible if 'parse-colon-path' would made no difference
between I) and II).
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
In *scratch* buffer after started session with:
emacs -Q
(let ((foo "/home/user/soft/bin/:/usr/bin/:/usr/local/bin"))
(setenv "FOO" foo)
(parse-colon-path "$FOO"))
("/home/user/soft/bin/:/usr/bin/:/usr/local/bin/")
(let ((foo "/home/user/soft/bin/:/usr/bin/:usr/local/bin/"))
(setenv "FOO" foo)
(parse-colon-path "$FOO"))
("/")
(let ((foo "/home/user/soft//bin/:/usr/bin/:/usr/local/bin"))
(setenv "FOO" foo)
(parse-colon-path "$FOO"))
("/bin/:/usr/bin/:/usr/local/bin/")
(let ((foo "/home/user/soft//bin/:/usr/bin/:/usr/local/bin/"))
(setenv "FOO" foo)
(parse-colon-path "$FOO"))
("/")
(let ((foo "/home/user/soft/bin/:/usr/bin/"))
(setenv "FOO" foo)
(parse-colon-path (getenv "FOO")))
("/home/user/soft/bin/" "/usr/bin/")
(let* ((foo "/home/user")
(bar "$FOO/soft/bin/:/usr/bin/"))
(setenv "FOO" foo)
(setenv "BAR" bar)
(parse-colon-path (getenv "BAR")))
("/home/user/soft/bin/" "/usr/bin/")
(let* ((foo "/home/user/")
(bar "$FOO/soft/bin/:/usr/bin/"))
(setenv "FOO" foo)
(setenv "BAR" bar)
(parse-colon-path (getenv "BAR")))
("/soft/bin/" "/usr/bin/")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Emacs : GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw scroll bars)
of 2015-09-06
Package: Org-mode version 8.2.10 (release_8.2.10 @ /home/calancha/tmp/emacs_git/emacs/lisp/org/)
reply other threads:[~2015-09-09 16:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=alpine.LRH.2.20.1509100130050.17026@calancha-ilc.kek.jp \
--to=f92capac@gmail.com \
--cc=emacs-orgmode@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.
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).