Re: The Guide to getting Point and Click going with Gvim under Ubuntu 18

2019-02-28 Thread Federico Bruni



Hi Andrew

Il giorno gio 28 feb 2019 alle 3:05, Andrew Bernard 
 ha scritto:

Hi Federico,

Hmm. This is becoming somewhat problematical. Fedora is clearly 
significantly different to Ubuntu, in relation to the behaviour of 
GNOME. At this rate, there will need to be a section for every major 
distro of Linux, due to variations. It will be infeasible to make 
this generic. I also run Debian and it has its differences also. I 
suppose this is the nature of Linux distros.




Personally I'm against making the documentation too detailed and 
specific as it will become hard to maintain. I think a trade-off is 
possible..



The Lilypond Usage section is in fact incorrect regarding Apparmor on 
Ubuntu and should be corrected, as this is one of the most difficult 
part, that few people understand. Not many users customise Apparmor - 
it's quite arcane.


While I am happy to learn the development submission process, it's 
true that this page is somewhat more tutorial than reference. That's 
in fact the idea. So now I am favouring a blog post at Scores of 
Beauty. But I will reflect on it.




Then go for the blog post. Scores of Beauty's last post was published 
last year... we need new articles!
I have two drafts in Scores of Beauty which I could not complete yet. 
One is about point and click configuration in all operating systems. I 
was stuck because of some problems I got with Windows and especially 
Mac. Now I'm convinced I should split the post in three and publish the 
Linux part soon. The rest will follow...



I run virtual Linux machines and I am happy to run up all the major 
distros and to account for all the differences, but this seems like a 
large amount of work for something that people don't necessarily even 
want anyway. And there is no way I am going to write anything for 
Windows, or Mac.




I'm happy to make a few tests and write a Doc patch on this subject. It 
was in my TODO list since I sent the last patch for the Usage manual.





___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Short Fermata - Whole Measure Rest

2019-02-28 Thread Malte Meyn



Am 27.02.19 um 09:23 schrieb Malte Meyn:
Maybe one should add \shortfermataMarkup, \longfermataMarkup and 
\verylongfermataMarkup to LilyPond …


This is issue 5486 now: https://sourceforge.net/p/testlilyissues/issues/5486

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: The Guide to getting Point and Click going with Gvim under Ubuntu 18

2019-02-28 Thread Gianmaria Lari
Ciao Andrew,

if I remember correctly you decided to use gvim instead of frescobaldi
because of some performance problem, isn't it?
Anyway, in case you didn't yet do it, could you mention the pros and cons
of both choice?

Thank you Andrew!
g.


On Mon, 25 Feb 2019 at 08:57, Andrew Bernard 
wrote:

