Path: utzoo!attcan!uunet!mailrus!cs.utexas.edu!usc!apple!bbn!gateway!bucsf.UUCP!jbw From: jbw@bucsf.UUCP (Joe Wells) Newsgroups: comp.emacs Subject: Re: bug in substitute-in-file-name Message-ID: <48470@bbn.COM> Date: 19 Nov 89 06:31:37 GMT Sender: news@bbn.COM Reply-To: UNIX-EMACS@VM.TCS.Tulane.EDU Organization: BBN news/mail gateway Lines: 29 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