[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mysterious file-error
- From: Katsumi Yamaoka <yamaoka@xxxxxxx>
- Date: Fri, 01 Jul 2005 16:53:13 +0900
- X-ml-name: emacs-w3m
- X-mail-count: 08222
- References: <br5negt5.fsf@Guido@VanHoecke.org> <firstname.lastname@example.org><fyuz9ek2.fsf@Guido@VanHoecke.org>
>>>>> In [emacs-w3m : No.08221] Guido Van Hoecke wrote:
> Just did a C-h f for file-executable-p:
> `file-executable-p' is a built-in function
> (file-executable-p FILENAME)
> Return t if FILENAME can be executed by you.
> For a directory, this means you can access files in that directory.
> This means that as far as XEmacs is concerned, the behaviour is
> correct and should report t.
> So this is really a bug inside emacs-w3m.
Ouch! I confirmed it is the same in Emacs as well. Thank you
for pointing it out. I've fixed the w3m-which-command function
in the CVS repository. The following patch is for v1.4.4 (you
need to rebuild emacs-w3m after applying it).
--- w3m-util.el~ 2005-03-22 08:05:20 +0000
+++ w3m-util.el 2005-07-01 07:49:36 +0000
@@ -778,10 +778,11 @@
(dolist (dir exec-path)
- (when (or (file-executable-p
- (setq bin (expand-file-name command dir)))
- (setq bin (expand-file-name (concat command ".exe") dir))))
+ (setq bin (expand-file-name command dir))
+ (when (or (and (file-executable-p bin)
+ (not (file-directory-p bin)))
+ (and (file-executable-p (setq bin (concat bin ".exe")))
+ (not (file-directory-p bin))))
(throw 'found-command bin))))))))
(defun w3m-cancel-refresh-timer (&optional buffer)