* Bug 25.0: `parse-colon-path' deals with `//' diferently as unix systems
@ 2015-09-09 16:32 Tino Calancha
0 siblings, 0 replies; only message in thread
From: Tino Calancha @ 2015-09-09 16:32 UTC (permalink / raw)
To: emacs-orgmode; +Cc: C. Calancha
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/)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-09-09 16:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-09 16:32 Bug 25.0: `parse-colon-path' deals with `//' diferently as unix systems Tino Calancha
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).