Article View: gnu.emacs.bug
Article #98745VMS Bug fix in fileio.c (find-file-noselect): translation of "~"
From: Roland B Roberts
Date: Thu, 04 Apr 1991 08:42
Date: Thu, 04 Apr 1991 08:42
62 lines
2416 bytes
2416 bytes
I've encountered a bug in find-file-noselect on VMS.
I'm bringing up a 18.57 on a new system where I don't have a .emacs
yet. After typing ESC ESC, and telling enable-command that I really
did want to do this, it created a file `SYS$LOGIN.EMACS' in the
current directory, rather than `SYS$LOGIN:.EMACS'.
The error has showed up before, but I never tracked it down. It was
always associated with translating "~" into my home directory.
The problem could be blamed on egetenv which translates HOME as
SYS$LOGIN. From my viewpoint, that's a null translation.
I #ifdef'd a call to getenv("SYS$LOGIN") for VMS as the simplest fix.
This now works (I'm using it now).
Here are context diff's to fileio.c.
roland
--
Roland B Roberts, University of Rochester BITNET: roberts@uornsrl.bitnet
Nuclear Structure Research Laboratory INTERNET: rbr4@troi.cc.rochester.edu
271 East River Road UUCP: ..rochester!ur-cc!troi!rbr4
Rochester, NY 14627 AT&T: (716) 275-8962
*** fileio.c;1
--- fileio.c
**************
*** 593,598
|| nm[1] == 0)
{
/* Handle ~ on its own. */
newdir = (unsigned char *) egetenv ("HOME");
}
else
--- 593,601 -----
|| nm[1] == 0)
{
/* Handle ~ on its own. */
+ #ifdef VMS
+ newdir = (unsigned char *) getenv ("SYS$LOGIN");
+ #else
newdir = (unsigned char *) egetenv ("HOME");
#endif
}
**************
*** 594,599
{
/* Handle ~ on its own. */
newdir = (unsigned char *) egetenv ("HOME");
}
else
{
--- 597,603 -----
newdir = (unsigned char *) getenv ("SYS$LOGIN");
#else
newdir = (unsigned char *) egetenv ("HOME");
+ #endif
}
else
{
Technical Details
Message-ID:
<96487D75DBFF81E983@DBV>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!stanford.edu!agate!ucbvax!tut.cis.ohio-state.edu!unreplyable!garbageShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,55b52af1dd066c89,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1991-04-04 00:42:00 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!stanford.edu!agate!ucbvax!tut.cis.ohio-state.edu!unreplyable!garbage From: RBR4@DB1.CC.ROCHESTER.EDU (Roland B Roberts) Newsgroups: gnu.emacs.bug Subject: VMS Bug fix in fileio.c (find-file-noselect): translation of "~" Message-ID: <96487D75DBFF81E983@DBV> Date: 4 Apr 91 08:42:00 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 62 Approved: bug-gnu-emacs@prep.ai.mit.edu