Re: Interactive PDF Link to Notes in Preview
Il giorno gio 2 ago 2018 alle 9:28, Federico Bruni ha scritto: Il giorno lun 9 lug 2018 alle 7:26, Mats Behre <"mb.maillists"@gmail.com> ha scritto: My problem now is that SwiftDefaultApps silently fails to set this as the textedit target, possibly because my info.plist is too old (it has worked in the past): I got a silent fail also with RCDefaultApp. Today I installed SwiftDefaultApps, but when I try to open it, it says it doesn't work with Intel processors. Upgrading High Sierra fixed the problem: https://github.com/Lord-Kamina/SwiftDefaultApps/issues/1#issuecomment-409895914 I tried a simplified version of below Info.plist (I copied, as you did, the relevant part from LilyPond Info.plist). Unfortunately I could not find an easy tutorial to write your own Info.plist from scratch. It seems that normal procedure is building it in Xcode... I'm trying to figure this out with SwiftDefaultApps developer: https://github.com/Lord-Kamina/SwiftDefaultApps/issues/4 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Il giorno lun 9 lug 2018 alle 7:26, Mats Behre <"mb.maillists"@gmail.com> ha scritto: On 2018-07-08 19:56, Federico Bruni wrote: I found this: https://superuser.com/questions/548119/how-do-i-configure-custom-url-handlers-on-os-x and downloaded SwiftDefaultApps. It works on High Sierra, don't know about El Capitan, but if not it seems that RCDefaultApp should do the trick for you. Can you be more specific? What do you mean with "it works"? Which command did you assign for textedit protocol? Yesterday I read a similar answer and installed RVDefaultApp. Now I can set which application should open textedit:// URIs. However I cannot set the text editor directly, as the text editor cannot handle this protocol. I guess I should use lilypond-invoke-editor but, as I've already reported, I could not make it work on either Mac or Windows. It looks like it's the last step to get what I want. OK, then you are in more or less the same situation as me - you need a small helper app that takes the URI and invokes your editor. I have a small AppleScript app which does this (I think I got the base for it from the LilyPond site ages ago): You may simply use the same bash script that works in Linux: $ ls -l /usr/local/bin/lilypond-invoke-editor lrwxrwxrwx 1 root root 37 1 ago 16.06 /usr/local/bin/lilypond-invoke-editor -> /usr/local/bin/lilypond-wrapper.guile $ cat /usr/local/bin/lilypond-wrapper.guile #!/bin/sh export PYTHONPATH="/usr/local/lilypond/usr/lib/lilypond/current/python:/usr/local/lilypond/usr/share/lilypond/current/python:$PYTHONPATH" export GUILE_LOAD_PATH="/usr/local/lilypond/usr/share/lilypond/current" export LD_LIBRARY_PATH="/usr/local/lilypond/usr/lib:$LD_LIBRARY_PATH" me=`basename $0` exec "/usr/local/lilypond/usr/bin/guile" "/usr/local/lilypond/usr/bin/$me" "$@" I adapted it above file to the correct path in Mac and I can now launch: lilypond-invoke-editor textedit://path/to/file.ly:1:2:3 Last step left is how to tell the system to use lilypond-invoke-editor to open textedit URIs. I've created a new app containing the bash script to launch lilypond-invoke-editor, but I cannot find a way to associate it to the textedit URIs. See below. My problem now is that SwiftDefaultApps silently fails to set this as the textedit target, possibly because my info.plist is too old (it has worked in the past): I got a silent fail also with RCDefaultApp. Today I installed SwiftDefaultApps, but when I try to open it, it says it doesn't work with Intel processors. I tried a simplified version of below Info.plist (I copied, as you did, the relevant part from LilyPond Info.plist). Unfortunately I could not find an easy tutorial to write your own Info.plist from scratch. It seems that normal procedure is building it in Xcode... "http://www.apple.com/DTDs/PropertyList-1.0.dtd;> CFBundleAllowMixedLocalizations CFBundleDevelopmentRegion English CFBundleExecutable applet CFBundleIconFile applet CFBundleIdentifier com.apple.ScriptEditor.id.1A1CE0AF-AC45-4636-9B72-8CBBFCDA88F5 CFBundleInfoDictionaryVersion 6.0 CFBundleName lilypoint CFBundlePackageType APPL CFBundleSignature aplt CFBundleURLTypes CFBundleTypeRole Editor CFBundleURLName text editor via url CFBundleURLSchemes textedit LSMinimumSystemVersionByArchitecture x86_64 10.6 LSRequiresCarbon WindowState bundleDividerCollapsed bundlePositionOfDivider 0.0 dividerCollapsed eventLogLevel 2 name ScriptWindowState positionOfDivider 680 savedFrame 1238 373 1015 944 0 0 2560 1417 selectedTab log I have not yet had time to find out what the problem is - you may be luckier. /mb ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Il giorno dom 8 lug 2018 alle 0:47, Federico Bruni ha scritto: Il giorno sab 7 lug 2018 alle 19:10, Kieren MacMillan ha scritto: Hi Federico, So you are not using point-and-click from Skim to Frescobaldi, right? (it's the original subject of this discussion) Ah! No… I use Skim for previewing, zooming in/out, pagination checks, etc. — it’s so much better than Frescobaldi’s previewer — and then use Frescobaldi’s previewer for point-and-click navigation. That combo works great for me, though I suppose I'd be even happier if either Skim linked back to the Frescobaldi code, or Frescobaldi’s PDF viewer were better. I've investigated a bit. It does not depend on Skim: https://sourceforge.net/p/skim-app/mailman/message/32211547/ This app: http://www.rubicode.com/Software/RCDefaultApp/ allows to associate a command to textedit URLs. I may assign lilypond-invoke-editor, but it doesn't work in Mac. A GUB issue¹, so I'm not optimist about a possible solution. ¹ Problems with lilypond-invoke-editor in Mac: 1. Wrong shebang: $ head /Applications/LilyPond.app/Contents/Resources/bin//lilypond-invoke-editor #!/home/gub/NewGub/gub/target/tools/root/usr/bin/guile -s !# lilypond-invoke-editor.scm -- Invoke an editor in file:line:column mode The shebang should be replaced with the full path to the real Mac installation, that is: #!/Applications/LilyPond.App/Contents/Resources/bin/guile -s !# After that (and fixing the paths, see below), I can run lilypond-invoke-editor in the terminal, but only without the textedit URI. 2. GUILE_LOAD_PATH must be manually set in ~/.profile 3. libguile error (I haven't solved this) $ lilypond-invoke-editor ERROR: In procedure dynamic-link: ERROR: file: "libguile-srfi-srfi-1-v-3", message: "file not found" I solved this issue by working on some variables: $ cat .profile export PATH="$PATH:/Applications/LilyPond.app/Contents/Resources/bin:/Applications/Atom.app/Contents/MacOS" export GUILE_LOAD_PATH="/Applications/LilyPond.app/Contents/Resources/share/guile/1.8:/Applications/LilyPond.app/Contents/Resources/share/lilypond/current/scm" export LD_LIBRARY_PATH="/Applications/LilyPond.app/Contents/Resources/lib:$LD_LIBRARY_PATH" export LYEDITOR="atom %(file)s:%(line)s:%(column)s" Now I'm stuck on the same error I get also on Windows: ERROR: no code for module (scm editor) editor.scm is in the directory added to the GUILE_LOAD_PATH environment variable. Why it cannot find it? ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Windows/WSL textedit handling (was Re: Interactive PDF Link to Notes in Preview)
Il giorno gio 19 lug 2018 alle 22:15, Aaron Hill ha scritto: On 2018-07-19 10:10, Federico Bruni wrote: I made a quick try now and not surprisingly (I'm not a Windows user) did not work. This stuff is significantly advanced for the average Windows user. Also, I would consider my approach here more akin to a hack or kludge. For posterity, I will reiterate that my configuration is very unusual and not representative of a typical Windows system. Unless you too are running LilyPond via WSL and wanting to launch Visual Studio Code, then do expect work on your side to adapt things for your needs. - have you used a multistring for Classes\textedit key? Otherwise you cannot put the two lines. All strings are simple REG_SZ values. I am not sure what you mean by "the two lines", so please clarify that so I can best advise. I was confused by the text you pasted. I've now found this: https://stackoverflow.com/questions/389204/how-do-i-create-my-own-url-protocol-e-g-so and I quickly managed to register the protocol. - I guess that the CMD path to lilypond-invoke-editor is wrong (it seems a Linux path). Should I use what PowerShell gcm finds for it? It must be a Linux-centric path because I am using WSL to launch it. You could not use anything else. And PowerShell's Get-Command will not return anything useful, as it has no vision into WSL. (Someone probably has a PowerShell addon that addresses that.) Ok, I see. I'd like to try not to use WSL, if possible. I'm working on it and I might be close, but I need some help with Scheme. I'll open a new thread... ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Windows/WSL textedit handling (was Re: Interactive PDF Link to Notes in Preview)
On 2018-07-19 10:10, Federico Bruni wrote: I made a quick try now and not surprisingly (I'm not a Windows user) did not work. This stuff is significantly advanced for the average Windows user. Also, I would consider my approach here more akin to a hack or kludge. For posterity, I will reiterate that my configuration is very unusual and not representative of a typical Windows system. Unless you too are running LilyPond via WSL and wanting to launch Visual Studio Code, then do expect work on your side to adapt things for your needs. - have you used a multistring for Classes\textedit key? Otherwise you cannot put the two lines. All strings are simple REG_SZ values. I am not sure what you mean by "the two lines", so please clarify that so I can best advise. Does it have to have a special name? I would lean towards "yes", but that is not something I can definitely answer. Regardless of whether it is required or not, though, it would be best to stick to a consistent naming throughout. For your reference, I based my registry modification on an existing URI protocol handler, specifically "HKEY_CURRENT_USER\Software\Classes\vscode". I used regedit to export that section of the registry to a file, modified the file as appropriate, and then merged it back in. This simplified things since I had a specific template to follow; also it was much faster than trying to manually add keys via the GUI. NOTE: If you do the same thing, be sure that you find and replace all instances of "vscode" within the exported registry file with "textedit". You do not want to accidentally modify the wrong part of the registry. - I guess that the CMD path to lilypond-invoke-editor is wrong (it seems a Linux path). Should I use what PowerShell gcm finds for it? It must be a Linux-centric path because I am using WSL to launch it. You could not use anything else. And PowerShell's Get-Command will not return anything useful, as it has no vision into WSL. (Someone probably has a PowerShell addon that addresses that.) But keep in mind that I chose to install LilyPond to /usr/local/bin which is the default location when you run the installation script with `sudo`. You can, of course, install LilyPond to your local /home directory if you choose. As such, you will need to adjust the path accordingly. Full paths are necessary, right? In my testing, I found full paths worked best, but they are not strictly required in all cases. It really depends on your environment. To avoid confusion, though, I chose to use full paths both to be as specific as possible and to make sure it was clear what paths I had hard-coded. - C:// becomes /mnt/c in cmd scripts? Not as a strict rule, no. It all depends on what context you are talking about. If you need to reference a Windows-based path from the WSL environment, then you can use the default mount point of /mnt/c for C:\. (Any other drive letters should have equivalent mount points.) The built-in command `/bin/wslpath` can be useful for converting between Linux-centric and Windows-centric paths. I am only using it, however, as a convenient means to convert the paths LilyPond embeds in the PDF. That said, remember that the command script executes within Windows, so *it* needs to use Windows-based paths. Case in point, note that the command to launch WSL itself uses its Windows path. There is a lot of back-and-forth between Windows and WSL in the approach I outlined. Understandably, there can be confusion. On reflection, I was too terse in my email. But to be honest, I did not expect many people would run with the idea. I figured I was probably the only person using LilyPond via WSL and editing with VS Code. -- Aaron Hill ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Windows/WSL textedit handling (was Re: Interactive PDF Link to Notes in Preview)
Hi Aaron Thanks for the instructions! I haven't had the time to properly test it yet. I made a quick try now and not surprisingly (I'm not a Windows user) did not work. I have a few questions: - have you used a multistring for Classes\textedit key? Otherwise you cannot put the two lines. Does it have to have a special name? - I guess that the CMD path to lilypond-invoke-editor is wrong (it seems a Linux path). Should I use what PowerShell gcm finds for it? Full paths are necessary, right? - C:// becomes /mnt/c in cmd scripts? Il giorno mar 10 lug 2018 alle 6:11, Aaron Hill ha scritto: Hi folks, The original discussion was MacOS-focused, but it got me thinking about the Windows side of life. I run a bit of an odd setup where I use the Windows Subsystem for Linux and have LilyPond installed there, but I do all my editing in Windows with Visual Studio Code. This setup works fine except for point-n-click, which is not something I usually needed. But reading this thread made me realize that I have been missing a useful productivity aid, so I sought to get it working. Custom URL handling in Windows is pretty easy to set up. You just need to do a little registry modification, and it doesn't even require rebooting. Here is a registry file that will enable textedit for the current user: textedit.reg: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Classes\textedit] "URL Protocol"="" @="URL:textedit" [HKEY_CURRENT_USER\Software\Classes\textedit\shell] [HKEY_CURRENT_USER\Software\Classes\textedit\shell\open] [HKEY_CURRENT_USER\Software\Classes\textedit\shell\open\command] @="C:\\Tools\\textedit\\textedit.cmd %1" At this point, Windows will now know to execute a command when it encounters a textedit URL. Here is the command script that I am using: textedit.cmd: @ECHO OFF SETLOCAL SET CODE=/mnt/c/Program\ Files/Microsoft\ VS\ Code/bin/code SET URL=vscode://file/`/bin/wslpath -m %%(file)s`:%%(line)s:%%(column)s SET ENV=/usr/bin/env -i LYEDITOR='%CODE% --open-url %URL%' SET CMD=/usr/local/bin/lilypond-invoke-editor %* C:\Windows\System32\wsl.exe %ENV% %CMD% Here I am using lilypond-invoke-editor with a custom LYEDITOR variable so that it ends up launching my editor with the correct file path. Despite the back and forth, it is pretty quick providing VS Code is already running, where it only needs focus the editor and move the cursor. NOTE: There are hard-coded paths in both the registry file and command script. You would need to adapt these to your own system. Now I realize my setup is rather esoteric, but hopefully this information can still be useful. -- Aaron Hill ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
This problem was my own. The issue was easily remedied with a Control-Click on the app icon. My machine may be at the limit of system compatibility, but I'm up and running Frescobaldi. On Thu, 7/12/18, David Kastrup wrote: Subject: Re: Interactive PDF Link to Notes in Preview To: "Zone Dremik" Cc: lilypond-user@gnu.org, mats.be...@telia.com, "Peter Engelbert" Date: Thursday, July 12, 2018, 3:51 AM Zone Dremik writes: > Re: Frescobaldi & Click-to-View > > Sadly, I can not use Frescobaldi. Having upgraded to Mac OS 11.6 (El > Capitan) I find that I am unable to bypass the built-in security > feature that blocks unsigned applications. (no more freeware!) I am > able to continue using Lilypond, because (I presume) it was already on > the machine when I upgraded. If people can corroborate that, we can strike off MacOSX from the list of platforms we need to support. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Thank you community! Control-Click worked - I am now able to try Frescobaldi! On Thu, 7/12/18, Werner LEMBERG wrote: Subject: Re: Interactive PDF Link to Notes in Preview To: d...@gnu.org Cc: dremik_z...@yahoo.com, mats.be...@telia.com, lilypond-user@gnu.org, pmengelb...@gmail.com Date: Thursday, July 12, 2018, 4:11 AM >> Sadly, I can not use Frescobaldi. Having upgraded to Mac OS 11.6 >> (El Capitan) I find that I am unable to bypass the built-in >> security feature that blocks unsigned applications. (no more >> freeware!) I am able to continue using Lilypond, because (I >> presume) it was already on the machine when I upgraded. > > If people can corroborate that, we can strike off MacOSX from the > list of platforms we need to support. It seems that Zone is mistaken. https://mac-how-to.gadgethacks.com/how-to/open-third-party-apps-from-unidentified-developers-macos-0158095/ Note that I'm not a Mac OS user; I just did a quick search in the internet. Werner ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Indeed, there's a standard simple way to allow unsigned applications and this is normal for OS X, and has been for some time (although it is slightly hidden). I can confirm this continues to work at the current OS X version 10.13 High Sierra. The technique is mentioned above. No need to delete Mac from the supported systems. Andrew ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Hi, Maybe some reassuring information. I am a Mac OS user. I usually work on a MacBook Pro under Mac OSX 10-9-5 (Mavericks) but I also still have a rather ancient iMac, with El Capitan. I just copied Frescobaldi, Lilypond 2-18-2-1, LilyPond 2-19-81 and TeXShop, with its LilyPond-Engines, to this latter Mac and found that they all worked perfectly. So it seems that it is no reason (yet) to strike off MacOSX from the list of platforms we need to support. Best Regards, Robert Blackstone On 12 Jul 2018, at 10:11 , Werner LEMBERG wrote: > >>> Sadly, I can not use Frescobaldi. Having upgraded to Mac OS 11.6 >>> (El Capitan) I find that I am unable to bypass the built-in >>> security feature that blocks unsigned applications. (no more >>> freeware!) I am able to continue using Lilypond, because (I >>> presume) it was already on the machine when I upgraded. >> >> If people can corroborate that, we can strike off MacOSX from the >> list of platforms we need to support. > > It seems that Zone is mistaken. > > > https://mac-how-to.gadgethacks.com/how-to/open-third-party-apps-from-unidentified-developers-macos-0158095/ > > Note that I'm not a Mac OS user; I just did a quick search in the > internet. > > >Werner > > ___ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
>>> Sadly, I can not use Frescobaldi. Having upgraded to Mac OS 11.6 >>> (El Capitan) I find that I am unable to bypass the built-in >>> security feature that blocks unsigned applications. (no more >>> freeware!) I am able to continue using Lilypond, because (I >>> presume) it was already on the machine when I upgraded. Hello Zone, No such problem on my machine, but my Mac OS is more recent (10.13.5). Go to System Preferences, where you can allow unsigned applications. In the most recent versions, you’ll find there a button to specifically allow the last application that didn’t launch for security reasons. HTH! JM ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
>> Sadly, I can not use Frescobaldi. Having upgraded to Mac OS 11.6 >> (El Capitan) I find that I am unable to bypass the built-in >> security feature that blocks unsigned applications. (no more >> freeware!) I am able to continue using Lilypond, because (I >> presume) it was already on the machine when I upgraded. > > If people can corroborate that, we can strike off MacOSX from the > list of platforms we need to support. It seems that Zone is mistaken. https://mac-how-to.gadgethacks.com/how-to/open-third-party-apps-from-unidentified-developers-macos-0158095/ Note that I'm not a Mac OS user; I just did a quick search in the internet. Werner ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
On 2018-07-12 07:51, David Kastrup wrote: Zone Dremik writes: Re: Frescobaldi & Click-to-View Sadly, I can not use Frescobaldi. Having upgraded to Mac OS 11.6 (El Capitan) I find that I am unable to bypass the built-in security feature that blocks unsigned applications. (no more freeware!) I am able to continue using Lilypond, because (I presume) it was already on the machine when I upgraded. If people can corroborate that, we can strike off MacOSX from the list of platforms we need to support. A quick web search turned up this: https://www.wikihow.com/Install-Software-from-Unsigned-Developers-on-a-Mac According to some other posts, the newer versions of the OS make it harder than before to disable the so-called "safety" feature, which in reality is nothing more than a feeble attempt at forcing people to use the Apple Store, where Apple makes money on sales. P.S. I should disclose that I do not use a Mac, so I cannot confirm whether the wikihow article is valid. -- Aaron Hill ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Zone Dremik writes: > Re: Frescobaldi & Click-to-View > > Sadly, I can not use Frescobaldi. Having upgraded to Mac OS 11.6 (El > Capitan) I find that I am unable to bypass the built-in security > feature that blocks unsigned applications. (no more freeware!) I am > able to continue using Lilypond, because (I presume) it was already on > the machine when I upgraded. If people can corroborate that, we can strike off MacOSX from the list of platforms we need to support. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Re: Frescobaldi & Click-to-View Sadly, I can not use Frescobaldi. Having upgraded to Mac OS 11.6 (El Capitan) I find that I am unable to bypass the built-in security feature that blocks unsigned applications. (no more freeware!)I am able to continue using Lilypond, because (I presume) it was already on the machine when I upgraded. My solution: On a whim, I tried opening the PDF files from the browser program (Safari on Mac). The links work! The corresponding .ly file opens to the correct text position. The system does issue a warning that can be ignored, and I can just click refresh each time I re-compile. It's a real kludge, but it runs quite smoothly, and I am back to work! On Sat, 7/7/18, Peter Engelbert wrote: Subject: Re: Interactive PDF Link to Notes in Preview To: "Zone Dremik" , lilypond-user@gnu.org, mats.be...@telia.com Date: Saturday, July 7, 2018, 3:18 PM If you're looking to have this feature work, and are running linux, I was only able to do it by building an older version of xpdf (for the pdf viewer) and using GVim (not regular Vim) for the point and click feature. It still works but it seems the feature hasn't been updated since most people use Frescobaldi. I much prefer Vim Peter On Sat, Jul 07, 2018 at 11:10:08AM -0700, Mason Hock wrote: > On 07/07, Zone Dremik wrote: > > Click-to-View was such a valuable feature. I could click on notes, chord symbols or lyrics, and the URI link would open the correct .ly file and highlight the exact text-code. (My oldest files date from 2009. I've been enjoying this feature a long time, and really miss it.) > > Have you tried Frescobaldi? > ___ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user -Inline Attachment Follows- ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Windows/WSL textedit handling (was Re: Interactive PDF Link to Notes in Preview)
Hi folks, The original discussion was MacOS-focused, but it got me thinking about the Windows side of life. I run a bit of an odd setup where I use the Windows Subsystem for Linux and have LilyPond installed there, but I do all my editing in Windows with Visual Studio Code. This setup works fine except for point-n-click, which is not something I usually needed. But reading this thread made me realize that I have been missing a useful productivity aid, so I sought to get it working. Custom URL handling in Windows is pretty easy to set up. You just need to do a little registry modification, and it doesn't even require rebooting. Here is a registry file that will enable textedit for the current user: textedit.reg: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Classes\textedit] "URL Protocol"="" @="URL:textedit" [HKEY_CURRENT_USER\Software\Classes\textedit\shell] [HKEY_CURRENT_USER\Software\Classes\textedit\shell\open] [HKEY_CURRENT_USER\Software\Classes\textedit\shell\open\command] @="C:\\Tools\\textedit\\textedit.cmd %1" At this point, Windows will now know to execute a command when it encounters a textedit URL. Here is the command script that I am using: textedit.cmd: @ECHO OFF SETLOCAL SET CODE=/mnt/c/Program\ Files/Microsoft\ VS\ Code/bin/code SET URL=vscode://file/`/bin/wslpath -m %%(file)s`:%%(line)s:%%(column)s SET ENV=/usr/bin/env -i LYEDITOR='%CODE% --open-url %URL%' SET CMD=/usr/local/bin/lilypond-invoke-editor %* C:\Windows\System32\wsl.exe %ENV% %CMD% Here I am using lilypond-invoke-editor with a custom LYEDITOR variable so that it ends up launching my editor with the correct file path. Despite the back and forth, it is pretty quick providing VS Code is already running, where it only needs focus the editor and move the cursor. NOTE: There are hard-coded paths in both the registry file and command script. You would need to adapt these to your own system. Now I realize my setup is rather esoteric, but hopefully this information can still be useful. -- Aaron Hill ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Il giorno lun 9 lug 2018 alle 20:32, Mats Behre <"mb.maillists"@gmail.com> ha scritto: On 2018-07-09 07:56, Federico Bruni wrote: As the syntax is not Emacs, I guess that Eddie is the editor you want to use and all the emacsclient variables are just the variables you took from the original example. (BTW, I don't think you found it on lilypond website) You're guessing right. And where I got it - who knows ... If I'd written it from scratch I wouldn't have called the variables emacs :-) so obviously I found it somewhere, but never mind that. Found. We must thank Christopher: http://lilypond.1069038.n5.nabble.com/Lilypond-working-on-Mac-OS-X-10-5-thanks-td33136.html My problem now is that SwiftDefaultApps silently fails to set this as the textedit target, possibly because my info.plist is too old (it has worked in the past): This is the info.plist of which application? Eddie? No, of the helper app. Back when I did this that was a (the?) way to tell the OS that this app handled the textedit URI, but now that I've tested some more it appears that it isn't necessary (anymore?) - I could just create a new AppleScript app and add it in SwiftDefaultApps (I'm not sure exactly what I did to make the adding work though, and I'm not totally convinced that SwiftDefaultApps is bug-free). One thing I had to change in the script was quoting, see below. I removed the backslash from the space and replaced %2b with an actual plus, because I have one in my path. It's possible that there's some more generic way to translate from the URL encoding, but now it works for me. (And by works I mean that the editor is open with the cursor at the selected note.) Great news! I'll give it a try as soon as I have the chance. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
On 2018-07-09 07:56, Federico Bruni wrote: As the syntax is not Emacs, I guess that Eddie is the editor you want to use and all the emacsclient variables are just the variables you took from the original example. (BTW, I don't think you found it on lilypond website) You're guessing right. And where I got it - who knows ... If I'd written it from scratch I wouldn't have called the variables emacs :-) so obviously I found it somewhere, but never mind that. My problem now is that SwiftDefaultApps silently fails to set this as the textedit target, possibly because my info.plist is too old (it has worked in the past): This is the info.plist of which application? Eddie? No, of the helper app. Back when I did this that was a (the?) way to tell the OS that this app handled the textedit URI, but now that I've tested some more it appears that it isn't necessary (anymore?) - I could just create a new AppleScript app and add it in SwiftDefaultApps (I'm not sure exactly what I did to make the adding work though, and I'm not totally convinced that SwiftDefaultApps is bug-free). One thing I had to change in the script was quoting, see below. I removed the backslash from the space and replaced %2b with an actual plus, because I have one in my path. It's possible that there's some more generic way to translate from the URL encoding, but now it works for me. (And by works I mean that the editor is open with the cursor at the selected note.) ... and then I had to override the security setting for Eddie so it was allowed to be started (it is not created by an 'identified developer'). property urlPrefix : "textedit://" on replaceText(find, replace, subject) set prevTIDs to text item delimiters of AppleScript set text item delimiters of AppleScript to find set subject to text items of subject set text item delimiters of AppleScript to replace set subject to "" & subject set text item delimiters of AppleScript to prevTIDs return subject end replaceText on open location texteditURL -- strip prefix set the character_count to the number of characters of the urlPrefix set the emacsclientURL to (characters (the character_count + 1) thru -1 of the texteditURL) as string -- extract PATH LINE and COLUMN set AppleScript's text item delimiters to ":" set emacsclientPATH to first text item of emacsclientURL set emacsclientLINE to second text item of emacsclientURL set emacsclientCOLUMN to third text item of emacsclientURL set AppleScript's text item delimiters to "" set emacsclientPATH to replaceText("%20", " ", emacsclientPATH) set emacsclientPATH to replaceText("%2b", "+", emacsclientPATH) -- launch emacsclient do shell script "/Applications/Eddie/tellEddie " & quoted form of emacsclientPATH & ":" & emacsclientLINE & ":" & emacsclientCOLUMN end open location Good luck, Mats ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Il giorno lun 9 lug 2018 alle 7:26, Mats Behre <"mb.maillists"@gmail.com> ha scritto: On 2018-07-08 19:56, Federico Bruni wrote: I found this: https://superuser.com/questions/548119/how-do-i-configure-custom-url-handlers-on-os-x and downloaded SwiftDefaultApps. It works on High Sierra, don't know about El Capitan, but if not it seems that RCDefaultApp should do the trick for you. Can you be more specific? What do you mean with "it works"? Which command did you assign for textedit protocol? Yesterday I read a similar answer and installed RVDefaultApp. Now I can set which application should open textedit:// URIs. However I cannot set the text editor directly, as the text editor cannot handle this protocol. I guess I should use lilypond-invoke-editor but, as I've already reported, I could not make it work on either Mac or Windows. It looks like it's the last step to get what I want. OK, then you are in more or less the same situation as me - you need a small helper app that takes the URI and invokes your editor. I have a small AppleScript app which does this (I think I got the base for it from the LilyPond site ages ago): Ok, good to know there may be a solution. I don't have a Mac to test it until Wednesday/Thursday, but I will make a try this week. roperty urlPrefix : "textedit://" on replaceText(find, replace, subject) set prevTIDs to text item delimiters of AppleScript set text item delimiters of AppleScript to find set subject to text items of subject set text item delimiters of AppleScript to replace set subject to "" & subject set text item delimiters of AppleScript to prevTIDs return subject end replaceText on open location texteditURL -- strip prefix set the character_count to the number of characters of the urlPrefix set the emacsclientURL to (characters (the character_count + 1) thru -1 of the texteditURL) as string -- extract PATH LINE and COLUMN set AppleScript's text item delimiters to ":" set emacsclientPATH to first text item of emacsclientURL set emacsclientLINE to second text item of emacsclientURL set emacsclientCOLUMN to third text item of emacsclientURL set AppleScript's text item delimiters to "" set emacsclientPATH to replaceText("%20", "\\ ", emacsclientPATH) -- launch emacsclient do shell script "/Applications/Eddie/tellEddie " & quoted form of emacsclientPATH & ":" & emacsclientLINE & ":" & emacsclientCOLUMN end open location As the syntax is not Emacs, I guess that Eddie is the editor you want to use and all the emacsclient variables are just the variables you took from the original example. (BTW, I don't think you found it on lilypond website) My problem now is that SwiftDefaultApps silently fails to set this as the textedit target, possibly because my info.plist is too old (it has worked in the past): This is the info.plist of which application? Eddie? Have you tried other text editors? You may try Atom (see atom.io website). Its syntax (not yet documented) is the same as above example: `atom file:line:column`. "http://www.apple.com/DTDs/PropertyList-1.0.dtd;> CFBundleAllowMixedLocalizations CFBundleDevelopmentRegion English CFBundleExecutable applet CFBundleIconFile applet CFBundleIdentifier com.apple.ScriptEditor.id.1A1CE0AF-AC45-4636-9B72-8CBBFCDA88F5 CFBundleInfoDictionaryVersion 6.0 CFBundleName lilypoint CFBundlePackageType APPL CFBundleSignature aplt CFBundleURLTypes CFBundleTypeRole Editor CFBundleURLName text editor via url CFBundleURLSchemes textedit LSMinimumSystemVersionByArchitecture x86_64 10.6 LSRequiresCarbon WindowState bundleDividerCollapsed bundlePositionOfDivider 0.0 dividerCollapsed eventLogLevel 2 name ScriptWindowState positionOfDivider 680 savedFrame 1238 373 1015 944 0 0 2560 1417 selectedTab log I have not yet had time to find out what the problem is - you may be luckier. /mb ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
On 2018-07-08 19:56, Federico Bruni wrote: I found this: https://superuser.com/questions/548119/how-do-i-configure-custom-url-handlers-on-os-x and downloaded SwiftDefaultApps. It works on High Sierra, don't know about El Capitan, but if not it seems that RCDefaultApp should do the trick for you. Can you be more specific? What do you mean with "it works"? Which command did you assign for textedit protocol? Yesterday I read a similar answer and installed RVDefaultApp. Now I can set which application should open textedit:// URIs. However I cannot set the text editor directly, as the text editor cannot handle this protocol. I guess I should use lilypond-invoke-editor but, as I've already reported, I could not make it work on either Mac or Windows. It looks like it's the last step to get what I want. OK, then you are in more or less the same situation as me - you need a small helper app that takes the URI and invokes your editor. I have a small AppleScript app which does this (I think I got the base for it from the LilyPond site ages ago): roperty urlPrefix : "textedit://" on replaceText(find, replace, subject) set prevTIDs to text item delimiters of AppleScript set text item delimiters of AppleScript to find set subject to text items of subject set text item delimiters of AppleScript to replace set subject to "" & subject set text item delimiters of AppleScript to prevTIDs return subject end replaceText on open location texteditURL -- strip prefix set the character_count to the number of characters of the urlPrefix set the emacsclientURL to (characters (the character_count + 1) thru -1 of the texteditURL) as string -- extract PATH LINE and COLUMN set AppleScript's text item delimiters to ":" set emacsclientPATH to first text item of emacsclientURL set emacsclientLINE to second text item of emacsclientURL set emacsclientCOLUMN to third text item of emacsclientURL set AppleScript's text item delimiters to "" set emacsclientPATH to replaceText("%20", "\\ ", emacsclientPATH) -- launch emacsclient do shell script "/Applications/Eddie/tellEddie " & quoted form of emacsclientPATH & ":" & emacsclientLINE & ":" & emacsclientCOLUMN end open location My problem now is that SwiftDefaultApps silently fails to set this as the textedit target, possibly because my info.plist is too old (it has worked in the past): http://www.apple.com/DTDs/PropertyList-1.0.dtd;> CFBundleAllowMixedLocalizations CFBundleDevelopmentRegion English CFBundleExecutable applet CFBundleIconFile applet CFBundleIdentifier com.apple.ScriptEditor.id.1A1CE0AF-AC45-4636-9B72-8CBBFCDA88F5 CFBundleInfoDictionaryVersion 6.0 CFBundleName lilypoint CFBundlePackageType APPL CFBundleSignature aplt CFBundleURLTypes CFBundleTypeRole Editor CFBundleURLName text editor via url CFBundleURLSchemes textedit LSMinimumSystemVersionByArchitecture x86_64 10.6 LSRequiresCarbon WindowState bundleDividerCollapsed bundlePositionOfDivider 0.0 dividerCollapsed eventLogLevel 2 name ScriptWindowState positionOfDivider 680 savedFrame 1238 373 1015 944 0 0 2560 1417 selectedTab log I have not yet had time to find out what the problem is - you may be luckier. /mb ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Il 08 lug 2018 16:21, Mats Behre ha scritto:On 2018-07-07 18:54, Federico Bruni wrote: > > > Il giorno sab 7 lug 2018 alle 18:49, Kieren MacMillan ha scritto: >> Hi all, >> >>> I would be interested to know how other users make corrections to the scores they have typeset. […] Switching to Skim or another PDF viewer is a logical suggestion. >> >> Skim works great for me. >> > > Kieren, I can't believe you use the text edito bundled in the LilyPond app! :-) > Which text editor are you using? > How did you set Skim to open the editor you want? > I found this: https://superuser.com/questions/548119/how-do-i-configure-custom-url-handlers-on-os-x and downloaded SwiftDefaultApps. It works on High Sierra, don't know about El Capitan, but if not it seems that RCDefaultApp should do the trick for you. Can you be more specific?What do you mean with "it works"?Which command did you assign for textedit protocol?Yesterday I read a similar answer and installed RVDefaultApp. Now I can set which application should open textedit:// URIs.However I cannot set the text editor directly, as the text editor cannot handle this protocol.I guess I should use lilypond-invoke-editor but, as I've already reported, I could not make it work on either Mac or Windows.It looks like it's the last step to get what I want.___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
On 2018-07-07 18:54, Federico Bruni wrote: Il giorno sab 7 lug 2018 alle 18:49, Kieren MacMillan ha scritto: Hi all, I would be interested to know how other users make corrections to the scores they have typeset. […] Switching to Skim or another PDF viewer is a logical suggestion. Skim works great for me. Kieren, I can't believe you use the text edito bundled in the LilyPond app! :-) Which text editor are you using? How did you set Skim to open the editor you want? I found this: https://superuser.com/questions/548119/how-do-i-configure-custom-url-handlers-on-os-x and downloaded SwiftDefaultApps. It works on High Sierra, don't know about El Capitan, but if not it seems that RCDefaultApp should do the trick for you. /mb ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Il giorno sab 7 lug 2018 alle 19:10, Kieren MacMillan ha scritto: Hi Federico, So you are not using point-and-click from Skim to Frescobaldi, right? (it's the original subject of this discussion) Ah! No… I use Skim for previewing, zooming in/out, pagination checks, etc. — it’s so much better than Frescobaldi’s previewer — and then use Frescobaldi’s previewer for point-and-click navigation. That combo works great for me, though I suppose I'd be even happier if either Skim linked back to the Frescobaldi code, or Frescobaldi’s PDF viewer were better. I've investigated a bit. It does not depend on Skim: https://sourceforge.net/p/skim-app/mailman/message/32211547/ This app: http://www.rubicode.com/Software/RCDefaultApp/ allows to associate a command to textedit URLs. I may assign lilypond-invoke-editor, but it doesn't work in Mac. A GUB issue¹, so I'm not optimist about a possible solution. I wonder how the LilyPond app manages to pass the right command to open the URLS. I've grepped textedit in the LilyPond.App dir and found something in the .plist file, but again it's too much for my first day as a temporary Mac user :-) ¹ Problems with lilypond-invoke-editor in Mac: 1. Wrong shebang: $ head /Applications/LilyPond.app/Contents/Resources/bin//lilypond-invoke-editor #!/home/gub/NewGub/gub/target/tools/root/usr/bin/guile -s !# lilypond-invoke-editor.scm -- Invoke an editor in file:line:column mode 2. GUILE_LOAD_PATH must be manually set in ~/.profile 3. libguile error (I haven't solved this) $ lilypond-invoke-editor ERROR: In procedure dynamic-link: ERROR: file: "libguile-srfi-srfi-1-v-3", message: "file not found" ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Il giorno sab 7 lug 2018 alle 21:32, David Kastrup ha scritto: Peter Engelbert writes: If you're looking to have this feature work, and are running linux, I was only able to do it by building an older version of xpdf (for the pdf viewer) and using GVim (not regular Vim) for the point and click feature. It still works but it seems the feature hasn't been updated since most people use Frescobaldi. I much prefer Vim Huh? Should work with anything you put in the EDITOR variable really. Use it with emacsclient myself and a current version of Xpdf on Ubuntu. I think it would also work with Evince et al (following instructions in UG) but haven't tried recently. Let me try: Ok, refuses due to "permissions" in Evince, works in Atril. Checking the Evince setup according to UG... It's set up like described. But it would appear like since I am not running GNOME actually (but xfce4) that Evince is missing its infrastructure. Like gnome-open or gvfs-open. Evince works out of the box (without the need of any further configuration) in recent GNOME. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Peter Engelbert writes: > If you're looking to have this feature work, and are running linux, I > was only able to do it by building an older version of xpdf (for the > pdf viewer) and using GVim (not regular Vim) for the point and click > feature. It still works but it seems the feature hasn't been updated > since most people use Frescobaldi. I much prefer Vim Huh? Should work with anything you put in the EDITOR variable really. Use it with emacsclient myself and a current version of Xpdf on Ubuntu. I think it would also work with Evince et al (following instructions in UG) but haven't tried recently. Let me try: Ok, refuses due to "permissions" in Evince, works in Atril. Checking the Evince setup according to UG... It's set up like described. But it would appear like since I am not running GNOME actually (but xfce4) that Evince is missing its infrastructure. Like gnome-open or gvfs-open. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
If you're looking to have this feature work, and are running linux, I was only able to do it by building an older version of xpdf (for the pdf viewer) and using GVim (not regular Vim) for the point and click feature. It still works but it seems the feature hasn't been updated since most people use Frescobaldi. I much prefer Vim Peter On Sat, Jul 07, 2018 at 11:10:08AM -0700, Mason Hock wrote: > On 07/07, Zone Dremik wrote: > > Click-to-View was such a valuable feature. I could click on notes, chord > > symbols or lyrics, and the URI link would open the correct .ly file and > > highlight the exact text-code. (My oldest files date from 2009. I've been > > enjoying this feature a long time, and really miss it.) > > Have you tried Frescobaldi? > ___ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
On 07/07, Zone Dremik wrote: > Click-to-View was such a valuable feature. I could click on notes, chord > symbols or lyrics, and the URI link would open the correct .ly file and > highlight the exact text-code. (My oldest files date from 2009. I've been > enjoying this feature a long time, and really miss it.) Have you tried Frescobaldi? signature.asc Description: PGP signature ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Hi Federico, > So you are not using point-and-click from Skim to Frescobaldi, right? (it's > the original subject of this discussion) Ah! No… I use Skim for previewing, zooming in/out, pagination checks, etc. — it’s so much better than Frescobaldi’s previewer — and then use Frescobaldi’s previewer for point-and-click navigation. That combo works great for me, though I suppose I'd be even happier if either Skim linked back to the Frescobaldi code, or Frescobaldi’s PDF viewer were better. Sorry for the noise! Kieren. Kieren MacMillan, composer ‣ website: www.kierenmacmillan.info ‣ email: i...@kierenmacmillan.info ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Il giorno sab 7 lug 2018 alle 19:05, Kieren MacMillan ha scritto: Hi Federico, Kieren, I can't believe you use the text edito bundled in the LilyPond app! :-) Which text editor are you using? Frescobaldi. How did you set Skim to open the editor you want? I just manually launch the PDF in Skim once, and place it on my second screen (Frescobaldi takes up the first screen). After that, Skim automatically updates whenever Frescobaldi finishes compiling the PDF. So you are not using point-and-click from Skim to Frescobaldi, right? (it's the original subject of this discussion) ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Hi Federico, > Kieren, I can't believe you use the text edito bundled in the LilyPond app! > :-) > Which text editor are you using? Frescobaldi. > How did you set Skim to open the editor you want? I just manually launch the PDF in Skim once, and place it on my second screen (Frescobaldi takes up the first screen). After that, Skim automatically updates whenever Frescobaldi finishes compiling the PDF. Cheers, Kieren. Kieren MacMillan, composer ‣ website: www.kierenmacmillan.info ‣ email: i...@kierenmacmillan.info ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Il giorno sab 7 lug 2018 alle 18:49, Kieren MacMillan ha scritto: Hi all, I would be interested to know how other users make corrections to the scores they have typeset. […] Switching to Skim or another PDF viewer is a logical suggestion. Skim works great for me. Kieren, I can't believe you use the text edito bundled in the LilyPond app! :-) Which text editor are you using? How did you set Skim to open the editor you want? ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Hi all, > I would be interested to know how other users make corrections to the scores > they have typeset. […] Switching to Skim or another PDF viewer is a logical > suggestion. Skim works great for me. Hope this helps! Kieren. Kieren MacMillan, composer ‣ website: www.kierenmacmillan.info ‣ email: i...@kierenmacmillan.info ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Click-to-View was such a valuable feature. I could click on notes, chord symbols or lyrics, and the URI link would open the correct .ly file and highlight the exact text-code. (My oldest files date from 2009. I've been enjoying this feature a long time, and really miss it.) This was with Mac OS 10.8.6 (Mountain Lion). I upgraded last month to OS 11 (El Capitan) I would be interested to know how other users make corrections to the scores they have typeset. I am not enjoying the need to read through all the text to fix wrong notes and typos. (I have many!) Switching to Skim or another PDF viewer is a logical suggestion. I would appreciate hearing from any users who who can verify whether the URIs properly. I suspect Apple is now suppressing any links and scripts embedded in PDFs for security reasons. On Sat, 7/7/18, Mats Behre wrote: Subject: Re: Interactive PDF Link to Notes in Preview To: "Zone Dremik" , lilypond-user@gnu.org Date: Saturday, July 7, 2018, 4:26 AM On 2018-07-03 18:47, Zone Dremik wrote: > Hello, > After a recent upgrade to my computer, the function that links music notes (and lyrics) in the PDF viewer, to the text in the Lilypond files, has stopped working. > > The ability to click on notes and lyrics in the preview screen, and have the exact point highlighted in the corresponding Lilypond file was so enormously useful, that the loss of this function has become a great barrier to efficient use of the program. > > I am using Lilypond Version 2.18.2-1 > Apple Macintosh System 10.11.6 > Apple Preview Version 8.1 (877.7) I don't think I have ever managed to get this to work with Preview, and my first attempt was way before Sierra, so I'm not sure it has ever worked. (10.11 is El Capitan, by the way ...) I have used Acrobat Reader instead, but Preview updates the page when you rebuild, with Acrobat doesn't, so it's not ideal. Others have mentioned Skim, perhaps that's something to take a look at. /mb ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Il giorno sab 7 lug 2018 alle 10:26, Mats Behre <"mats.behre"@telia.com> ha scritto: On 2018-07-03 18:47, Zone Dremik wrote: Hello, After a recent upgrade to my computer, the function that links music notes (and lyrics) in the PDF viewer, to the text in the Lilypond files, has stopped working. The ability to click on notes and lyrics in the preview screen, and have the exact point highlighted in the corresponding Lilypond file was so enormously useful, that the loss of this function has become a great barrier to efficient use of the program. I am using Lilypond Version 2.18.2-1 Apple Macintosh System 10.11.6 Apple Preview Version 8.1 (877.7) I don't think I have ever managed to get this to work with Preview, and my first attempt was way before Sierra, so I'm not sure it has ever worked. (10.11 is El Capitan, by the way ...) I have used Acrobat Reader instead, but Preview updates the page when you rebuild, with Acrobat doesn't, so it's not ideal. Others have mentioned Skim, perhaps that's something to take a look at. Today I had the chance to try my father's Mac. I confirm that Acrobat Reader follows the textedit URIs and open the LilyPond app, but cannot refresh the document when the file is updated. I've read that this feature is only in the Pro version. Ok, let's forget about proprietary software. I've now installed Skim reader, which works great: - it opens LilyPond app when you click on the notes - it's opened by LilyPond app when you compile the music, if you set Skim as default PDF viewer - you can set automatic refresh in the preferences Now the last thing I'd like to change is the application to launch: I want to replace the (primitive) LilyPond app with a more modern text editor. Does anybody know how to do it? I guess I'll write a small post on lilypondblog.org if I manage to get all working. Thanks Federico ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
On 2018-07-03 18:47, Zone Dremik wrote: Hello, After a recent upgrade to my computer, the function that links music notes (and lyrics) in the PDF viewer, to the text in the Lilypond files, has stopped working. The ability to click on notes and lyrics in the preview screen, and have the exact point highlighted in the corresponding Lilypond file was so enormously useful, that the loss of this function has become a great barrier to efficient use of the program. I am using Lilypond Version 2.18.2-1 Apple Macintosh System 10.11.6 Apple Preview Version 8.1 (877.7) I don't think I have ever managed to get this to work with Preview, and my first attempt was way before Sierra, so I'm not sure it has ever worked. (10.11 is El Capitan, by the way ...) I have used Acrobat Reader instead, but Preview updates the page when you rebuild, with Acrobat doesn't, so it's not ideal. Others have mentioned Skim, perhaps that's something to take a look at. /mb ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Aaron, that your .cmd script makes sure that lilypond-invoke-editor is seen by PowerShell, but of course below problem is not solved: PS C:\Program Files (x86)\LilyPond\usr\bin> .\lilypond-invoke-editor ERROR: In procedure dynamic-link: ERROR: file: "libguile-srfi-srfi-1-v-3", message: "can't open the module" Il giorno ven 6 lug 2018 alle 18:36, Federico Bruni ha scritto: Il giorno ven 6 lug 2018 alle 14:59, Aaron Hill ha scritto: On 2018-07-05 22:35, Federico Bruni wrote: So the question is why lilypond-invoke-editor is not considered as a program by Windows shell. Perhaps because it does not end with .exe? Should it be made executable? I don't know Windows at all... `lilypond-invoke-editor` is intended to be interpreted by Guile; but since it has no file extension, Windows cannot invoke an associated program. You should be able to wrap it up with a command shell script easily enough... lilypond-invoke-editor.cmd: @ECHO OFF SETLOCAL SET LILYPOND_BIN=C:\Program Files (x86)\LilyPond\usr\bin "%LILYPOND_BIN%\guile" -e main "%LILYPOND_BIN%\lilypond-invoke-editor" %* I should warn that I have not tested this, as I do not have an installation of LilyPond on Windows. But, the principle should be sound. I first tried the command on PowerShell: PS C:\Program Files (x86)\LilyPond\usr\bin> guile.exe -e main lilypond-invoke-editor ERROR: In procedure dynamic-link: ERROR: file: "libguile-srfi-srfi-1-v-3", message: "can't open the module" I see that this problem was already reported: http://lilypond.1069038.n5.nabble.com/GUB-guile-fails-to-open-lilypond-invoke-editor-script-td81139.html By default, GUILE_LOAD_PATH is not set. If I set it in current shell: PS C:\Users\fede> $env:GUILE_LOAD_PATH="C:\Program Files (x86)\LilyPond\usr\share\guile\1.8" PS C:\Users\fede> Get-ChildItem Env:GUILE_LOAD_PATH Name Value - GUILE_LOAD_PATHC:\Program Files (x86)\LilyPond\usr\share\guile\1.8 I get the same error. PS Vaguely related: https://sourceforge.net/p/testlilyissues/issues/2279/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Il giorno ven 6 lug 2018 alle 14:59, Aaron Hill ha scritto: On 2018-07-05 22:35, Federico Bruni wrote: So the question is why lilypond-invoke-editor is not considered as a program by Windows shell. Perhaps because it does not end with .exe? Should it be made executable? I don't know Windows at all... `lilypond-invoke-editor` is intended to be interpreted by Guile; but since it has no file extension, Windows cannot invoke an associated program. You should be able to wrap it up with a command shell script easily enough... lilypond-invoke-editor.cmd: @ECHO OFF SETLOCAL SET LILYPOND_BIN=C:\Program Files (x86)\LilyPond\usr\bin "%LILYPOND_BIN%\guile" -e main "%LILYPOND_BIN%\lilypond-invoke-editor" %* I should warn that I have not tested this, as I do not have an installation of LilyPond on Windows. But, the principle should be sound. I first tried the command on PowerShell: PS C:\Program Files (x86)\LilyPond\usr\bin> guile.exe -e main lilypond-invoke-editor ERROR: In procedure dynamic-link: ERROR: file: "libguile-srfi-srfi-1-v-3", message: "can't open the module" I see that this problem was already reported: http://lilypond.1069038.n5.nabble.com/GUB-guile-fails-to-open-lilypond-invoke-editor-script-td81139.html By default, GUILE_LOAD_PATH is not set. If I set it in current shell: PS C:\Users\fede> $env:GUILE_LOAD_PATH="C:\Program Files (x86)\LilyPond\usr\share\guile\1.8" PS C:\Users\fede> Get-ChildItem Env:GUILE_LOAD_PATH Name Value - GUILE_LOAD_PATHC:\Program Files (x86)\LilyPond\usr\share\guile\1.8 I get the same error. PS Vaguely related: https://sourceforge.net/p/testlilyissues/issues/2279/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
On 2018-07-05 22:35, Federico Bruni wrote: So the question is why lilypond-invoke-editor is not considered as a program by Windows shell. Perhaps because it does not end with .exe? Should it be made executable? I don't know Windows at all... `lilypond-invoke-editor` is intended to be interpreted by Guile; but since it has no file extension, Windows cannot invoke an associated program. You should be able to wrap it up with a command shell script easily enough... lilypond-invoke-editor.cmd: @ECHO OFF SETLOCAL SET LILYPOND_BIN=C:\Program Files (x86)\LilyPond\usr\bin "%LILYPOND_BIN%\guile" -e main "%LILYPOND_BIN%\lilypond-invoke-editor" %* I should warn that I have not tested this, as I do not have an installation of LilyPond on Windows. But, the principle should be sound. -- Aaron Hill ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Il giorno gio 5 lug 2018 alle 18:57, Anders Eriksson ha scritto: On 2018-07-05 18:30, Federico Bruni wrote: If I type lilypond and then hit TAB, it's not in the available commands ON windows the Tab completion only "sees" programs in the current directory or if you already have entered a path, the directory the path is pointing to. So if you don't get an completion then there isn't any program that begins with 'lilypond' in the directory I do get completion for three programs starting with lilypond. IIRC, lilypond.exe, lilypond-book.exe and lilypond-windows.exe. I got these while I was in a different directory, since that directory, as I wrote, is in the PATH. So the question is why lilypond-invoke-editor is not considered as a program by Windows shell. Perhaps because it does not end with .exe? Should it be made executable? I don't know Windows at all... ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Hi Anders, Federico, F: Not Notes. No such thing I have seen. You probably mean TextEdit, the basic standard supplied text editor. It's been a while since I used my Mac for lilypond, so I can't remember, but I think any text editor could be made to work. Since it now cannot due to Apple's decision (why do they keep reducing functionality?) it is no longer relevant. A: You can get tab completion plugins for PowerShell if you hunt around. Also, as mentioned, Skim works for this purpose last time I used it. https://skim-app.sourceforge.io/ Andrew On 6 July 2018 at 02:57, Anders Eriksson wrote: > > > On 2018-07-05 18:30, Federico Bruni wrote: > >> If I type lilypond and then hit TAB, it's not in the available commands >> > > ON windows the Tab completion only "sees" programs in the current > directory or if you already have entered a path, the directory the path is > pointing to. > > So if you don't get an completion then there isn't any program that begins > with 'lilypond' in the directory > > // Anders > > ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
On 2018-07-05 18:30, Federico Bruni wrote: If I type lilypond and then hit TAB, it's not in the available commands ON windows the Tab completion only "sees" programs in the current directory or if you already have entered a path, the directory the path is pointing to. So if you don't get an completion then there isn't any program that begins with 'lilypond' in the directory // Anders ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Il giorno gio 5 lug 2018 alle 16:57, Andrew Bernard <"andrew.bernard"@gmail.com> ha scritto: I do sometimes use a Mac, and I do also now recall that Apple removed that functionality in Preview in Sierra, so nothing can be done to fix it. Skim seems to be one good solution. But how about Frescobaldi? I jumped in this discussion, as a non-Mac-user, because I'm writing a blog post which includes a part about using editors other than Frescobaldi. The Usage manual¹ doesn't say that the instructions for point-and-click are valid for Linux only, so I though that a similar mechanism could work at least in Mac (and maybe on Windows). ¹ http://lilypond.org/doc/v2.19/Documentation/usage/configuring-the-system-for-point-and-click.html I've now learned that: - it used to work in Mac before Sierra, but I wonder if you were able to set an editor different from Notes... - it doesn't work in Windows or at least I'm not sure how to make it work. I have added lilypond installation directory to the path, in fact I can run lilypond in the PowerShell. But I cannot run lilypond-invoke-editor. If I type lilypond and then hit TAB, it's not in the available commands. If on Linux I do: $ file `which lilypond-invoke-editor` /usr/bin/lilypond-invoke-editor: a /usr/bin/guile1.8 -s script, ASCII text executable Any Windows expert who can help? ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Hi Zone, For some reason I can't see your original post anymore. Anyway, since somebody mentioned Skim, I now recall there was a length discussion of this exact same topic in the list a while ago. It would be worth you while to look at the archives. I do sometimes use a Mac, and I do also now recall that Apple removed that functionality in Preview in Sierra, so nothing can be done to fix it. Skim seems to be one good solution. But how about Frescobaldi? Andrew On 4 July 2018 at 04:04, Federico Bruni wrote: > Hello Zon > > Il giorno mar 3 lug 2018 alle 18:47, Zone Dremik > ha scritto: > >> Hello, >> After a recent upgrade to my computer, the function that links music >> notes (and lyrics) in the PDF viewer, to the text in the Lilypond files, >> has stopped working. >> >> > ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Hello, After a recent upgrade to my computer, the function that links music notes (and lyrics) in the PDF viewer, to the text in the Lilypond files, has stopped working. I believe the since Mac Os Sierra came around, Apple has discontinued the ability for users to click notes on the music in Preview. I ran in to the same problem a while back. So, I have been using the app called Skim that works with note clicking. -- Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Yes, it's possible that LilyPond application for Mac may become incompatible with recent Mac versions. Please keep the list in Cc, as I'm not a Mac user and cannot help you. Il giorno gio 5 lug 2018 alle 9:02, Zone Dremik ha scritto: I am not using a text editor at all. For the last nine years, I have been running the Lilypond application through the standard Macintosh GUI. I have never needed to use any command line functions, or interact with any helper scripts or apps. (I don't actually see any other process running other than the Lilypond app). The app has always created, saved, and compiled the files containing the lilypond code ( with .ly extension). When the output PDF is created, Lilypond communicates with the operating system to open the PDF in the Apple Brand PDF viewer called PREVIEW. Clicking the notes in preview would normally cause the corresponding .ly file to open in Lilypond, with the specific code highlighted within the text. It has worked beautifully all these years, through several Mac system upgrades. However, I see from the Lilypond download page that the most recent system support is for Mac OS 10.4, while the current system is up to OS 13.0 is it possible that Lilypond is becoming incompatible with Apple products? On Tue, 7/3/18, Federico Bruni wrote: Subject: Re: Interactive PDF Link to Notes in Preview To: "Zone Dremik" Cc: lilypond-user@gnu.org Date: Tuesday, July 3, 2018, 2:14 PM Il giorno mar 3 lug 2018 alle 20:04, Federico Bruni ha scritto: > Hello Zon > > Il giorno mar 3 lug 2018 alle 18:47, Zone Dremik > ha scritto: >> Hello, >> After a recent upgrade to my computer, the function that links music >> notes (and lyrics) in the PDF viewer, to the text in the Lilypond >> files, has stopped working. >> > > Which text editor are you using? > How did you set your system to enable point-and-click? In other > words, what's the command you assigned to the EDITOR or LYEDITOR > variables? > > Read: > http://lilypond.org/doc/v2.19/Documentation/usage/configuring-the-system-for-point-and-click.html > > (this page was changed recently, but the change has not been released > yet) > Sorry, it's written in the subject: it's Notes. I'm not a Mac user and cannot help much. You should check if Notes supports opening a file in a precise location (line and column) and see what's the correct syntax to use. Are you sure it used to work with Notes in the past or you are making confusion with something else? I may help if you want to use editors which can run on multiple operating systems, including Linux. The patch I mentioned before is here: https://codereview.appspot.com/357720043/diff/1/Documentation/usage/external.itely ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Am 03.07.2018 um 18:47 schrieb Zone Dremik: Hello, After a recent upgrade to my computer, the function that links music notes (and lyrics) in the PDF viewer, to the text in the Lilypond files, has stopped working. The ability to click on notes and lyrics in the preview screen, and have the exact point highlighted in the corresponding Lilypond file was so enormously useful, that the loss of this function has become a great barrier to efficient use of the program. I am using Lilypond Version 2.18.2-1 Apple Macintosh System 10.11.6 Apple Preview Version 8.1 (877.7) Nothing has changed in lilypond 2.18.2-1, you have to configure your system to handle the textedit links lilypond inserts in the pdf. Be aware of the fact that lilypond-invoke-editor, the script that handles textedit links in lilypond, is insecure. The problem has been fixed in recent versions of lilypond. Knut ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
> On 3 Jul 2018, at 20:14, Federico Bruni wrote: > >> Read: >> http://lilypond.org/doc/v2.19/Documentation/usage/configuring-the-system-for-point-and-click.html >> (this page was changed recently, but the change has not been released yet) > > I'm not a Mac user and cannot help much. Indeed, the environment variable EDITOR is not used on MacOS in favor of another lookup system. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
> On 3 Jul 2018, at 18:47, Zone Dremik wrote: > > Hello, > After a recent upgrade to my computer, the function that links music notes > (and lyrics) in the PDF viewer, to the text in the Lilypond files, has > stopped working. > > The ability to click on notes and lyrics in the preview screen, and have the > exact point highlighted in the corresponding Lilypond file was so enormously > useful, that the loss of this function has become a great barrier to > efficient use of the program. > > I am using Lilypond Version 2.18.2-1 > Apple Macintosh System 10.11.6 > Apple Preview Version 8.1 (877.7) It might be Preview that is broken, because I can take the links in PDF from a text editor and run them in Terminal, and then it works. You can try this by using the Terminal command less .pdf answer 'yes' to open a binary, hit until you see a link of the form textedit:///Users/.../.ly:40:2:3 Copy such a link, and run open textedit:///Users/.../.ly:40:2:3 On my computer, the LilyPond app opens, and the text is selected. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Il giorno mar 3 lug 2018 alle 20:04, Federico Bruni ha scritto: Hello Zon Il giorno mar 3 lug 2018 alle 18:47, Zone Dremik ha scritto: Hello, After a recent upgrade to my computer, the function that links music notes (and lyrics) in the PDF viewer, to the text in the Lilypond files, has stopped working. Which text editor are you using? How did you set your system to enable point-and-click? In other words, what's the command you assigned to the EDITOR or LYEDITOR variables? Read: http://lilypond.org/doc/v2.19/Documentation/usage/configuring-the-system-for-point-and-click.html (this page was changed recently, but the change has not been released yet) Sorry, it's written in the subject: it's Notes. I'm not a Mac user and cannot help much. You should check if Notes supports opening a file in a precise location (line and column) and see what's the correct syntax to use. Are you sure it used to work with Notes in the past or you are making confusion with something else? I may help if you want to use editors which can run on multiple operating systems, including Linux. The patch I mentioned before is here: https://codereview.appspot.com/357720043/diff/1/Documentation/usage/external.itely ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Interactive PDF Link to Notes in Preview
Hello Zon Il giorno mar 3 lug 2018 alle 18:47, Zone Dremik ha scritto: Hello, After a recent upgrade to my computer, the function that links music notes (and lyrics) in the PDF viewer, to the text in the Lilypond files, has stopped working. Which text editor are you using? How did you set your system to enable point-and-click? In other words, what's the command you assigned to the EDITOR or LYEDITOR variables? Read: http://lilypond.org/doc/v2.19/Documentation/usage/configuring-the-system-for-point-and-click.html (this page was changed recently, but the change has not been released yet) The ability to click on notes and lyrics in the preview screen, and have the exact point highlighted in the corresponding Lilypond file was so enormously useful, that the loss of this function has become a great barrier to efficient use of the program. I am using Lilypond Version 2.18.2-1 Apple Macintosh System 10.11.6 Apple Preview Version 8.1 (877.7) We need to know the text editor you want to use. I tried to look through the user-forums, but could not find the right search terms to describe this function. (Should this post be sent to Lilypond_Bugs instead?) This is the correct list for this question. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user