Subject: bug#10339: 24.0.91; Error opening pdf-file in dired using openwith-mode (win7)

From: Eli Zaretskii <[email-masked]>
Date: Wed, 21 Dec 2011 07:14:42 -0500

> Date: Wed, 21 Dec 2011 10:45:04 +0100
> From: Thorsten NaN <[email-masked]>
> 
> Emacs 24 is great, but using openwith version 0.8f, downloaded from
> http://web.student.tuwien.ac.at/~e0225855/misc/openwith.el
> I get an error when opening a pdf file in dired.
> 
> See my Stackoverflow question for more info:
> http://stackoverflow.com/questions/8566045/emacs-lisp-problems-with-filename-string-on-win7
> 
> Recipe:
> emacs -Q
> C-x d ~/.emacs.d/site-lisp/
> L (with point on openwith.el)
> C-x d ~/.emacs.d/org/projects/sandbox/ ;just an arbitrary pdf file
> f (with point on 2test.pdf)
> 
> With M-x toggle-debug-on-error I get:
> Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
>   file-truename(nil)
>   find-file-noselect-1(#<buffer 2test.pdf<2>>
> "~/.emacs.d/org/projects/sandbox/2test.pdf" nil nil
> "~/.emacs.d/org/projects/sandbox/2test.pdf" ((3328 6 . 23491) (16087 .
> 35227)))
>   find-file-noselect("c:/Users/tj2/.emacs.d/org/projects/sandbox/2test.pdf"
> nil nil nil)
>   find-file("c:/Users/tj2/.emacs.d/org/projects/sandbox/2test.pdf")
>   dired-find-file()
>   call-interactively(dired-find-file nil nil)

I think it's a bug in openwith.el: it doesn't set buffer-file-name,
which find-file-noselect-1 needs.