lilypond-devel
[Top][All Lists]
Advanced

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

Re: Point and Click does not work on Windows


From: ArnoldTheresius
Subject: Re: Point and Click does not work on Windows
Date: Tue, 23 Apr 2013 04:16:02 -0700 (PDT)

Eluze wrote
> 
> ArnoldTheresius wrote
>> 
>> Eluze wrote
>>> ...
>>> maybe my hope to find the needed information in thess tables was to
>>> optimistic - does somebody know how the "correct" way is?
>>> 
>>> Eluze
>> Well, at least here is what I did try this weekend - posted before I read
>> all messeages which were added in the meantime.
>> This code is still "dirty but quick, incomplete but big" 

>> Editors 'context' and 'pspad' are still missing.
>> Hopefully still good enough for some testing.
> hi Arnold
> 
> looks great! (but sorry - I can't test)
> 
> ...
>> Also to clearify:
>> - Which of the listed editors are available for windows?
> Crimson
> gvim
> notepad
> notepad++
> pspad
> …???
> 
> I think we should maintain a table where you can read the line and column
> option.
>> - Which one needs to be started into the background (like lilypad)?
> what do you mean exactly? (I can start: lilypad "d:\data\ly\test\test.ly"
> 
> after finding a viable way textedit and it's prerequisites should be
> documented clearer (in AU).
> 
> Eluze

*Well, let's to back to the roots.*

There is the *problem* "after installation of Lilypond point-and-click does
not work out of the box". (without installation of an 'integrated
development environment', e.g. frescobaldi)
I categorize this as 'bug'.
I *located* the problems to the windows installer and the file
lilypond-invoke-editor in the bin directory of the windows installation.
Suggested *solution* is: changes in the installation script and in
lilypond-invoke-editor
Result to obtain: Opens lilypad by point-and-click out of a pdf-viewer, e.g.
Acrobat reader.
  If the environment variable LYEDITOR (or XEDITOR or EDITOR) is defined
(supported values: emacs, gvim, uedit32, jedit ...),
  then this editor will be launched instead of lilypond.
  For testing you can enter the textedit command in the command interpreter
(DOS shell), e.g. »C:\...\usr\bin\guile.exe -s
C:\...\usr\bin\lilypond-invoke-editor
textedit://C:/MyLilypondWorkDir/testfile.ly:17:9:9«
Unchanged standard behavior: If the editor is not in the search path for
command line usage, you still have to qualify the complete call with all
options in the environment variable.
  


Next *Problem*: "each time I click in the pdf a new tab is opened in my
browser!" (Eluze, 2012-04-11, bugs/point and click implementation)
Also testable: the commandline execution listed above does not return until
lilypad is closed.
I categorize this as 'usability or bug'.
Related *Problem*: support additional editors (on windows)
I categorize this as 'enhancement'.
I *located*: in file scm/editor.scm is an assiciation list
'editor-command-template-alist'.
Suggested *solution* is:
  Expand the association list 'editor-command-template-alist'
  On (eq? PLATFORM 'windows) use »start lilypad ...«
Result to obtain:
  new editors 'context', 'notepad++' and 'pspad' available (by specification
in env. var. LYEDITOR)
  launch of lilypad does no longer create an empty tab in the browser, and
executing the textedit command line in the command interpreter (DOS Shell)
does no longer wait for lilypad.
*Still to examine*:
  Do other editor commands require the »start« prefix in windows? (most
simple: command line check)
  I just tested 'gvim': no start prefix required.



Next *Problem*: "FIXME: how aore default/preferred editors specified on
different paltforms?" (from scm/editor.scm)
              Try this for windows by reading from the windows registry.
/Clearification in progress/:
  Which the listed editors are available for windows:
    According to wikipedia these are: emacs, gvim, uedit32, gedit, jedit,
syn, context, notepad++, pspad, and of course lilypad,
      while not availabe for windows is nedit.


*TODO:*
Who has emacs, uedit32, gedit, jedit, syn, context, notepad++ and/or pspad
installed on his windows computer?
  Then correct the script lilypond-invoke-editor (see my mail form
2012-04-16), and make the command line check.
  Does it open the editor, and will the command prompt be back immediately
or only after closing the editor window.

Are there other important methods known how to select the default editor in
windows, and who they store this information (in the windows registry)?

Who will (and can off course) initiate the modification to the installer and
the lilypond-invoke-editor script?


*And some more information I found:*

On https://github.com/janneke/gub/blob/master/nsis/lilypond-prepost.nsh I
found in line 83:
  WriteRegExpandStr HKCR "textedit\shell\open\command" ""
'"$INSTDIR\usr\bin\guile.exe" -e main -s
"$INSTDIR\usr\bin\lilypond-invoke-editor.scm" "%1"'
Is this the installation script template used by the windows installer? Who
may change it to
  WriteRegExpandStr HKCR "textedit\shell\open\command" ""
'"$INSTDIR\usr\bin\guile.exe" -s "$INSTDIR\usr\bin\lilypond-invoke-editor"
"%1"'
and make it take effect on the next unstable build?

In the same file you find the registry definitons
  ...\Lilypond\shell\edit\command "" = ... and
...\Lilypond\shell\generate\command "" = ...
This adds the additional right mouse button selections 'edit source' and
'generate PDF' to the context menu in the file explorer.
(Nice to know. Perhaps you can use it in another situation)

If the registry entry
...\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.ly\userchoice
contains in Progid a value
Applications\xxx.exe , then the command to open (including the full path to
the binary) can be found in
...\Software\Classes\Applications\xxx.exe\shell\open\command
Since I just want to scan for the short name, I do not need the complete
path.

The template for ...\bin\lilypond-invoke-editor seems to be
scripts/lilypond-invoke-editor.scm in the source tarball.
The "-e main" option was removed from this file 2006-11-07.
Who will initiate the modifications there?


*And finally:*
I'll have a closer look to the documentation when the modifications for
scm/editor.scm will be more clear.
The global default (for all operating systems) seems to be:
- Lilypond tries to evalute which editor you want to use - but the success
will ever be limited, therfore
- you can define the environment variable LYEDITOR to select the editor to
use.
- Set LYEDITOR to the short name of one of the predefined invoke editor
syntax (e.g. emacs, gvim, lilypad - effectively listed in file
scm/editor.scm) if this editor can be found by command line usage, i.e. its
path is included in the search path.
- Otherwise set LYEDITOR to qualify the full path name AND all additional
options for the textedit launch.

ArnoldTheresius



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Point-and-Click-does-not-work-on-Windows-tp115986p144901.html
Sent from the Dev mailing list archive at Nabble.com.



reply via email to

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