[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [h-e-w] handling space in the path

From: Eli Zaretskii
Subject: Re: [h-e-w] handling space in the path
Date: Fri, 10 Oct 2008 10:01:21 +0200

> From: Guangran Zhu <address@hidden>
> Date: Fri, 10 Oct 2008 02:24:37 -0400
> Accept-Language: en-US
> acceptlanguage: en-US
> I am using GNU EMACS 22.3.1 on windows XP 32bit. I would like to associated 
> different file format, e.g. *.djvu with the right program to view it, e.g. 
> windjview.exe. When I press ENTER on the file name in the dired mode, the 
> file will be opened in the right program. I notice there is a lisp script 
> "extview.el" available. I placed it under emacs/site-lisp/. and in my 
> ".emacs" file, inserted this clause:
> (require 'extview)
> (push '("\\.djvu$" . "C:\\New Folder\\WinDjView-0.5.exe %s") 
> extview-application-associations)
> I received " Spawning child process: invalid argument" in the mini-buffer 
> when attempting to open a djvu file. If I write this clause:
> (push '("\\.djvu$" . "C:\\WinDjView-0.5.exe %s") 
> extview-application-associations)
> I am safe. My question is: How does this space make a difference in my emacs 
> to search the right file? How could I handle this space in the path?

Try this:

  (push '("\\.djvu$" . "\"C:\\New Folder\\WinDjView-0.5.exe\" %s") 

Explanation: The command that is the cdr of the association is passed
to the Windows API that invokes programs.  As you probably well know,
file names that include embedded blanks need to be quoted to signal
the OS that this whitespace does not end the file name.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]