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:
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,
25 ftp@/.math@/.berkeley@/.edu}.
27 Most @TeX{} distributions ship with @command{xdvik}, which is always a few
28 versions behind the official Xdvi. To find out which Xdvi you are
29 running, try @code{xdvi -version} or @code{xdvi.bin -version}.
31 @item an editor with a client/@/server interface (or a lightweight GUI
39 Emacs. Emacs is an extendable text editor. It is available from
40 @uref{http://@/www@/.gnu@/.org/@/software/@/emacs/}. You need version 21
41 to use column location.
43 @c move this elsewhere?
48 @cindex lilypond-mode for Emacs
49 @cindex syntax coloring
52 XEmacs. XEmacs is very similar to Emacs.
57 NEdit. NEdit runs under Windows and Unix.
58 It is available from @uref{http://@/www@/.nedit@/.org}.
63 GVim. GVim is a GUI variant of VIM, the popular VI
64 clone. It is available from @uref{http://@/www@/.vim@/.org}.
71 jEdit. jEdit is an editor written in Java with extensive plug-in
72 support. The LilyPond plugin for jEdit comes with an DVI
73 viewer, which is preconfigured for point-and-click.
81 Xdvi must be configured to find the @TeX{} fonts and music
82 fonts. Refer to the Xdvi documentation for more information.
84 To use point-and-click, add one of these lines to the top of your @file{.ly}
88 #(ly:set-point-and-click 'line)
92 When viewing, Control-Mousebutton@tie{}1 will take you to the originating
93 spot in the @file{.ly} file. Control-Mousebutton@tie{}2 will show all
96 If you correct large files with point-and-click, be sure to start
97 correcting at the end of the file. When you start at the top, and
98 insert one line, all following locations will be off by a line.
101 For using point-and-click with Emacs, add the following
102 In your Emacs startup file (usually @file{~/@/.emacs}):
107 Make sure that the environment variable @var{XEDITOR} is set to
109 emacsclient --no-wait +%l %f
111 @cindex @var{XEDITOR}
112 If you use XEmacs instead of Emacs, insert @code{(gnuserve-start)} in
113 your @file{.emacs} file, and set @code{XEDITOR} to
114 @code{gnuclient -q +%l %f}.
116 For using Vim, set @code{XEDITOR} to @code{gvim --remote +%l %f}, or
117 use this argument with Xdvi's @code{-editor} option.
120 For using NEdit, set @code{XEDITOR} to @code{nc -noask +%l %f}, or
121 use this argument with Xdvi's @code{-editor} option.
123 It can also make your editor jump to the exact location of the note
124 you clicked. This is only supported on Emacs and VIM. Users of Emacs version
125 20 must apply the patch @file{emacsclient.patch}. Users of version 21
126 must apply @file{server.el.patch} (version 21.2 and earlier). At the
127 top of the @code{.ly} file, replace the @code{set-point-and-click} line
128 with the following line:
130 #(ly:set-point-and-click 'line-column)
132 @cindex line-column-location
133 and set @code{XEDITOR} to @code{emacsclient --no-wait +%l:%c %f}. Vim
134 users can set @code{XEDITOR} to @code{gvim --remote +:%l:norm%c| %f}.