[Top][All Lists]

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

Re: lilypond-mode.el

From: Orm Finnendahl
Subject: Re: lilypond-mode.el
Date: Thu, 30 Mar 2006 15:03:56 +0200
User-agent: Mutt/1.5.9i

Hi Arjan,

thanks for the hints. I had a closer look at lilypond-mode.el and as
far as I can see it can't possibly work. The syntax table seems to get
erased in a post-command hook which might be related to a
non-functioning context determination. I guess that's the price you
pay for mixing syntaxes of different programming languages like scheme
and TeX and changing syntactic meanings based on the current notation
context. For now it seems easiest to get rid of the redefinition of
the context-based syntax table. That way at least the basic cursor
movements between parentheses work.

I attach the modified lilypond-mode.el in case someone has use for
it. Changes are annotated.

The autocompletion is also clear now: iso-lefttab is bound to M-/ (or
Esc-Tab). In the attached lilypond-mode.el file it is rebound to
C-tab, which works with my WindowManager.

In addition, the lilypond-mode.el contains code to use xpdf in server
mode which binds one xpdf server to each *.ly buffer. Redisplaying the
pdf of a buffer results in redisplaying the file in the server rather
than reopening an new xpdf process which I think is more convenient.

If I have more time I might take a closer look at lilypond-mode.el and
fix it properly, but unfortunately it doesn't seem to be at all

BTW: The info files don't seem to get installed by the install script
which makes the corresponding menu entries unusable. Maybe it would be
better to switch to the html documentation altogether although it is
always nice to have a tight integration with emacs for code snippets
and such.


Am 30. März 2006, 13:02 Uhr (+0200) schrieb arjan.bos:
> -- Orm wrote:
> > Hi,
> > 
> > before delving into the depths of it: Has anybody got the
> > lilypond-mode.el working in terms of autocompletion and cursor
> > movement under gnu emacs?
> > I tried with emacs21 and emacs-gtk (Version 22) without
> > success. Syntax highlighting seems to work, but pressing M-C-p or
> > M-C-n gets me to the beginning or end of the buffer instead of the
> > matching parenthesis. The syntax table seems to be defined in
> > lilypond-fontlock.el and that file gets loaded. Even re-evaluation of
> > the relevant code doesn't seem to help.
> I've also had some extensive looks at the elisp-code and what I think that 
> the lilypond syntax-table is supposed to accomplish is to provide different 
> font-locking for different parts of the .ly file. The lyrics should get 
> different font-locking from the notes, etc. Unfortunately, this does not seem 
> to work as in lyrics like `a nice foo bar', the `a' gets font-locked as the 
> note `a' and the rest doesn't get font-locking.
> It also does define the parentheses to be normal characters, so functions 
> like  beginning-of-defun (C-M-a) and backward-sexp (C-M-b) and their 
> functional opposites don't work. Also it prevents the blinking of parentheses.
> Unfortunately, all of the above doesn't bother me enough to do something 
> about it ;-) But if you can make LilyPond-mode work like it should[1], you 
> have my vote!
> > In addition <Tab> doesn't auto-complete but rather indents the current
> > line...
> In all the gnu-emacsen I've used (19 - 22) this is the default key-binding.
> HTH, 
> Arjan
> [1] It should do the emacs thing when it comes to parentheses, but it should 
> also do context-based font-locking. I do have a sample-file lying around 
> somewhere, where I use a function to determine the font-locking a word 
> receives. Perhaps something similar could be done here? See 
> <> for font-locking based on the scrabble 
> value of a word.

Attachment: lilypond-mode.el
Description: Text document

reply via email to

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