Point and Click does not work on Windows

classic Classic list List threaded Threaded
35 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Point and Click does not work on Windows

David Kastrup
ArnoldTheresius <[hidden email]> writes:

> Eluze wrote
>>
>>> - 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).
>>
>
> *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

[...]

> 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:

[...]

Welcome to LilyPond.  The classic mystery story revolves around the
question "Who dunnit?".  In contrast, our mystery stories tend to
revolve around the question "Who's gonna do it?".  Or even more of a
mystery, "How did anything ever get done?".

> *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.

This sort of task has two basic approaches:

a) do everything yourself

b) do whatever you feel is enough, then wait for users to complain about
   the rest

Approach b) has the slight disadvantage that "users" tend to take the
status quo for granted, will design the craziest of workarounds and
workflows, and tell everybody _else_ about them rather than reporting
back, giving you ulcers whenever you happen to chance upon such wisdom
when least expecting it.

Given the thoroughness you invested into thinking about this issue so
far, it's a safe bet that the least aggravating way to proceed is to
take care of it yourself as far as possible.  With regard to the
LilyPond installer, it may well be that you are leaving the core of your
expertise, so it might make sense to ask around for support with that.
But even though we manage to produce working binaries, a lot is due to
procedures once established and still working that are exercised not by
their original authors.

So it's important to distinguish between the kind of support for your
work that you'd like to see, and the kind of support that will make or
break what you are trying to accomplish.

> 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?

The latter question seems of the make-or-break variety, indeed.

> *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

lilypond-invoke-editor, more likely, tries to evaluate this.

> - 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.

That seems about right.

--
David Kastrup


_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Point and Click does not work on Windows

Phil Holmes
----- Original Message -----
From: "David Kastrup" <[hidden email]>
To: <[hidden email]>
Sent: Tuesday, April 23, 2013 1:08 PM
Subject: Re: Point and Click does not work on Windows


> ArnoldTheresius <[hidden email]> writes:
>> Who will (and can off course) initiate the modification to the
>> installer and the lilypond-invoke-editor script?
>
> The latter question seems of the make-or-break variety, indeed.

The strict answer is "anyone with push access to Graham's github account".
That includes me and Julien and probably others.  To modify the installer
requires NSIS experience.  I've essentially none of that, although I think I
was the last person to mess with it.  If either Arnold or Eluze can create a
patch, I'd be happy to test it once my rush of college work is over (end of
May).

--
Phil Holmes


_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Point and Click does not work on Windows

ArnoldTheresius
Phil Holmes-2 wrote
----- Original Message -----
From: "David Kastrup" <[hidden email]>
To: <[hidden email]>
Sent: Tuesday, April 23, 2013 1:08 PM
Subject: Re: Point and Click does not work on Windows


> ArnoldTheresius <[hidden email]> writes:
>> Who will (and can off course) initiate the modification to the
>> installer and the lilypond-invoke-editor script?
>
> The latter question seems of the make-or-break variety, indeed.

The strict answer is "anyone with push access to Graham's github account".
That includes me and Julien and probably others.  To modify the installer
requires NSIS experience.  I've essentially none of that, although I think I
was the last person to mess with it.  If either Arnold or Eluze can create a
patch, I'd be happy to test it once my rush of college work is over (end of
May).

--
Phil Holmes


_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel
Thank you Phil Holmes,

this time scheule sounds good to me.
I'll have some time off from this development and expect to continue working on this issue on 2013-05-05.

And regarding the 'start in background or not' question for the different editors, I got another, more simple idea:
- create a textfile named 'editor-launch-test.scm'.
- just enter the command line execution to start the editor with the 'goto', option, e.g.
  (system "lilypad +3:1 testfile.ly")
or
  (system "jedit -reuseview testfile.ly +line:3")
- the execute it in the windows command line. Due to the lilypond installation you should just enter the filename »editor-launch-test.scm« in the command line and it will be interpreted by guile.
-- then check when the command prompt in this 'dos shell' comes back - immediately after the editor started, or only after the editor terminated.
So I ask you, if you have allready installed one of these editors on your windows computer you also installed lilypond (and no one other has allready checked this editor), then try to execute this check and let us know the result.
I have gvim installed and therfore allready tested (and lilypad too, of course).

ArnoldTheresius
Reply | Threaded
Open this post in threaded view
|

Re: Point and Click does not work on Windows

Eluze
In reply to this post by ArnoldTheresius
what's the status of this issue?

I've installed 2.1.7.17 but point and click doesn't work (is it supposed to?!)

- trying point and click in a pdf file I get

Clipboard.png

and an empty tab is created in the browser.


- then I tried from the command-line:

