Subject: bug#10340: 24.0.91; Error when using LilyPond-command-view (lilypond-mode.el) on Win7

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

> Date: Wed, 21 Dec 2011 11:27:42 +0100
> From: Thorsten NaN <[email-masked]>
> 
> I get an error when I use C-c C-s (LilyPond-command-view) on a .ly file
> in a buffer in lilypond-mode (version 2.5.20).
> 
> See my Stackoverflow question for more info:
> http://stackoverflow.com/questions/8566045/emacs-lisp-problems-with-filename-string-on-win7
> 
> Recipe:
> runemacs
> C-x C-f ~/.emacs.d/org/projects/sandbox/2test.ly
> C-c C-l (LilyPond-command-lilypond)
> C-c C-s (LilyPond-command-view)
> 
> Acrobat Readers starts, but gives an error message (... file can't be
> found...). In the *Maven Compile* buffer I find:
> 
> -*- mode: compilation; default-directory:
> "~/.emacs.d/org/projects/sandbox/" -*-
> Compilation started at Wed Dec 21 10:59:52
> AcroRd32 "c:/Users/tj2/.emacs.d/org/projects/sandbox/2test".pdf
> Compilation exited abnormally with code 1 at Wed Dec 21 11:00:03
> 
> The problem is in the way the file-name string is constructed. The second
> double-quote in the string should be at the very end of the string
> (.pdf"), or there should be no double-quotes at all.
> 
> I use openwith.el, but when deactivating openwith-mode, I get exactly
> the same error. The problem seems to be in files.el, but I'm not sure,
> might be lilypond specific too.
> 
> With M-x toggle-debug-on-error on, the debugger is not triggered by this,
> the problem is a badly constructed file-name string given to AcroRd32.

Same problem, same answer: it's a bug in openwith.el.

Don't deactivate it, start a new Emacs session without loading
openwith.el (comment out its invocation in your .emacs), and then try
visiting a .ly file.