lilypond-user
[Top][All Lists]
Advanced

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

Re: emacs question


From: Reinhold Kainhofer
Subject: Re: emacs question
Date: Wed, 10 Sep 2008 16:50:08 +0200
User-agent: KMail/1.9.10

Am Mittwoch, 10. September 2008 schrieb Johan Vromans:
> "James E. Bailey" <address@hidden> writes:
> > I just wish someone with a little elisp help could point me toward the
> > part of whichever file determines how the file is processed in emacs
> > so I could learn enough to be able to add " " to it.
>
> You'll find the code in lilypond-mode.el. It should be somewhere in
> your emacs list repository.
>
> The main culpit is function LilyPond-command. Everything is built as a
> string, and then executed. That simply implies that spaces in file
> names will break it.
>
> I could not find an easy point where quotes could be inserted,
> lilypond-mode tries hard to be smart, outsmarting me.

I suppose you'll need to insert the quotes in the command definitions in the 
LilyPond-command-alist starting at line 428...

In particular, notice that there are no quotes around the %s in all the 
commands:

;; This is the major configuration variable.
(defcustom LilyPond-command-alist
  ;; Should expand this to include possible keyboard shortcuts which
  ;; could then be mapped to define-key and menu.
  `(
    ("LilyPond" . (,(concat 
LilyPond-lilypond-command " %s") "%s" "%l" "View"))
    ("TeX" . ("tex '\\nonstopmode\\input %t'" "%t" "%d" "ViewDVI"))
    ("2Dvi" . (,(concat LilyPond-lilypond-command " -b 
tex %s") "%s" "%d" "LaTeX"))
    ("2PS" . (,(concat LilyPond-lilypond-command " -f 
ps %s") "%s" "%p" "ViewPS"))
    ("2Gnome" . (,(concat LilyPond-lilypond-command " -b gnome %s")))

    ("Book" . ("lilypond-book %x" "%x" "%l" "LaTeX"))
    ("LaTeX" . ("latex '\\nonstopmode\\input %l'" "%l" "%d" "ViewDVI"))

    ;; refreshes when kicked USR1
    ("View" . (,(concat LilyPond-pdf-command " %f")))
    ("ViewPDF" . (,(concat LilyPond-pdf-command " %f")))
    ("ViewDVI" . (,(concat LilyPond-dvi-command " %d")))
    ("ViewPS" . (,(concat LilyPond-ps-command " %p")))

    ;; The following are refreshed in LilyPond-command:
    ;; - current-midi depends on cursor position and
    ("Midi" . ("")) ; 
    ;; - all-midi depends on number of midi-score.
    ("MidiAll" . (""))
    )


I suppose you can either add quotes in these commands or add some code to 
escape spaces (and probably also ampersands, <, >, | and ") to the 
LilyPond-command-expand function starting at line 631...

Cheers,
Reinhold

-- 
------------------------------------------------------------------
Reinhold Kainhofer, Vienna University of Technology, Austria
email: address@hidden, http://reinhold.kainhofer.com/
 * Financial and Actuarial Mathematics, TU Wien, http://www.fam.tuwien.ac.at/
 * K Desktop Environment, http://www.kde.org, KOrganizer maintainer
 * Chorvereinigung "Jung-Wien", http://www.jung-wien.at/




reply via email to

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