lilypond-devel
[Top][All Lists]
Advanced

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

Re: Emacs indenting script


From: Mats Bengtsson
Subject: Re: Emacs indenting script
Date: Mon, 21 Dec 2009 13:40:50 +0100
User-agent: Thunderbird 2.0.0.5 (X11/20070716)

I tried it here and it works well.
Try the following:

- Start emacs with the scm file:
emacs myfile.scm &

- If Emacs just shows a welcoming screen, press CTRL-g.

- On the status line towards the bottom of the window, it should say
   myfile.scm   ...      (Scheme)  ....
If it doesn't say "(Scheme)", but for example "(Fundamental)", then it means that your Emacs installation doesn't automatically load the Scheme mode for .scm files (as far as I know, Emacs should do it by default).

- If it indeed says (Scheme), try to run
CTRL-x h
ALT-x indent-region
 and verify that it corrects the indentation of the file.

If all this works, I have no idea why the batch version doesn't.

   /Mats

Trevor Daniels wrote:
I tried the Emacs indenting script from
CG 8.5.5 but it doesn't seem to do anything
useful.  Maybe I'm missing something, so I
need some help from an Emacs literatus so
I can get it working and fix the CG instructions.

As I don't know what the script is supposed
to do maybe it's working correctly, but it
certainly did not indent a scm file properly.

Here's what I did.

1. Copied the script from CG 8.5.5 and installed it.
  It says:

#!/bin/sh
emacs $1 -batch --eval '(indent-region (point-min) (point-max) nil)' -f save-buffer


2. Slightly modified a .scm file to screw up
  the indenting on a couple of lines

3. Ran the script on the file.  It said:

Loading 00debian-vars...
No /etc/mailname. Reverting to default...
Loading /etc/emacs/site-start.d/50autoconf.el (source)...
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Loading debian-ispell...
Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)... Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...
Loading /etc/emacs/site-start.d/50emacs-intl-fonts.el (source)...
Loading /etc/emacs/site-start.d/50git-core.el (source)...
(No changes need to be saved)

and indeed no changes were made to the
incorrectly-indented file.

Maybe I need to install something in Emacs first?

Trevor





_______________________________________________
lilypond-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-devel

--
=============================================
        Mats Bengtsson
        Signal Processing
        School of Electrical Engineering
        Royal Institute of Technology (KTH)
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
       Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================





reply via email to

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