-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.texi
176 lines (127 loc) · 7.65 KB
/
README.texi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
\input texinfo @c -*-texinfo-*-
@setfilename README.info
@settitle README
@documentencoding iso-8859-1
@iftex
@finalout
@end iftex
@titlepage
@title README
@author Shelagh Manton
@end titlepage
@node Top, Notes for this selection of files., (dir), (dir)
@top Overview
@c Page published by Emacs Muse begins here
@menu
* Notes for this selection of files.::
@end menu
@node Notes for this selection of files., , Top, Top
@chapter Notes for this selection of files.
These files set up a system of menus for LilyPond-mode. To install them, put them in a
folder where emacs can find them. For instance in @samp{~/.elisp/site-lisp/LilyPond} or where
ever you decide to put it. Then tell emacs where it is by writing in your @samp{.emacs} or
@samp{.emacs.d/init.el} file (if you are on Windows(tm) especially)
@quotation
@samp{(eval-after-load "LilyPond-mode" (load-library "~/Path/to/your/lilypond-skeletons.el"))}
@end quotation
@menu
* My personal LilyPond setup::
* Using the LilyPond info files::
* Some cool things that can help you write your LilyPond files.::
@end menu
@node My personal LilyPond setup, Using the LilyPond info files, Notes for this selection of files., Notes for this selection of files.
@section My personal LilyPond setup
looks like this:
@quotation
@samp{(autoload 'LilyPond-mode "lilypond-mode" "LilyPond Editing Mode" t)}
@samp{(add-to-list 'auto-mode-alist '("\\.ly$" . LilyPond-mode))}
@samp{(add-to-list 'auto-mode-alist '("\\.ily$" . LilyPond-mode))}
@end quotation
@quotation
@samp{;; adds ~/.elisp/lyqi in the load path
(setq load-path (cons (expand-file-name "~/.elisp/site-lisp/lyqi") load-path))
;; when loading LilyPond-mode@comma{} lyqi-mode library will also be loaded.
;; type `C-c q' in LilyPond-mode to switch to lyqi-mode.}
@end quotation
@quotation
@samp{(eval-after-load "LilyPond-mode"}
@samp{'(progn
(load-library "lyqi-mode")
(define-key LilyPond-mode-map "\C-cq" 'lyqi-mode)
(define-key LilyPond-mode-map [tab] 'LilyPond-autocompletion)
(load-library "lilypond-skeletons")
(lambda () (turn-on-font-lock))))}
@end quotation
@node Using the LilyPond info files, Some cool things that can help you write your LilyPond files., My personal LilyPond setup, Notes for this selection of files.
@section Using the LilyPond info files
To get the most out of the LilyPond info files you need to make sure they are in your info
path. If they are not in a standard place, which often it seems they are not, find where
they are in the files system and the write the following.
@samp{(setq Info-additional-directory-list (quote ("/path/to/info/dir")))} in your .emacs file.
@node Some cool things that can help you write your LilyPond files., , Using the LilyPond info files, Notes for this selection of files.
@section Some cool things that can help you write your LilyPond files.
@menu
* Completion::
* Counting the beat::
* Dabbrev---this is a general emacs thing. (info ``(Emacs) Dynamic Abbrevs'')::
* Abbrevs---another general emacs thing (info ``(Emacs) Abbrevs'')::
* Getting help (Evaluating expressions)::
* Customizing the LilyPond-templates package::
@end menu
@node Completion, Counting the beat, Some cool things that can help you write your LilyPond files., Some cool things that can help you write your LilyPond files.
@subsection Completion
If you are using a word LilyPond-mode knows about ie @strong{@emph{inbuilt}} functions, you can
@samp{M-TAB} to complete the word.
@node Counting the beat, Dabbrev---this is a general emacs thing. (info ``(Emacs) Dynamic Abbrevs''), Completion, Some cool things that can help you write your LilyPond files.
@subsection Counting the beat
When you are in a complex rhythmic passage and you have lost your idea of how many beats
@multitable @columnfractions 0.5 0.5
@item there are to a bar---@samp{LilyPond-what-beat} will do the counting for you. Put in a @tab which
@end multitable
marks the beginning and end of a bar and @samp{\C-c b} on each note or after each note to see how
many beats you need to have in the bar or whether the note you thought was on 3/4 beat
actually is. Try it, this is a cool feature.
@node Dabbrev---this is a general emacs thing. (info ``(Emacs) Dynamic Abbrevs''), Abbrevs---another general emacs thing (info ``(Emacs) Abbrevs''), Counting the beat, Some cool things that can help you write your LilyPond files.
@subsection Dabbrev---this is a general emacs thing. (info ``(Emacs) Dynamic Abbrevs'')
If you have already used a word or term in your LilyPond source file you can write the
first couple of letters and then press @samp{M-/} to complete it. How good would that be; instead of
writing out Hallelujah ten times in a file? As dabbrev can look in all open buffers, if the
word you're looking for isn't in the current buffer keep @samp{M-/} to cycle through the words
that begin with the letters you've written so far.
@node Abbrevs---another general emacs thing (info ``(Emacs) Abbrevs''), Getting help (Evaluating expressions), Dabbrev---this is a general emacs thing. (info ``(Emacs) Dynamic Abbrevs''), Some cool things that can help you write your LilyPond files.
@subsection Abbrevs---another general emacs thing (info ``(Emacs) Abbrevs'')
You can set up a system of ``abbrevs'' or autocorrect in emacs that can make your life easy
if you want to put in the same phrases such as, say your full name in the composer field.
Or as I do, as an automatic spelling fixer. I put the frequently mis-spelled word and its
correction in my abbrevs file. It can be global (ie for every text file you use) or local
to the mode (specialist terms you may never use anywhere else). So if you always spell
@emph{with} -> @emph{wtih} tell abbrevs to change it back to what you need. If
you are reading this in emacs just evaluate that last s-expression to go directly to the
info node that gives you all the juice on abbrevs. See next entry.
@node Getting help (Evaluating expressions), Customizing the LilyPond-templates package, Abbrevs---another general emacs thing (info ``(Emacs) Abbrevs''), Some cool things that can help you write your LilyPond files.
@subsection Getting help (Evaluating expressions)
If I've put an expression in the template like this
@samp{(info "(LilyPond) Bagpipe")} you can put the cursor just after the last parenthesis
and @samp{C-x C-e} to evaluate it. Then if you have the LilyPond info files in the
path (see above) the page in the LilyPond info to do with bagpipes will
open up in the other buffer for your perusal.
There is also built-in help from LilyPond-mode itself. If you put the cursor over the word
you want to inspect, you can then @samp{\C-c TAB} to get a context sensitive page in the
LilyPond info documents.
Recently, someone on the mailing list discovered a bug in LilyPond-mode that means that
the @samp{TAB} key does not work as it should to auto-complete keywords and other LilyPond
terms. If you put
@quotation
@samp{(define-key LilyPond-mode-map [tab] 'LilyPond-autocompletion)}
in your LilyPond-hook auto-completion finally works. See above for my settings with now include
this hack.
@end quotation
@node Customizing the LilyPond-templates package, , Getting help (Evaluating expressions), Some cool things that can help you write your LilyPond files.
@subsection Customizing the LilyPond-templates package
If you don't want to have all the templates available, ie if you are only interested in the
piano templates, you can @samp{M-x customize-group RET LilyPond} to find the variables for
turning off the various menus. Just put ``nil'' for the set of templates you are not
interested in and the menus for them will disappear. The variables have names like
LilyPond-vocal-templates-p. All of the templates are available by default.
@c Page published by Emacs Muse ends here
@bye