Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!husc6!bunny!bs30 From: bs30@bunny.UUCP (Bernard Silver) Newsgroups: comp.lang.prolog Subject: Re: GNU vrs UNIPRESS Message-ID: <5880@bunny.UUCP> Date: 8 Jun 88 13:04:40 GMT References: <500@expya.UUCP> Reply-To: bs30@bunny.UUCP (Bernard Silver) Organization: GTE Laboratories, Waltham, MA Lines: 35 In article <500@expya.UUCP> jtr@exsb.cs.exeter.ac.uk (Jason Trenouth) writes: >Then the department began using the Sun-interfaced GNU Emacs and my troubles >were over. Yessiree, I'm a BORN AGAIN GNU lover. > >CONS: > > > No find definition power (Ouch this hurts!), and not linked to > debugger. It is fairly easy to make a find_definition function for emacs. You have to load an extra predicate into your prolog code but thats OK. Note that find_pred(Pred,Arity) :- current_predicate(Pred,Skel), functor(Skel,Pred,Arity), !, source_file(Skel,FileName) locates the file that pred is in (if it exists). The rest of the definition writes out the relevant commands for gnu to find that file and search for the predicate. These commands are written in a temp file that GNU automatically loads when the find definition command is issued. It works fine. If current_predicate fails, a GNU error message is written to the temp file. Compiling regions does have the problem that you mentioned (that GNU believes it comes from a different file) but this really isn't too much of a hassle. ( I turn the error detection off automatically when compiling regions. If Prolog complains when I load in the file (predicate previously defined in user) I can safely ignore this) Bernard