lilypond-devel
[Top][All Lists]
Advanced

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

Re: How to debug/play with scheme code?


From: Nicolas Sceaux
Subject: Re: How to debug/play with scheme code?
Date: Sun, 07 Mar 2004 15:50:28 +0100
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Mon, 01 Mar 2004 20:43:55 +0100, Nicolas a dit : 

 >> try #(top-repl)

 > there is a place for an emacs command that would launch that, with I/Os in a
 > buffer with ilisp-mode or so, which would enable symbol completion...


The following command definition should do it (requires ilisp):

(defun LilyPond-guile ()
  (interactive)
  (require 'ilisp)
  (guile "lilyguile" (LilyPond-command-expand (cadr (assoc "2Dvi" 
LilyPond-command-alist))
                                              (funcall 'LilyPond-master-file)))
  (comint-default-send (ilisp-process) "(define-module (*anonymous-ly-1*))")
  (comint-default-send (ilisp-process) "(set! %load-path (cons 
\"/usr/share/ilisp/\" %load-path))")
  (comint-default-send (ilisp-process) "(use-modules (guile-user) 
(guile-ilisp))")
  (comint-default-send (ilisp-process) "(newline)"))

and, for instance:

(eval-after-load "lilypond-mode"
  '(progn
     (define-key LilyPond-mode-map "\C-cg" 'LilyPond-guile)
     ;; ...
     ))

  ---- Buffer: toto.ly ----
  toto=\markup { hello \bold world }
  #(top-repl)
  -------------------------

`C-c g' starts lilypond into a *lilyguile* buffer

  ---- Bufer: *lilyguile* ----
  Starting lilypond /home/nicolas/toto.ly ...
  lilypond (GNU LilyPond) 2.1.29
  Exécution de usr...
  Maintenant en traitement: « /home/nicolas/toto.ly »
  Analyse...guile> #<directory (*anonymous-ly-1*) 40737e60>
  guile> guile> guile> 
  guile>
  guile> (display-markup toto)
  markup { "hello" \bold "world" }
  guile> 
  ----------------------------

where symbol completion, function signature messages, etc, work
well.

nicolas





reply via email to

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