"c:\Program Files (x86)\LilyPond\usr\bin\guile.exe" -e main -s "c:\Program Files (x86)\LilyPond\usr\bin\lilypond-invoke-editor" "textedit://test3.ly:1:2:3"

and got the error:

lilypond-invoke-editor (GNU LilyPond) 2.17.17
ERROR: no code for module (scm editor)

- the same error still appears after adding  the module (ice-9 rdelim)


- HKCR\textedit\shell\open\command has the value "C:\Program Files (x86)\LilyPond\usr\bin\guile.exe" -e main -s "C:\Program Files (x86)\LilyPond\usr\bin\lilypond-invoke-editor.scm" "%1"

- the value in HKLM\SOFTWARE\Classes\textedit\shell\open\command is exactly the same

- these 3 editors can be added (as Arnold already showed above)

  ("context" . "context /g%(column)s:%(line)s %(file)s")
  ("notepad++" . "notepad++ -n%(line)s -c%(column)s %(file)s")
  ("pspad" . "pspad -%(line)s %(file)s")                             ;; no column positioning!


I know none of these points is new, but I thought it's worth to state where we are.

Eluze

ps: I don't know why the file lilypod-invoke-editor has no extension. imo it should be renamed and the registry for textedit would be ok.
Reply | Threaded
Open this post in threaded view
|

Re: Point and Click does not work on Windows

Phil Holmes
----- Original Message -----
From: "Eluze" <[hidden email]>
To: <[hidden email]>
Sent: Monday, April 29, 2013 10:54 AM
Subject: Re: Point and Click does not work on Windows


> what's the status of this issue?
>
> I've installed 2.1.7.17 but point and click doesn't work (is it supposed
> to?!)
>

The point and click link between the PDF viewer and an editor is as it
always was, and is the area you were working with Arnold on. What I've done
is update LilyPad so that using the correct row and column on the command
line takes the cursor to the correct point of the .ly file - it didn't
before.

--
Phil Holmes


_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Point and Click does not work on Windows

ArnoldTheresius
In reply to this post by Eluze
Eluze wrote
...

