Xref: utzoo comp.emacs:7265 gnu.emacs.bug:1343 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!lll-winken!bu-cs!bucsb!bucsf!jbw From: jbw@bucsf.bu.edu (Joe Wells) Newsgroups: comp.emacs,gnu.emacs.bug Subject: Re: bug in substitute-in-file-name Message-ID: Date: 19 Nov 89 06:31:37 GMT References: <1319@sas.UUCP> Followup-To: gnu.emacs.bug Distribution: usa Organization: Boston University Computer Science Department Lines: 29 In-reply-to: sasdjb@sas.UUCP's message of 15 Nov 89 16:34:28 GMT In article <1319@sas.UUCP> sasdjb@sas.UUCP (David Biesack) writes: substitute-in-file-name does not work properly on Apollo Domain/OS GNU Emacs. The problem seems to occur when an environment variable contains a pathname which begins with //hostname, as shown in a log below: [stuff deleted] The substitution of $JJ causes a loss of the string up to the //javelin in the environment variable! The second substitute, with env var KK works properly. This is explained by the following comment taken from the source for substitute-in-file-name in src/fileio.c: /* If /~ or // appears, discard everything through first slash. */ Presumably, this is desirable behavior. I think the problem is that it is not well documented that substitute-in-file-name is intended to work on file names, not on strings in general. Congratulations on the first properly done bug report I've seen in a long time! -- Joe Wells jbw%bucsf.bu.edu@bu-it.bu.edu ...!harvard!bu-cs!bucsf!jbw