> Hi All,
>
> Federico has pointed out that it seems to be the season for people wanting
> to get point and click going (for some reason!). In the spirit of the
> season I offer the fruit of my work on this, trying to get it all going
> over the last week.
>
> I hope this may be able to be incorporated into the NR. If not, it's here
> now in the archives for future reference.
>
> Andrew
>
> The Guide to getting Point and Click going with Gvim under Ubuntu 18
> 
>
> The NR leaves out some important information about how to configure a
> Ubuntu
> system to use Gvim for point and click from Lilypond PDF files. Where the
> NR is
> substantially correct, that information is copied here.
>
>
> Requirements
> 
>
> Ubuntu 18.10
> Document Viewer (evince)
> gvim version 8.0 (vim-gtk3 package)
> [assumes bash shell]
>
>
> Setting the EDITOR variable
> ---
>
> Lilypond uses the environment variable EDITOR to select which editor to
> use to
> display point and click links. For gvim, simply use the value 'gvim':
>
> export EDITOR=gvim
>
> Setting LYEDITOR is not required.
>
> You can start evince from a terminal command to view a PDF. But if you
> want to
> click on a PDF in GNOME Nautilus to view it then just exporting this
> variable
> from the various bash startup files is inadequate. Gnome is started by
> Xsession
> in X11 before terminals and shells. Therefore it is unable to see
> environment
> variables set in .bashrc (or .bash_profile, etc). To resolve this matter,
> recall that Xsession uses the startup file $HOME/.xsessionrc. For
> environment
> variables that are to be shared between GNOME applications and terminal
> shells,
> do the following. Create a file for variable declarations, of arbitrary
> name.
> Add the EDITOR setting to that file:
>
>  $ echo 'export EDITOR=gvim' > ~/.my_env_vars
>
> Then edit ~/.xsessionrc to contain:
>
> if [ -f ~/.my_env_vars ]; then
> . ~/.my_env_vars
> fi
>
> Now also add these same lines to ~/.bashrc. Some like to use .bash_profile
> or
> other mechanisms, but the principle is the same. Manage any shared
> variables
> that Nautilus and a bash shell both need in this third file. To make this
> take
> effect, logout and login again so that a new Xsession is started.
>
>
> Installing Gvim
> ---
>
> Gvim is in the following package, not a package called gvim.
>
> # apt install vim-gtk3
>
>
> Configuring the GNOME 3 Desktop
> ---
>
> Create the file 'lilypond-invoke-editor.desktop':
>
> [Desktop Entry]
> Version=1.0
> Name=lilypond-invoke-editor
> GenericName=Textedit URI handler
> Comment=URI handler for textedit:
> Exec=lilypond-invoke-editor %u
> Terminal=false
> Type=Application
> MimeType=x-scheme-handler/textedit;
> Categories=Editor
> NoDisplay=true
>
> Run:
>
> $ xdg-desktop-menu install ./lilypond-invoke-editor.desktop
> $ xdg-mime default lilypond-invoke-editor.desktop x-scheme-handler/textedit
>
> Check that this works. Install the gnome-open program:
>
> $ sudo apt install libgnome2-bin
>
> Then:
>
> $ gnome-open textedit:///etc/issue:1:0:0
>
> If all is correct lilypond-invoke-editor will run and display the file.
>
>
> Configuring Ubuntu Apparmor for Evince
> --
>
> The Ubuntu mandatory access control system called Apparmor particular
> gaurds
> with some ferocity the actions of Evince, so as to prevent malicious PDF's
> from
> causing damage to the system. The apparmor configuration file for evince
> needs
> to be modified. [The NR is lacking some crucial information here, which can
> waste a lot of time as most people are not au fait with apparmor.]
>
> As root, edit '/etc/apparmor.d/local/usr.bin.evince' to have the following
> lines (it will most likely be an empty file):
>
> # For Textedit links
> #/usr/local/bin/lilypond-invoke-editor Cx -> sanitized_helper,
> /home/andro/bin/lilypond-invoke-editor Cx -> sanitized_helper,
>
> Note the comma on the end - this is not an error. Adjust the path as per
> the
> exmaples to where your lilypond is installed.
>
> Next, edit '/etc/apparmor.d/usr.bin.evince' and uncomment the line:
>
>   # Site-specific additions and overrides. See local/README for details.
>   include 
>
> [It's right at the end.] The local files provide for extending and adding
> information to the base apparmor files without interfering with them, and
> making system upgrades easier.
>
> Reconfigure evince apparmor:
>
> # apparmor_parser -r -T -W /etc/apparmor.d/usr.bin.evince
>
> To update apparmor:
>
> # systemctl reload apparmor
>
> Many people are confused by this step s

Re: printKeyCancellation not working as expected

2019-02-28 Thread SK
Thanks, this works and is cleaner than overwriting the stencil.

-- Forwarded message --
> From: SK 
> To: lilypond-user@gnu.org
> Cc:
> Bcc:
> Date: Wed, 27 Feb 2019 16:13:24 +0100
> Subject: printKeyCancellation not working as expected
> Hello,
>
> I would like to be able to change key signatures without ANY hints for
> educational purposes. For this I use Staff.printKeyCancellation set to
> false, together with the visibility options for key signatures. It works
> fine for most keys, but when changing to a key without any accidentals such
> as c major, the natural signs are shown and tell the student where there
> have been accidentals before.
> Any help would be very appreciated.
>
>
>
>
>
> -- Forwarded message --
> From: Malte Meyn 
> To: lilypond-user@gnu.org
> Cc:
> Bcc:
> Date: Wed, 27 Feb 2019 16:18:45 +0100
> Subject: Re: printKeyCancellation not working as expected
>
>
> Am 27.02.19 um 16:13 schrieb SK:
> > Hello,
> >
> > I would like to be able to change key signatures without ANY hints for
> > educational purposes. For this I use Staff.printKeyCancellation set to
> > false, together with the visibility options for key signatures. It works
> > fine for most keys, but when changing to a key without any accidentals
> > such as c major, the natural signs are shown and tell the student where
> > there have been accidentals before.
> > Any help would be very appreciated.
>
> Try
> \omit Staff.KeyCancellation
> instead.
>
>
> ___
> 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: Text spanner padding

2019-02-28 Thread Trevor Bača
On Fri, Feb 22, 2019 at 2:58 AM Andrew Bernard 
wrote:

> Solved. It's right-broken-padding set to false that does the trick.
>
>   \override TextSpanner.bound-details.right-broken.padding = ##f
>   \override TextSpanner.bound-details.right.padding = #11
>


As a note for posterity (whenever the time comes to finally equip text
spanners with their remaining missing features), it would be fantastic to
allow text spanners to start (and stop) nonmusical items, like bar lines.

Then magic numbers (like 11, in the example here) can be replaced by
something semantic that says "stop text span on bar line", which seems to
be what Andrew is actually engraving in this excerpt.

Trevor.

-- 
Trevor Bača
www.trevorbaca.com
soundcloud.com/trevorbaca
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: The Guide to getting Point and Click going with Gvim under Ubuntu 18

2019-02-28 Thread David Wright
On Wed 27 Feb 2019 at 10:36:49 (+0100), Federico Bruni wrote:
> First review after trying your tutorial in Fedora (for the purpose of
> adapting these instructions for the Usage manual).
> Fedora doesn't use AppArmor. I don't have SELinux enabled, so I'm not
> sure if that might be a problem.

A few comments from the point of view of Debian (stretch) with no
gnome or other desktop, just fvwm. No SELinux or apparmor either.

> Il giorno lun 25 feb 2019 alle 8:56, Andrew Bernard 
>  ha scritto:

> > I hope this may be able to be incorporated into the NR. If not,
> > it's here now in the archives for future reference.

> > The Guide to getting Point and Click going with Gvim under Ubuntu 18
> > 
> > 
> > The NR leaves out some important information about how to configure a Ubuntu
> > system to use Gvim for point and click from Lilypond PDF files.
> > Where the NR is substantially correct, that information is copied here.
> > 
> > Requirements
> > 
> > 
> > Ubuntu 18.10
> > Document Viewer (evince)

My observations apply to both evince and zathura in equal measure.

> > gvim version 8.0 (vim-gtk3 package)
> > [assumes bash shell]
> > 
> > Setting the EDITOR variable
> > ---
> > 
> > Lilypond uses the environment variable EDITOR to select which editor to use 
> > to
> > display point and click links. For gvim, simply use the value 'gvim':
> > 
> > export EDITOR=gvim

Use this even where you are using vim as the actual editor.

> > Setting LYEDITOR is not required.

I too have found no use for LYEDITOR, but see further below.

> > You can start evince from a terminal command to view a PDF. But if you want 
> > to
> > click on a PDF in GNOME Nautilus to view it then just exporting this 
> > variable
> > from the various bash startup files is inadequate. Gnome is started by 
> > Xsession
> > in X11 before terminals and shells. Therefore it is unable to see 
> > environment
> > variables set in .bashrc (or .bash_profile, etc). To resolve this matter,
> > recall that Xsession uses the startup file $HOME/.xsessionrc. For 
> > environment
> > variables that are to be shared between GNOME applications and terminal 
> > shells,
> > do the following. Create a file for variable declarations, of arbitrary 
> > name.
> > Add the EDITOR setting to that file:
> > 
> >  $ echo 'export EDITOR=gvim' > ~/.my_env_vars
> > 
> > Then edit ~/.xsessionrc to contain:
> > 
> > if [ -f ~/.my_env_vars ]; then
> > . ~/.my_env_vars
> > fi
> > 
> > Now also add these same lines to ~/.bashrc. Some like to use .bash_profile 
> > or
> > other mechanisms, but the principle is the same. Manage any shared variables
> > that Nautilus and a bash shell both need in this third file. To make this 
> > take
> > effect, logout and login again so that a new Xsession is started.
> > 
> 
> In Fedora GNOME is able to read environment variables defined in
> .bashrc or .bash_profile.
> You just need to logout and login again.

Yes, this is something that really comes down to the distribution
you're using, and needs sorting out regardless of point-and-click,
LilyPond and anything else.

And if you have control over command invocations, as I do, you can
just specify EDITOR=foo at the beginning of the commandline.
Aliasing this also works.

> > Installing Gvim
> > ---
> > 
> > Gvim is in the following package, not a package called gvim.
> > 
> > # apt install vim-gtk3
> > 
> In Fedora it's called vim-X11.

vim-gtk in Debian.

> > Configuring the GNOME 3 Desktop
> > ---

This step is required to make evince and zathura call the editor,
and has nothing to do with whether you actually run gnome or a DE.

> > Create the file 'lilypond-invoke-editor.desktop':

This file will likely be installed in at least two locations, so to
save having yet another copy lying around, you can use /tmp as the
working directory.

> > [Desktop Entry]
> > Version=1.0
> > Name=lilypond-invoke-editor
> > GenericName=Textedit URI handler
> > Comment=URI handler for textedit:
> > Exec=lilypond-invoke-editor %u
> > Terminal=false
> > Type=Application
> > MimeType=x-scheme-handler/textedit;
> > Categories=Editor
> > NoDisplay=true
> > 
> > Run:
> > 
> > $ xdg-desktop-menu install ./lilypond-invoke-editor.desktop
> > $ xdg-mime default lilypond-invoke-editor.desktop x-scheme-handler/textedit

On Debian, that creates/modifies:

~/.config/menus/applications-merged/xdg-desktop-menu-dummy.menu
~/.gnome/apps/lilypond-invoke-editor.desktop
~/.local/share/applications/lilypond-invoke-editor.desktop
~/.local/share/applications/defaults.list
~/.local/share/applications/mimeapps.list

> > Check that this works. Install the gnome-open program:
> > 
> > $ sudo apt install libgnome2-bin
> > 
> > Then:
> > 
> > $ gnome-open textedit[…]
> > 
> > If all is correct lilypond-invoke-editor will run and display the file.
> 
> No need to install libgnome2-bin. You shoul

Re: Text spanner padding

2019-02-28 Thread David Kastrup
Trevor Bača  writes:

> On Fri, Feb 22, 2019 at 2:58 AM Andrew Bernard 
> wrote:
>
>> Solved. It's right-broken-padding set to false that does the trick.
>>
>>   \override TextSpanner.bound-details.right-broken.padding = ##f
>>   \override TextSpanner.bound-details.right.padding = #11
>>
>
>
> As a note for posterity (whenever the time comes to finally equip text
> spanners with their remaining missing features), it would be fantastic to
> allow text spanners to start (and stop) nonmusical items, like bar lines.
>
> Then magic numbers (like 11, in the example here) can be replaced by
> something semantic that says "stop text span on bar line", which seems to
> be what Andrew is actually engraving in this excerpt.

So?  There is the to-barline property.

\version "2.19.82"

leftBracketPath =
#'((moveto 0 -1)
   (lineto 0 0)
   (lineto 2 0)
   )