ps: I don't know why the file lilypod-invoke-editor has no extension. imo it should be renamed and the registry for textedit would be ok.
Well, at first:
Windows uses the file extension to define (in the registry) with which application a file has to be opened (interpreted), while on UNIX systems this interpeter command is written in the first line (after the two characters »#!«).
Consequently, it would be best to 'create' lilypond-invoke-editor for UNIX builds but lilypond-invoke-editor.scm for Windows builds.
Unfortunately I did not find where to define this switch. As the point-and-click call mechanism is only targeting »what command is defined in the windows registry« it's more simple to keep the file names for both Windows and UNIX identical, and the »textedit registry entry« on windows needs to be corrected in both situations, for the file with extension ».scm« as well as for the file without this extension.

Next:
I tried notepad++. It should also be called with »start« in windows. And after only a little usage of notepad++ I would prefer it to lilypad.

Finally (for today):
I include here a new copy of .../scm/editor.scm (based on Version 2.17.16), also the (not changed since my last info) file lilypond-invoke-editor.
point-and-click-on-windows.zip
It's ready for testing.
And I added an additional feature to .../scm/editor.scm: you can define your editor launch command with both »line«, »char« and »column« zero-based and one-based, e.g. use »%(line-1)s« in replacement for »%(line)s«.

ArnoldTheresius
Reply | Threaded
Open this post in threaded view
|

Re: Point and Click does not work on Windows

Eluze
ArnoldTheresius wrote
Eluze wrote
...

ps: I don't know why the file lilypod-invoke-editor has no extension. imo it should be renamed and the registry for textedit would be ok.
Well, at first:
Windows uses the file extension to define (in the registry) with which application a file has to be opened (interpreted), while on UNIX systems this interpeter command is written in the first line (after the two characters »#!«).
Consequently, it would be best to 'create' lilypond-invoke-editor for UNIX builds but lilypond-invoke-editor.scm for Windows builds.
Unfortunately I did not find where to define this switch. As the point-and-click call mechanism is only targeting »what command is defined in the windows registry« it's more simple to keep the file names for both Windows and UNIX identical, and the »textedit registry entry« on windows needs to be corrected in both situations, for the file with extension ».scm« as well as for the file without this extension.

Next:
I tried notepad++. It should also be called with »start« in windows. And after only a little usage of notepad++ I would prefer it to lilypad.

Finally (for today):
I include here a new copy of .../scm/editor.scm (based on Version 2.17.16), also the (not changed since my last info) file lilypond-invoke-editor.
point-and-click-on-windows.zip
It's ready for testing.
hi Arnold

I did a few tests:

from the command-line it works perfectly with the short invoke of notepad++ - for that I had to change the lines below in "lilypond-invoke-editor.scm" to

    ("notepad++" . "notepad++ -n%(line)s -c%(column)s %(file)s") ;;; ok!
    ;("notepad++" . ,(if (eq? PLATFORM 'windows)
    ;  "start c:\\Program Files (x86)2.17.17\\Notepad++\\notepad++.exe -n%(line)s -c%(column)s %(file)s"
    ;  "notepad++ -n%(line)s -c%(column)s %(file)s"))
 
the problem is the space in "C:\program files(x86)\...\notepad++.exe" - I couldn't find a quick solution how to put the necessary apostrophes.

then I tried the *real* point-and-click from a pdf-file but no success (I don't know if my registry is broken after all the attempts/changes I made)

it would be interesting to know what entries exactly are needed in the registry.

it seems the textedit protocol is handled by the (standard) internet browser
- can it be done without?
- if not, what special settings are required there?

thanks for your work!
Eluze
Reply | Threaded
Open this post in threaded view
|

Re: Point and Click does not work on Windows

Phil Holmes
----- Original Message -----
From: "Eluze" <[hidden email]>
To: <[hidden email]>
Sent: Monday, May 06, 2013 3:39 PM
Subject: Re: Point and Click does not work on Windows

> it seems the textedit protocol is handled by the (standard) internet
> browser
> - can it be done without?
> - if not, what special settings are required there?

I believe it's simply handled by the registry entry:

[HKEY_CLASSES_ROOT\textedit\shell\open\command]

I have:

"C:\Program Files (x86)\LilyPondV2.17.17\usr\bin\guile.exe" -e main -s
"C:\Program Files (x86)\LilyPondV2.17.17\usr\bin\lilypond-invoke-editor.scm"
"%1"

--
Phil Holmes


_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Point and Click does not work on Windows

ArnoldTheresius
In reply to this post by Eluze
Eluze wrote
...
I did a few tests:
...
    ("notepad++" . "notepad++ -n%(line)s -c%(column)s %(file)s") ;;; ok!
    ;("notepad++" . ,(if (eq? PLATFORM 'windows)
    ;  "start c:\\Program Files (x86)2.17.17\\Notepad++\\notepad++.exe -n%(line)s -c%(column)s %(file)s"
    ;  "notepad++ -n%(line)s -c%(column)s %(file)s"))
 
the problem is the space in "C:\program files(x86)\...\notepad++.exe" - I couldn't find a quick solution how to put the necessary apostrophes.

...

it seems the textedit protocol is handled by the (standard) internet browser
- can it be done without?
- if not, what special settings are required there?

thanks for your work!
Eluze
Hello Eluze,

I did my tests when the notepad++ path was added to the program search path. I had to reboot after I expanded the environment variable PATH in the system settings.
If you want to enter the full path in (with spaces) in editor.scm, then try to put the »quotes in the string« just around the full program path, this would be:
    ("notepad++" . ,(if (eq? PLATFORM 'windows)
      "start \"C:\\Program Files (x86)2.17.17\\Notepad++\\notepad++.exe\" -n%(line)s -c%(column)s %(file)s"
      "\"C:\\Program Files (x86)2.17.17\\Notepad++\\notepad++\" -n%(line)s -c%(column)s %(file)s"))

And, just as allready answered by Phil Holmes, both the acrobat reader and summatraPDF seem to look in the registry at [HKEY_CLASSES_ROOT\textedit\shell\open\command] to get the associated launch command. I do not know if the lauch is done directly (i.e. CreateProcess()) or by calling another application like the internet explorer.
The "out of the box" entry after each installation is like this line:
"C:\Program Files (x86)\LilyPondV2.17.17\usr\bin\guile.exe" -e main -s "C:\Program Files (x86)\LilyPondV2.17.17\usr\bin\lilypond-invoke-editor.scm" "%1"
where "-e main" forces it to be executed twice, and the script in the windows installation is initially without the extension .scm.
Therfore I allways correct it after I installed a new relesae to something like this:
"C:\Program Files (x86)\LilyPondV2.17.17\usr\bin\guile.exe" -s "C:\Program Files (x86)\LilyPondV2.17.17\usr\bin\lilypond-invoke-editor" "%1"

ArnoldTheresius



Reply | Threaded
Open this post in threaded view
|

Re: Point and Click does not work on Windows

ArnoldTheresius
In reply to this post by Eluze
Eluze wrote
...
it seems the textedit protocol is handled by the (standard) internet browser
- can it be done without?
- if not, what special settings are required there?

thanks for your work!
Eluze
I just examined the source code of SumatraPDF Version 2.1.1.
The launch is handled by the system call ShellEcecuteEx(), where the 'verb' parameter is set to »open«, the 'file' parameter is set to the url (e.g. »textedit://C:/LilypondDatefiles/test.ly:7:3:4«) and the parameter called 'parameters' is set to NULL.
This windows function does all the registry evaluation, how to launch this »url«.

ArnoldTheresius
Reply | Threaded
Open this post in threaded view
|

Re: Point and Click does not work on Windows

Eluze
ArnoldTheresius wrote
Eluze wrote
...
it seems the textedit protocol is handled by the (standard) internet browser
- can it be done without?
- if not, what special settings are required there?
I just examined the source code of SumatraPDF Version 2.1.1.
The launch is handled by the system call ShellEcecuteEx(), where the 'verb' parameter is set to »open«, the 'file' parameter is set to the url (e.g. »textedit://C:/LilypondDatefiles/test.ly:7:3:4«) and the parameter called 'parameters' is set to NULL.
This windows function does all the registry evaluation, how to launch this »url«.
since my installation seems corrupted I can't I give a valid judgment if and what works or not!

I think the new files and registry entries should be added to the next release - the feed-back will tell us if we missed something (and everybody can still go back to the old - and partially not working - version)!

Eluze
Reply | Threaded
Open this post in threaded view
|

Re: Point and Click does not work on Windows

ArnoldTheresius
Eluze wrote
...
I think the new files and registry entries should be added to the next release - the feed-back will tell us if we missed something (and everybody can still go back to the old - and partially not working - version)!

Eluze
Hello, here are my tow diff files.
diff_gub-master.txt
diff_lilypond-2.17.18.txt
The file pathes in this diff files may be different from the entries required for the git patch upload.
Eluze, check the lilypond diff please, and submit it when possible.

When preparing the diffs, I wondered if the argv0 relocation in lilypond-invoke-editor will work for linux, too. In the UBUNTU VM where I installed the version 2.17.18, the DATADIR did end with "current", too, not with the version number, just the same as on Windows. So I did choose another method to make the argv0 relocation work again: check read access to the directory .../2.17.18 (resp. the current version number), and if this fails use .../current instead. This made it working for both Windows and UBUNTU.

In the gub-master diff I only modified the strings for two windows registry settings done at the installation, they reflect the changes I did manually on my computer: I removed the file extension .scm from lilypond-invoke-editor in the textedit-open command, and I removed »-e main« in both the textedit-open and the scm-file-open command.

ArnoldTheresius
Reply | Threaded
Open this post in threaded view
|

Re: Point and Click does not work on Windows

Phil Holmes
----- Original Message -----
From: "ArnoldTheresius" <[hidden email]>
To: <[hidden email]>
Sent: Wednesday, May 15, 2013 8:21 AM
Subject: Re: Point and Click does not work on Windows


> Eluze wrote
>> ...
>> I think the new files and registry entries should be added to the next
>> release - the feed-back will tell us if we missed something (and
>> everybody
>> can still go back to the old - and partially not working - version)!
>>
>> Eluze
>
> Hello, here are my tow diff files.
> diff_gub-master.txt
> <http://lilypond.1069038.n5.nabble.com/file/n145932/diff_gub-master.txt>
> diff_lilypond-2.17.18.txt
> <http://lilypond.1069038.n5.nabble.com/file/n145932/diff_lilypond-2.17.18.txt>
> The file pathes in this diff files may be different from the entries
> required for the git patch upload.
> Eluze, check the /lilypond diff/ please, and submit it when possible.
>
> When preparing the diffs, I wondered if the /argv0 relocation/ in
> /lilypond-invoke-editor/ will work for linux, too. In the UBUNTU VM where
> I
> installed the version 2.17.18, the DATADIR did end with "current", too,
> not
> with the version number, just the same as on Windows. So I did choose
> another method to make the argv0 relocation work again: check read access
> to
> the directory .../2.17.18 (resp. the current version number), and if this
> fails use .../current instead. This made it working for both Windows and
> UBUNTU.
>
> In the /gub-master diff/ I only modified the strings for two windows
> registry settings done at the installation, they reflect the changes I did
> manually on my computer: I removed the file extension .scm from
> lilypond-invoke-editor in the textedit-open command, and I removed »-e
> main«
> in both the textedit-open and the scm-file-open command.
>
> ArnoldTheresius


This is something for me to do before the next LilyPond release.

--
Phil Holmes


_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Point and Click does not work on Windows

Eluze
Phil Holmes-2 wrote
This is something for me to do before the next LilyPond release.
thanks, Phil - I wouldn't know how to do this!

Eluze
Reply | Threaded
Open this post in threaded view
|

Re: Point and Click does not work on Windows

ArnoldTheresius
Eluze wrote
Phil Holmes-2 wrote
This is something for me to do before the next LilyPond release.
thanks, Phil - I wouldn't know how to do this!

Eluze
Thank you, too.

ArnoldTheresius
12