lilypond-user
[Top][All Lists]
Advanced

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

Re: Configuration Point & Click


From: David Wright
Subject: Re: Configuration Point & Click
Date: Thu, 7 Feb 2019 21:16:30 -0600
User-agent: NeoMutt/20170113 (1.7.2)

This post was written Sat, 2 Feb 2019 13:18:17 -0600 and has
been blocked three times already, so it's rather late arriving.

On Fri 01 Feb 2019 at 17:33:34 (-0700), foxfanfare wrote:
> foxfanfare wrote
> > And again, what is strange is that I have to launch zathura through vim if
> > I
> > want it to react to the link. If I launch the PDF alone in Zathura and
> > click
> > on the link, for instance
> > textedit:///home/remy/Documents/test/test.ly:5:4:5
> > goes directly to the browser. Maybe zathura isn't configured properly and
> > should add xdg-open before the link? 
> 
> OK for that part I just understood where the problem was. I used to launch
> the PDF directly from my file browser (currently ranger). The PDF shows
> correctly but the links redirect to the web browser. But if I just open a
> terminal and launch the PDF from there, the PDF opens at his side and then
> the link is redirected directly to vim in the previous terminal.
> 
> Still, I can't manage to skip all the warning like "Vim: Warning: Input is
> not from a terminal" and E325 which tend to make vim unusable. I don't have
> the feeling that the server mode solves this. I also tried with
> remote-silent but it is the same.

I'm trying to replicate your problem, but can only go so far with my
system (Debian 9 stretch, no DE, no DM, just fvwm) which may be quite
different from yours.

I think we've settled the server part of vim. I type

    $ gvim¹ --servername GVIM

using the name GVIM merely because that's the name used in the error
message whenever the server is absent².

My preferred viewer is currently xpdf, though I have resurrected
zathura because it's useful to have a libpoppler renderer and I
like it better than evince. In .xpdfrc I changed

    urlCommand  "sensible-browser '%s'"

to

    urlCommand  "lilypond-invoke-editor %s"

as per the LilyPond docs.

I now open the LilyPond PDF output file in xpdf called from an
unrelated xterm. I've set the environment locally here because
I normally use emacs.

    $ EDITOR=gvim xpdf windmills.pdf

That PDF file is stuffed full of lines like

    /A<</URI(textedit:///tmp/windmills.ly:66:14:15)

When I hover on a note in the PDF, the textedit command
appears in the status bar at the bottom of the xpdf window.
When I click on it,

    lilypond-invoke-editor (GNU LilyPond) 2.18.2

is written under the xpdf command line, and the source file
/tmp/windmills.ly appears in the vim server window.

    :if !exists('+acd')||!&acd|if haslocaldir()|cd -|lcd -|elseif getcwd() ==# 
'/home/david'|cd -|endif|
    ::63:norm6|cal foreground()|if &im|star|en|redr|f
    Press ENTER or type command to continue

On pressing Enter, the cursor lands on the note in question.
This is repeated for each click, though each click doesn't
have to be acknowledged in vim: excess clicks are just lost
and only the last one counts.

So there's no linkage between the xpdf and gvim programs.³
xpdf is a child of the xterm's bash, whereas gvim is a
child of PID1 (systemd here). If you've started your viewer
"through" vim (though I don't know what that means), then
it sounds as if you might be trying to rely on different
magic from what's intended/described in the LilyPond docs.

You say you're not running a DE and yet you talk of Gnome3
scripts and xdg-open and the mysterious F6. Perhaps things
are getting crossed over and you need to decide which chain
of magic you want to use.

¹ I can also use the vim command to run vim in the xterm
itself, rather than a GUI with menubar.

² I still use the name GWIM because I haven't investigated
how vim's servernames work.

³ You should be able to close vim and start gvim instead
(for the menubar, say) and just carry on clicking.
Likewise closing and opening xpdf should make no difference.

Cheers,
David.



reply via email to

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