rightBracketPath =
#'((lineto 2 0)
   (lineto 2 -1)
   )

treble = {
  \time 2/4

  \once \override TextSpanner.dash-period = #1
  \once \override TextSpanner.bound-details.left.text =
  \markup {
\path #0.25 #leftBracketPath \general-align #Y #CENTER \sans \upright "
x3"
  }
  \once \override TextSpanner.bound-details.right.text =
  \markup {
\general-align #X #RIGHT
\general-align #Y #CENTER \line { \sans \upright " x3" \path #0.25
#rightBracketPath }
  }
  \once \override TextSpanner.bound-details.left-broken.text = ##f
  \once \override TextSpanner.bound-details.right-broken.text = ##f
  \once \override TextSpanner.to-barline = ##t
  \override TextSpanner.bound-details.right.padding = #0

  f'''1\startTextSpan f''' f'''
  \break
  f'''
  \bar "."
  f'''\stopTextSpan
  \bar "||"
}

\score {
  \new Staff { \treble }
  \layout {}
}


-- 
David Kastrup
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Change stanza formatting

2019-02-28 Thread David F.
Given a line of lyrics with the stanza number in front, how can I move the 
stanza number (“1.”) so that it is above the first syllable of the lyrics 
instead of to the left of the lyrics?

\version "2.19"

\new Voice \relative {
\time 3/4 g'2 e4 a2 f4 g2.
}
\addlyrics {
\set stanza = #"1. "
Hi, my name is Bert.
}

Thanks,
David


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: The Guide to getting Point and Click going with Gvim under Ubuntu 18

2019-02-28 Thread Andrew Bernard
Hi David and Federico and All,

All these commentaries are great. But my aim was to document gvim (and not
even vim) on Ubuntu. I am well aware that there are a dozen editors and
tens of major Linux distros. I was never intending to write a thick book on
point and click in general, just trying to clarify one use case that I
thought applied to me and perhaps others. But I now get the feeling that no
two people on this list use the same combination of anything, and the idea
of trying to modify my screed to comprehend every single combination is
giving me a large headache. I rather regret posting anything at all now.

The main rationale for it is that the Usage manual is lacking important
info (e.g. environment variable usage for Ubuntu) and factually in error
about apparmor files, and others seemed to be struggling currently with
similar setup, albeit on Windows. And that's another thing, although I run
Windows 10 and also Mac, I am not prepared to write all this for those
environments as well (because I am not a Windows expert).

In conclusion, I think an informal blog post on Scores of Beauty would be
useful, and the simplest way to preserve this information, and others may
want to add posts for other environmental setups.

Andrew


On Fri, 1 Mar 2019 at 08:42, David Wright  wrote:

> On Wed 27 Feb 2019 at 10:36:49 (+0100), Federico Bruni wrote:
> > First review after trying your tutorial in Fedora (for the purpose of
> > adapting these instructions for the Usage manual).
> > Fedora doesn't use AppArmor. I don't have SELinux enabled, so I'm not
> > sure if that might be a problem.
>
> A few comments from the point of view of Debian (stretch) with no
> gnome or other desktop, just fvwm. No SELinux or apparmor either.
>
> > Il giorno lun 25 feb 2019 alle 8:56, Andrew Bernard <
> andrew.bern...@gmail.com> ha scritto:
>
> > > I hope this may be able to be incorporated into the NR. If not,
> > > it's here now in the archives for future reference.
>
> > > The Guide to getting Point and Click going with Gvim under Ubuntu 18
> > > 
> > >
> > > The NR leaves out some important information about how to configure a
> Ubuntu
> > > system to use Gvim for point and click from Lilypond PDF files.
> > > Where the NR is substantially correct, that information is copied here.
> > >
> > > Requirements
> > > 
> > >
> > > Ubuntu 18.10
> > > Document Viewer (evince)
>
> My observations apply to both evince and zathura in equal measure.
>
> > > gvim version 8.0 (vim-gtk3 package)
> > > [assumes bash shell]
> > >
> > > Setting the EDITOR variable
> > > ---
> > >
> > > Lilypond uses the environment variable EDITOR to select which editor
> to use to
> > > display point and click links. For gvim, simply use the value 'gvim':
> > >
> > > export EDITOR=gvim
>
> Use this even where you are using vim as the actual editor.
>
> > > Setting LYEDITOR is not required.
>
> I too have found no use for LYEDITOR, but see further below.
>
> > > You can start evince from a terminal command to view a PDF. But if you
> want to
> > > click on a PDF in GNOME Nautilus to view it then just exporting this
> variable
> > > from the various bash startup files is inadequate. Gnome is started by
> Xsession
> > > in X11 before terminals and shells. Therefore it is unable to see
> environment
> > > variables set in .bashrc (or .bash_profile, etc). To resolve this
> matter,
> > > recall that Xsession uses the startup file $HOME/.xsessionrc. For
> environment
> > > variables that are to be shared between GNOME applications and
> terminal shells,
> > > do the following. Create a file for variable declarations, of
> arbitrary name.
> > > Add the EDITOR setting to that file:
> > >
> > >  $ echo 'export EDITOR=gvim' > ~/.my_env_vars
> > >
> > > Then edit ~/.xsessionrc to contain:
> > >
> > > if [ -f ~/.my_env_vars ]; then
> > > . ~/.my_env_vars
> > > fi
> > >
> > > Now also add these same lines to ~/.bashrc. Some like to use
> .bash_profile or
> > > other mechanisms, but the principle is the same. Manage any shared
> variables
> > > that Nautilus and a bash shell both need in this third file. To make
> this take
> > > effect, logout and login again so that a new Xsession is started.
> > >
> >
> > In Fedora GNOME is able to read environment variables defined in
> > .bashrc or .bash_profile.
> > You just need to logout and login again.
>
> Yes, this is something that really comes down to the distribution
> you're using, and needs sorting out regardless of point-and-click,
> LilyPond and anything else.
>
> And if you have control over command invocations, as I do, you can
> just specify EDITOR=foo at the beginning of the commandline.
> Aliasing this also works.
>
> > > Installing Gvim
> > > ---
> > >
> > > Gvim is in the following package, not a package called gvim.
> > >
> > > # apt install vim-gtk3
> > >
> > In Fedora it's called vim-X11.
>
> vim-gt