[Top][All Lists]

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

Re: point-and-click to "other" editors

From: Federico Bruni
Subject: Re: point-and-click to "other" editors
Date: Fri, 15 Jun 2018 09:07:53 +0200

Il giorno gio 14 giu 2018 alle 7:48, Federico Bruni <address@hidden> ha scritto:

Il giorno gio 14 giu 2018 alle 7:15, Federico Bruni <address@hidden> ha scritto:

I've now found this in scm/editor.scm

(define editor-command-template-alist
'(("emacs" . "emacsclient --no-wait +%(line)s:%(column)s %(file)s || (emacs +%(line)s:%(column)s %(file)s&)")
   ("gvim" . "gvim --remote +:%(line)s:norm%(column)s %(file)s")
   ("uedit32" . "uedit32 %(file)s -l%(line)s -c%(char)s")
   ("nedit" . "nc -noask +%(line)s %(file)s")
   ("gedit" . "gedit +%(line)s %(file)s")
   ("jedit" . "jedit -reuseview %(file)s +line:%(line)s")
   ("syn" . "syn -line %(line)s -col %(char)s %(file)s")
   ("lilypad" . "lilypad +%(line)s:%(char)s %(file)s")))

So this should be sufficient:


But it doesn't work, as it always jump to the first line of music, no matter what you click on PDF. And it launches a new gedit window every time you click on the PDF.
Also, it should be rewritten to specify the column as well:

("gedit" . "gedit +%(line)s:%(column)s %(file)s")

The command above works, I've built the source and tested it.
I'm trying also to keep only one window open, even if I click on the PDF multiple times. gedit has the --wait option, which would seem to be what I need:

-w, --wait
             Open files and block the gedit process.

So I'm using:

("gedit" . "gedit --wait +%(line)s:%(column)s %(file)s")

but I'm still getting multiple windows.
Any idea?

I'll try asking to gedit developers.

Next week I'll send a patch to fix gedit command, add a couple of editors (Atom and Visual Studio Code) and improve the documentation. It's not clear to me if these commands can only be "hard-coded" in lilypond source or if I may add in LYEDITOR, using a special syntax, the command of an editor not listed in scm/editor.scm.

I'll be offline until Wednesday.

reply via email to

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