3 @appendix Point and click
4 @cindex point and click
6 @cindex source specials
7 @cindex specials, source
9 Point and click lets you find notes in the input by clicking on them in
10 the Xdvi window. This makes it easier to find input that causes some
11 error in the sheet music.
13 To use it, you need the following software:
15 @item a dvi viewer that supports src specials.
17 The most obvious choice is Xdvi@footnote{KDVI also provides src
21 specials, but does not use the kpathsea library, so it cannot find
22 LilyPond font and PostScript library files.}, version 22.36 or newer.
24 @uref{ftp://ftp.math.berkeley.edu/pub/Software/TeX/xdvi.tar.gz,ftp.math.berkeley.edu}.
26 Most @TeX{} distributions ship with xdvik, which is always a few
27 versions behind the official Xdvi. To find out which Xdvi you are
28 running, try @code{xdvi -version} or @code{xdvi.bin -version}.
30 @item an editor with a client/server interface (or a lightweight GUI
36 @item Emacs. Emacs is an extensible text-editor. It is available from
37 @uref{http://www.gnu.org/software/emacs/}. You need version 21 to use
40 @c move this elsewhere?
45 @cindex lilypond-mode for Emacs
46 @cindex syntax coloring
48 @item XEmacs. XEmacs is very similar to Emacs.
52 @item NEdit. NEdit runs under Windows, and Unix.
53 It is available from @uref{http://www.nedit.org}.
57 @item GVim. GVim is a GUI variant of VIM, the popular VI
58 clone. It is available from @uref{http://www.vim.org}.
67 Xdvi must be configured to find the @TeX{} fonts and music
68 fonts. Refer to the Xdvi documentation for more information.
70 To use point-and-click, add one of these lines to the top of your .ly
73 #(ly:set-point-and-click 'line)
77 When viewing, Control-Mousebutton 1 will take you to the originating
78 spot in the @file{.ly} file. Control-Mousebutton 2 will show all
81 If you correct large files with point-and-click, be sure to start
82 correcting at the end of the file. When you start at the top, and
83 insert one line, all following locations will be off by a line.
86 For using point-and-click with Emacs, add the following
87 In your Emacs startup file (usually @file{~/.emacs}):
92 Make sure that the environment variable @var{XEDITOR} is set to
94 emacsclient --no-wait +%l %f
97 If you use XEmacs instead of Emacs, you use @code{(gnuserve-start)} in
98 your @file{.emacs}, and set @code{XEDITOR} to @code{gnuclient -q +%l %f}.
100 For using Vim, set @code{XEDITOR} to @code{gvim --remote +%l %f}, or
101 use this argument with Xdvi's @code{-editor} option.
104 For using NEdit, set @code{XEDITOR} to @code{nc -noask +%l %f}, or
105 use this argument with Xdvi's @code{-editor} option.
107 If can also make your editor jump to the exact location of the note
108 you clicked. This is only supported on Emacs and VIM. Users of Emacs version
109 20 must apply the patch @file{emacsclient.patch}. Users of version 21
110 must apply @file{server.el.patch} (version 21.2 and earlier). At the
111 top of the @code{ly} file, replace the @code{set-point-and-click} line
112 with the following line:
114 #(ly:set-point-and-click 'line-column)
116 @cindex line-column-location
117 and set @code{XEDITOR} to @code{emacsclient --no-wait +%l:%c %f}. Vim
118 users can set @var{XEDITOR} to @code{gvim --remote +:%l:norm%c| %f}.