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