🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.vm.bug
Article #382

Re: void-function locate-file error in 8.0.2

#382
From: blueman
Date: Thu, 16 Aug 2007 04:39
59 lines
3190 bytes
newsspam5REMOVETHIS@robf.de writes:
> blueman <NOSPAM@nospam.com> writes:
> > Just installed the Fedora rpm (8.0.2.482-4) for Fedora Core 6.
> >
> > Every time I try to vm-mail or vm-reply-to to an email I get the following
> > error:
> >
> > Debugger entered--Lisp error: (void-function locate-file)
> >   locate-file("bzr.exe" ("/usr/kerberos/bin" "/home/kosowsky/bin"
> >   "/usr/local/b$
> >   vm-version()
> >   vm-mail-internal(nil nil nil)
> >   vm-mail()
> > * call-interactively(vm-mail)
> >
> >
> > I am using emacs 21.4.1.
> > Is it possible that this is an xemacs function that is not found in
> > gnu emacs?
> 
> It is there in Emacs 22 and XEmacs, but not in Emacs 21
> 
> This error should not happen unless you are running a development
> version, i.e. if VM finds a .bzr directory in the directory ../
> relative to the vm.el source file, but then it also should not
> search for bzr ...
> 

Well, I am running emacs 21.4.1 which is the default version that
comes with Fedora Core 6 and I don't have any bzr directories.

I then went back and compared the binaries in 8.0.1 and 8.0.2 and I
believe I found the problem.

The function vm-version in 8.0.2, contains the following lines...
   (let* ((f (locate-library "vm"))
             (d (file-name-directory f))
             (b (get-buffer " *vm-version*"))
         (devo (file-exists-p (expand-file-name ".bzr" (concat d
             "../"))))
         (bzr (or (locate-file "bzr.exe" exec-path)
         ...

So, you see that the function "locate-file" is called ALL THE TIME,
independent of whether or not a 'bzr' directory exists.

In contrast, in 8.0.1, 'locate-file' is only called if the bzr
directory exists due to the following 'cond' statement:
        (cond ((and (file-exists-p (expand-file-name ".bzr" (concat d "../")))
            (locate-file "bzr" exec-path)


So, I believe that the code in 8.0.2 (and presumably also in your
newer versions) needs to be fixed so that locate-file is only called
if the .bzr directory exists.

I am surprised though that others have not run into this bug since it
should effect any user of emacs versions before 22 anytime they try to
actually compose an email.
Technical Details
Message-ID: <m2abssw0t0.fsf@consult.pretender>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!out04b.usenetserver.com!news.usenetserver.com!in02.usenetserver.com!news.usenetserver.com!cycny01.gnilink.net!spamkiller2.gnilink.net!gnilink.net!trndny04.POSTED!108bd143!not-for-mail
References: <m2absvxxo0.fsf@consult.pretender> <85tzr0zfb0.fsf@robf.de>

Show Full Headers
Complete Article Headers
X-Google-Thread: f6829,64fc8c61e7cca85
X-Google-Attributes: gidf6829,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!out04b.usenetserver.com!news.usenetserver.com!in02.usenetserver.com!news.usenetserver.com!cycny01.gnilink.net!spamkiller2.gnilink.net!gnilink.net!trndny04.POSTED!108bd143!not-for-mail
Newsgroups: gnu.emacs.vm.bug
Subject: Re: void-function locate-file error in 8.0.2
References: <m2absvxxo0.fsf@consult.pretender> <85tzr0zfb0.fsf@robf.de>
From: blueman <NOSPAM@nospam.com>
Message-ID: <m2abssw0t0.fsf@consult.pretender>
Lines: 59
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Thu, 16 Aug 2007 04:39:08 GMT
NNTP-Posting-Host: 71.184.120.81
X-Complaints-To: abuse@verizon.net
X-Trace: trndny04 1187239148 71.184.120.81 (Thu, 16 Aug 2007 00:39:08 EDT)
NNTP-Posting-Date: Thu, 16 Aug 2007 00:39:08 EDT