lilypond-user
[Top][All Lists]
Advanced

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

Re: The Guide to getting Point and Click going with Gvim under Ubuntu 18


From: David Wright
Subject: Re: The Guide to getting Point and Click going with Gvim under Ubuntu 18
Date: Sun, 1 Nov 2020 20:27:09 -0600
User-agent: Mutt/1.10.1 (2018-07-13)

On Sun 01 Nov 2020 at 15:12:56 (+1100), Andrew Bernard wrote:
> [A slightly older screed. Stil works for Ubunto 20. Using Atom is
> matter of simple substitution.]
> 
> The Guide to getting Point and Click going with Gvim under Ubuntu 18

Yes, this one's the longer one, so I'll comment on this.

> Setting the EDITOR variable
> ---------------------------
> 
> Lilypond uses the environment variable EDITOR to select which editor
> to use to
> display point and click links. For gvim, simply use the value 'gvim':
> 
> export EDITOR=gvim
> 
> Setting LYEDITOR is not required.

I'm not sure why EDITOR is preferred to LYEDITOR. As far as
point-and-click is concerned, they have the same effect¹. But
exporting EDITOR has the consequence that it overrides all
other places where EDITOR is used.

The intention behind having the three variables LYEDITOR/XEDITOR/
EDITOR is that LYEDITOR can specify one editor for LilyPond's
point-and-click, XEDITOR can specify another (say, graphical one)
for any time that X is running, and EDITOR can specify a text-based
backstop for when X is not running.

> Check that this works. Install the gnome-open program:
> 
> $ sudo apt install libgnome2-bin
> 
> Then:
> 
> $ gnome-open textedit:///etc/issue:1:0:0
> 
> If all is correct lilypond-invoke-editor will run and display the file.

I think Federico Bruni pointed out that libgnome2-bin/gnome-open is
rather historical, in favour of xdg-open (usually in xdg-utils).
I guess that might be something worth changing in the Usage manual.

> Next, edit '/etc/apparmor.d/usr.bin.evince' and uncomment the line:
> 
>   # Site-specific additions and overrides. See local/README for details.
>   include <local/usr.bin.evince>

This is the step you were going to edit out of your crib,
the reason being

> […] The local files provide for extending and adding
> information to the base apparmor files without interfering with them, and
> making system upgrades easier.

and /etc/apparmor.d/usr.bin.evince is such a base file.

But I think your earlier comment on the trailing comma would be
worth adding to the Usage manual.

> Run gvim in server mode by doing - exactly nothing! Simply running gvim will
> start the process in a new window. From the terminal this suffixes:
> 
> $ gvim
> 
> By default gvim will respond to remote requests such as from
> lilypond-invoke-editor. There is no need to use the --servername
> option as the
> name defaults to GVIM (and you can see this in the title bar). By default
> lilypond sends point and click requests to the gvim server named GVIM.

Interestingly, on Debian² you don't even have to bother to start gvim
at all *unless* you want to edit with vim, in which case

$ vim --servername gvim

will start a text server version wherever desired. Otherwise,
(graphical) gvim will start automatically. (I'm assuming that
vim/gvim are both installed, as would be usual.)

¹ from 
lilypond-2.21.0-1.linux-64/lilypond/usr/share/lilypond/current/scm/editor.scm

(define (get-editor)
  (or (getenv "LYEDITOR")
      (getenv "XEDITOR")
      (getenv "EDITOR")

      ;; FIXME: how are default/preferred editors specified on
      ;; different platforms?
      (case PLATFORM
        ((windows) "lilypad")
        (else
         "emacs"))))

² What about other distributions?

Cheers,
David.



reply via email to

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