Re: Dynamics collide with span bar

2024-03-22 Thread Aaron Hill

On 2024-03-22 5:30 pm, Michael Bret wrote:
Then, it should be added that transposing your first fix (namely, 
BarLine.bar-extent = #'(0 . 1) and transparent = ##t) DOES solve the 
issue WITH “Bar_engraver” consisted. How does that make sense? I 
probably don’t get what "Span_bar_stub_engraver getting tripped up by 
the Bar_engraver” entails. It might be useful to keep it in mind, in 
order to identify cases where the fix messes up something.



In reviewing the code for Span_bar_stub_engraver, it intentionally does 
not create stubs for contexts that have the Bar_engraver.  But the stubs 
are not specifically needed if you have an actual BarLine grob.  That is 
why my earlier workaround worked.


Neither Lyrics nor ChordNames consist the Bar_engraver, so they rely on 
Span_bar_stub_engraver.  And the issue for ChordNames was the lack of 
Pure_from_neighbor_engraver.


Dynamics is interesting because it does consist the Bar_engraver, so it 
needs to be handled a little differently.  Of course, there are some 
elements of Dynamics such as hairpins that normally are acceptable to 
span across measures.  So, we would need to be careful that any changes 
to Dynamics does not break how people expect it to work.



-- Aaron Hill



Re: Dynamics collide with span bar (was Re: Chord names collide with span bar)

2024-03-22 Thread Michael Bret
Many thanks, Aaron. So here is a cleaner MWE, with your fix:


\version "2.25.13"
#(ly:set-option 'debug-skylines #t)
\layout {
 \context { \Score
  \override NonMusicalPaperColumn.show-horizontal-skylines = ##t
 }
}

\layout {
 \context { \Dynamics
   \consists Pure_from_neighbor_engraver
   \remove Bar_engraver
 }
}

\score {
 \new GrandStaff <<
   \new Staff \relative { e''4 4 4 4 | 4 4 4 4 }
   \new Dynamics { s1 | s1 \ppp  }
   \new Staff \relative { d''4 4 4 4 | 4 4 4 4 }
 >>
}



Then, it should be added that transposing your first fix (namely, 
BarLine.bar-extent = #'(0 . 1) and transparent = ##t) DOES solve the issue WITH 
“Bar_engraver” consisted. How does that make sense? I probably don’t get what 
"Span_bar_stub_engraver getting tripped up by the Bar_engraver” entails. It 
might be useful to keep it in mind, in order to identify cases where the fix 
messes up something.
Same MWE as above, with this instead:

\layout {
 \context { \Dynamics
   \consists "Bar_engraver"
   \override BarLine.bar-extent = #'(0 . 1)
   \override BarLine.transparent = ##t
 }
}




Re: Dynamics collide with span bar (was Re: Chord names collide with span bar)

2024-03-22 Thread Aaron Hill

On 2024-03-22 4:08 pm, Michael Bret wrote:

Dear Werner, Aaron and Knute,
(it is y first time attempting to contribute to such lilypond 
discussion so I don’t dare cc-ing the whole mailing list)



(Adding the mailing list for visibility...)

Regardless of your experience or comfort level, it is always recommended 
to include the mailing list in all discussions unless something must be 
privately communicated.  The reason is simple: All of us are volunteers, 
in one form or another.  Our time and availability are subject to change 
on a whim.  Directly emailing individuals greatly limits your chances of 
getting a prompt response (or any response at all), whereas writing to 
the broader audience increases the likelihood of a reply from someone 
who has the time to get back to sooner.  It is also very helpful to have 
email archives that are complete.  Off-list messages can disrupt proper 
threading of emails.



Is this issue related to this one (collision between dynamic text and 
span bar)?

https://music.stackexchange.com/questions/116312/lilypond-auto-horizontal-space-for-dynamic-text

Root cause seems similar since it is about the skyline of span-bar not 
being extended.


However, the solution provided by Werner doesn’t seem to transpose 
effectively. I tried this to no avail:



This would appear to be related, although a new wrinkle has appeared.

Something to note is that the Dynamics context already consists the 
Bar_engraver in order to make use of the to-barline property.  In my 
testing, I found that having the Bar_engraver consisted is getting in 
the way.  If you remove Bar_engraver and consist 
Pure_from_neighbor_engraver within Dynamics, it behaves similar to the 
ChordNames fix.  So, it would seem the Span_bar_stub_engraver is perhaps 
getting tripped up by the Bar_engraver.



\version "2.25.13"
\language "italiano"

common = {
  \key sol \minor
  \time 4/4
  \tempo "Largo [Широко]"
}

right = \relative do'' {
  \key sol \major
  sol8 (fad re mi sol fad re4) |
  sol8 (fad re mib sol fad re4)
}

left = \relative do' {
  \key sol \major
  sol,8 (re' si' re,) sol, (re' do' re,) |
  sol, (re' sib' re,) sol, (re' do' re,) |
}

dynamics = {
  s1 |
  \override DynamicText.extra-spacing-width = #'(-1 . 1)
  s8 \ppp s8 s8 s8 s8 s8 s4
}

%% #(ly:set-option 'debug-skylines #t)
\layout {
  \context { \Dynamics
\consists Pure_from_neighbor_engraver
\remove Bar_engraver
  }
}

\score {
  \new PianoStaff <<
\new Staff = "right" \right
\new Dynamics \dynamics
\new Staff = "left" { \clef bass \left }
  >>
}



-- Aaron Hill



Re: draw box around score

2024-03-22 Thread Go77

Ah, perfect!

This works, Valentin.

Thanks!
Joop

On 22-03-2024 20:47, Valentin Petzel wrote:

Or rather

#(define-markup-command (book-title layout props) ()
(interpret-markup
 layout props
 (ly:output-def-lookup layout 'bookTitleMarkup empty-markup)))

\markup \box \column {
   \override
   #'(
 (header:title . "The title")
 (header:composer . "The composer")
   )
   \book-title
   \score { c'1 }
}

Cheers,
Valentin

Am Freitag, 22. März 2024, 20:46:16 CET schrieb Valentin Petzel:

Hello Joop,

this would be hard to do, as this is tied to the page breaking algorithm.
Rather directly draw your header in your markup:

#(define-markup-command (book-title layout props) ()
(interpret-markup
 layout props
 (ly:output-def-lookup layout 'bookTitleMarkup empty-markup)))

\markup \box \center-column {
   \override
   #'(
 (header:title . "The title")
 (header:composer . "The composer")
   )
   \book-title
   \score { c'1 }
}

Cheers,
Valentin

Am Freitag, 22. März 2024, 19:32:05 CET schrieb Go77:

Hello Leo,

I tried your suggestion, but it doesn't put the box around the header. I
would like to include the header as well. Something with page formatting
maybe?

Joop

On 22-03-2024 15:09, Leo Correia de Verdier wrote:

Sorry, I got a fudged quote-apostrophe in last answer. It should be:

\markup \box \score { c'1 }


22 mars 2024 kl. 15:06 skrev Leo Correia de Verdier
:

Hi Joop!

Do you mean something like
\markup \box \score { c’1 }

HTH
/Leo


22 mars 2024 kl. 14:40 skrev Go77 :


Hi all,

I tried to find how to draw a box around a piece of music. Looked
through the manual, snippets etc, but didn't find out how to do this
yet. See below what I mean. Any suggestions?

Joop







Re: draw box around score

2024-03-22 Thread Valentin Petzel
Or rather

#(define-markup-command (book-title layout props) ()
   (interpret-markup
layout props
(ly:output-def-lookup layout 'bookTitleMarkup empty-markup)))

\markup \box \column {
  \override
  #'(
(header:title . "The title")
(header:composer . "The composer")
  )
  \book-title
  \score { c'1 }
}

Cheers,
Valentin

Am Freitag, 22. März 2024, 20:46:16 CET schrieb Valentin Petzel:
> Hello Joop,
> 
> this would be hard to do, as this is tied to the page breaking algorithm.
> Rather directly draw your header in your markup:
> 
> #(define-markup-command (book-title layout props) ()
>(interpret-markup
> layout props
> (ly:output-def-lookup layout 'bookTitleMarkup empty-markup)))
> 
> \markup \box \center-column {
>   \override
>   #'(
> (header:title . "The title")
> (header:composer . "The composer")
>   )
>   \book-title
>   \score { c'1 }
> }
> 
> Cheers,
> Valentin
> 
> Am Freitag, 22. März 2024, 19:32:05 CET schrieb Go77:
> > Hello Leo,
> > 
> > I tried your suggestion, but it doesn't put the box around the header. I
> > would like to include the header as well. Something with page formatting
> > maybe?
> > 
> > Joop
> > 
> > On 22-03-2024 15:09, Leo Correia de Verdier wrote:
> > > Sorry, I got a fudged quote-apostrophe in last answer. It should be:
> > > 
> > > \markup \box \score { c'1 }
> > > 
> > >> 22 mars 2024 kl. 15:06 skrev Leo Correia de Verdier
> > >> :
> > >> 
> > >> Hi Joop!
> > >> 
> > >> Do you mean something like
> > >> \markup \box \score { c’1 }
> > >> 
> > >> HTH
> > >> /Leo
> > >> 
> > >>> 22 mars 2024 kl. 14:40 skrev Go77 :
> > >>> 
> > >>> 
> > >>> Hi all,
> > >>> 
> > >>> I tried to find how to draw a box around a piece of music. Looked
> > >>> through the manual, snippets etc, but didn't find out how to do this
> > >>> yet. See below what I mean. Any suggestions?
> > >>> 
> > >>> Joop
> > >>> 
> > >>> 
> > >>> 



signature.asc
Description: This is a digitally signed message part.


Re: draw box around score

2024-03-22 Thread Valentin Petzel
Hello Joop,

this would be hard to do, as this is tied to the page breaking algorithm. 
Rather directly draw your header in your markup:

#(define-markup-command (book-title layout props) ()
   (interpret-markup
layout props
(ly:output-def-lookup layout 'bookTitleMarkup empty-markup)))

\markup \box \center-column {
  \override
  #'(
(header:title . "The title")
(header:composer . "The composer")
  )
  \book-title
  \score { c'1 }
}

Cheers,
Valentin

Am Freitag, 22. März 2024, 19:32:05 CET schrieb Go77:
> Hello Leo,
> 
> I tried your suggestion, but it doesn't put the box around the header. I
> would like to include the header as well. Something with page formatting
> maybe?
> 
> Joop
> 
> On 22-03-2024 15:09, Leo Correia de Verdier wrote:
> > Sorry, I got a fudged quote-apostrophe in last answer. It should be:
> > 
> > \markup \box \score { c'1 }
> > 
> >> 22 mars 2024 kl. 15:06 skrev Leo Correia de Verdier
> >> :
> >> 
> >> Hi Joop!
> >> 
> >> Do you mean something like
> >> \markup \box \score { c’1 }
> >> 
> >> HTH
> >> /Leo
> >> 
> >>> 22 mars 2024 kl. 14:40 skrev Go77 :
> >>> 
> >>> 
> >>> Hi all,
> >>> 
> >>> I tried to find how to draw a box around a piece of music. Looked
> >>> through the manual, snippets etc, but didn't find out how to do this
> >>> yet. See below what I mean. Any suggestions?
> >>> 
> >>> Joop
> >>> 
> >>> 
> >>> 



signature.asc
Description: This is a digitally signed message part.


Re: draw box around score

2024-03-22 Thread Go77

Hello Leo,

I tried your suggestion, but it doesn't put the box around the header. I 
would like to include the header as well. Something with page formatting 
maybe?


Joop

On 22-03-2024 15:09, Leo Correia de Verdier wrote:

Sorry, I got a fudged quote-apostrophe in last answer. It should be:

\markup \box \score { c'1 }


22 mars 2024 kl. 15:06 skrev Leo Correia de Verdier 
:

Hi Joop!

Do you mean something like
\markup \box \score { c’1 }

HTH
/Leo


22 mars 2024 kl. 14:40 skrev Go77 :


Hi all,

I tried to find how to draw a box around a piece of music. Looked through the 
manual, snippets etc, but didn't find out how to do this yet. See below what I 
mean. Any suggestions?

Joop









Cyclic dependency error with change staff and trillSpan

2024-03-22 Thread Knute Snortum
Hi again,

I am getting a cyclic dependency error with code that uses change staff and
trillSpan.  Here is as minimal an example as I could create:

%%%
\version "2.24.3"
\language "english"

staffUp   = \change Staff = "upper"
staffDown = \change Staff = "lower"

rightHand = \relative {
  c''4\noBeam \staffDown \voiceOne \afterGrace g,4\startTrillSpan {
fs16\stopTrillSpan g } \staffUp \oneVoice c'2
}

\score {
  \new PianoStaff <<
\new Staff = "upper" \rightHand
\new Staff = "lower" { \clef bass s1 }
  >>
}
%%%

This produces two errors of the same type:

programming error: cyclic dependency: calculation-in-progress encountered
for VerticalAxisGroup.adjacent-pure-heights

continuing, cross fingers


>From what I can see, the PDF output is fine. The MWE needs notes before and
after the afterGrace, plus the trillSpan for the error to show. Any ideas
on how to fix this?

--
Knute Snortum


Re: Tie an afterGrace note produces warning

2024-03-22 Thread Knute Snortum
On Fri, Mar 22, 2024 at 8:38 AM Aaron Hill  wrote:

>
> 
> \version "2.25.13"
>
> \relative {
>\afterGrace c''4\trill { b16 \set tieWaitForNote = ##t c~ } c4
> }
> 
>

Works great!  Thanks.

-- 
Knute Snortum


Re: LilyPond Swift Library

2024-03-22 Thread Karlin High

On 3/22/2024 10:15 AM, Sam Dimarcos wrote:

the realm of iOS and Swift?


So long as the Apple App Store is the only way to get apps onto iOS 
devices, for anything LilyPond-derived there would be a need to make 
peace between the App Store terms and the GNU General Public License.

--
Karlin High
Missouri, USA




Re: Tie an afterGrace note produces warning

2024-03-22 Thread Aaron Hill

On 2024-03-22 8:24 am, Knute Snortum wrote:

Hi all,

I am trying to tie an afterGrace note to the next note and I get a
warning.  This code:

\version "2.25.13"

\relative {
  \afterGrace c''4\trill { b16 c~ } c4
}

...produces this warning:

/tmp/frescobaldi-ieh3nrny/tmpq4qpjmjp/document.ly:4:33 <0>: warning:
unterminated tie

\afterGrace c''4\trill { b16 c

~ } c4


Is there any way around this, as I need this for my current project?




\version "2.25.13"

\relative {
  \afterGrace c''4\trill { b16 \set tieWaitForNote = ##t c~ } c4
}



-- Aaron Hill



LilyPond Swift Library

2024-03-22 Thread Sam Dimarcos
Hello,

I was wondering if it was possible to render LilyPond notation in an iOS 
application using Swift.

I would like to display a figured bass note coupled with its realization in 
.png or .svg format within a UIImage control.

Are there any libraries or in-kind alternatives for music notation out there in 
the realm of iOS and Swift?

Thanks!


Tie an afterGrace note produces warning

2024-03-22 Thread Knute Snortum
Hi all,

I am trying to tie an afterGrace note to the next note and I get a
warning.  This code:

\version "2.25.13"

\relative {
  \afterGrace c''4\trill { b16 c~ } c4
}

...produces this warning:

/tmp/frescobaldi-ieh3nrny/tmpq4qpjmjp/document.ly:4:33 <0>: warning:
unterminated tie

\afterGrace c''4\trill { b16 c

~ } c4


Is there any way around this, as I need this for my current project?

--
Knute Snortum


Re: Point and click - permission denied

2024-03-22 Thread Tom Brennan
Ok, I just noticed that the binary location is wrong -- and I have
more than one install on this computer, so I'm going to remove both
and start with the latest version and see what happens.

On Fri, Mar 22, 2024 at 10:20 AM Tom Brennan  wrote:
>
> BTW, for what it's worth it does still seem to be an apparmor issue.
> The output from dmesg is
>
> ```
> [ 8087.871623] audit: type=1400 audit(177091.247:143):
> apparmor="DENIED" operation="exec" profile="/usr/bin/evince"
> name="/usr/local/bin/lilypond-wrapper.guile" pid=65082 comm="sh"
> requested_mask="x" denied_mask="x" fsuid=1000 ouid=0
> [ 8087.871694] audit: type=1400 audit(177091.247:144):
> apparmor="DENIED" operation="exec" profile="/usr/bin/evince"
> name="/usr/bin/lilypond-invoke-editor" pid=65082 comm="sh"
> requested_mask="x" denied_mask="x" fsuid=1000 ouid=0
> [ 8087.871698] audit: type=1400 audit(177091.247:145):
> apparmor="DENIED" operation="exec" profile="/usr/bin/evince"
> name="/usr/bin/lilypond-invoke-editor" pid=65082 comm="sh"
> requested_mask="x" denied_mask="x" fsuid=1000 ouid=0
> ```
>
> On Fri, Mar 22, 2024 at 9:19 AM Tom Brennan  wrote:
> >
> > Hello
> >
> > (Note: this email uses markdown formatting.)
> >
> > It's been a while since I've used lilypond, and I had point and click
> > working on another system, but I can't remember what I did. I do
> > remember there were hiccups. Also, it was probably Arch Linux and now
> > the distro I'm using is Ubuntu 22.04, Lilypond version 2.22.2.
> >
> > I want to set up point and click with VS Code, ultimately, and I open
> > the pdf from a terminal emulator with xdg-open (I believe the app that
> > opens it is called "evince" but it just displays "Document Viewer".
> >
> > First I updated the `LYEDITOR` to point to VS Code with its required
> > CLI arguments.
> >
> > ```
> > ~/Workspace/my-lilypond-project$ lilypond main.ly
> > ~/Workspace/my-lilypond-project$ xdg-open main.pdf
> > ~/Workspace/my-lilypond-project$ export LYEDITOR="code --goto
> > %(file)s:%(line)s:%(column)s"
> > ```
> >
> > From there I right-clicked a clickable thing and copied its address to
> > try it out with the CLI:
> >
> > ```
> > ~/Workspace/my-lilypond-project$ lilypond-invoke-editor
> > textedit:///home/tjb1982/Workspace/my-lilypond-project/./movement-foo/cello.ly:27:107:108
> > ```
> >
> > And this worked as expected, so then I went to configure xdg-mime to
> > handle the `x-scheme-handler/textedit` mimetype as per the docs
> > [here](https://lilypond.org/doc/v2.25/Documentation/usage/using-gnome-for-point-and-click).
> >
> > ```shell
> > ~/Workspace/my-lilypond-project$ cd /tmp
> > /tmp$ cat <<_EOF > 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
> > _EOF
> > /tmp$ xdg-desktop-menu install ./lilypond-invoke-editor.desktop
> > /tmp$ xdg-mime default lilypond-invoke-editor.desktop 
> > x-scheme-handler/textedit
> > /tmp$ cd -
> > ~/Workspace/my-lilypond-project$ lilypond main.ly
> > ~/Workspace/my-lilypond-project$ xdg-open main.pdf
> > ```
> >
> > From here, clicking on a clickable item in the pdf results in the
> > console logging:
> >
> > ```
> > sh: 1: exec: lilypond-invoke-editor: Permission denied
> > ```
> >
> > I found the thread
> > [here](https://lists.gnu.org/archive/html/lilypond-user/2019-02/msg00276.html)
> > where David Sumbler figured out some required configuration for
> > apparmor and evince, so I tried to follow the same process. I already
> > had a file at `/etc/apparmor.d/usr.bin.evince`, so I edited the
> > `/usr/bin/evince` section of the file like this:
> >
> > ```
> > /usr/bin/evince {
> >   ...
> >   /usr/local/bin/lilypond-invoke-editor Cx -> sanitized_helper,
> > }
> > ```
> >
> > I ran the parser, double-checked that this is the actual location of
> > `lilypond-invoke-editor`, and restarted the apparmor service:
> >
> > ```
> > ~$ sudo apparmor_parser -r -T -W /etc/apparmor.d/usr.bin.evince
> > ~$ echo $?
> > 0
> > ~$ which lilypond-invoke-editor
> > /usr/local/bin/lilypond-invoke-editor
> > ~$ sudo systemctl restart apparmor
> > ~$ sudo systemctl status apparmor
> > ● apparmor.service - Load AppArmor profiles
> >  Loaded: loaded (/lib/systemd/system/apparmor.service; enabled;
> > vendor preset: enabled)
> >  Active: active (exited) since Fri 2024-03-22 09:12:02 EDT; 1s ago
> >Docs: man:apparmor(7)
> >  https://gitlab.com/apparmor/apparmor/wikis/home/
> > Process: 24362 ExecStart=/lib/apparmor/apparmor.systemd reload
> > (code=exited, status=0/SUCCESS)
> >Main PID: 24362 (code=exited, status=0/SUCCESS)
> > CPU: 161ms
> >
> > Mar 22 09:12:02 chester systemd[1]: Starting Load AppArmor profiles...
> > Mar 22 09:12:02 chester apparmor.systemd[24362]: 

Re: Point and click - permission denied

2024-03-22 Thread Tom Brennan
BTW, for what it's worth it does still seem to be an apparmor issue.
The output from dmesg is

```
[ 8087.871623] audit: type=1400 audit(177091.247:143):
apparmor="DENIED" operation="exec" profile="/usr/bin/evince"
name="/usr/local/bin/lilypond-wrapper.guile" pid=65082 comm="sh"
requested_mask="x" denied_mask="x" fsuid=1000 ouid=0
[ 8087.871694] audit: type=1400 audit(177091.247:144):
apparmor="DENIED" operation="exec" profile="/usr/bin/evince"
name="/usr/bin/lilypond-invoke-editor" pid=65082 comm="sh"
requested_mask="x" denied_mask="x" fsuid=1000 ouid=0
[ 8087.871698] audit: type=1400 audit(177091.247:145):
apparmor="DENIED" operation="exec" profile="/usr/bin/evince"
name="/usr/bin/lilypond-invoke-editor" pid=65082 comm="sh"
requested_mask="x" denied_mask="x" fsuid=1000 ouid=0
```

On Fri, Mar 22, 2024 at 9:19 AM Tom Brennan  wrote:
>
> Hello
>
> (Note: this email uses markdown formatting.)
>
> It's been a while since I've used lilypond, and I had point and click
> working on another system, but I can't remember what I did. I do
> remember there were hiccups. Also, it was probably Arch Linux and now
> the distro I'm using is Ubuntu 22.04, Lilypond version 2.22.2.
>
> I want to set up point and click with VS Code, ultimately, and I open
> the pdf from a terminal emulator with xdg-open (I believe the app that
> opens it is called "evince" but it just displays "Document Viewer".
>
> First I updated the `LYEDITOR` to point to VS Code with its required
> CLI arguments.
>
> ```
> ~/Workspace/my-lilypond-project$ lilypond main.ly
> ~/Workspace/my-lilypond-project$ xdg-open main.pdf
> ~/Workspace/my-lilypond-project$ export LYEDITOR="code --goto
> %(file)s:%(line)s:%(column)s"
> ```
>
> From there I right-clicked a clickable thing and copied its address to
> try it out with the CLI:
>
> ```
> ~/Workspace/my-lilypond-project$ lilypond-invoke-editor
> textedit:///home/tjb1982/Workspace/my-lilypond-project/./movement-foo/cello.ly:27:107:108
> ```
>
> And this worked as expected, so then I went to configure xdg-mime to
> handle the `x-scheme-handler/textedit` mimetype as per the docs
> [here](https://lilypond.org/doc/v2.25/Documentation/usage/using-gnome-for-point-and-click).
>
> ```shell
> ~/Workspace/my-lilypond-project$ cd /tmp
> /tmp$ cat <<_EOF > 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
> _EOF
> /tmp$ xdg-desktop-menu install ./lilypond-invoke-editor.desktop
> /tmp$ xdg-mime default lilypond-invoke-editor.desktop 
> x-scheme-handler/textedit
> /tmp$ cd -
> ~/Workspace/my-lilypond-project$ lilypond main.ly
> ~/Workspace/my-lilypond-project$ xdg-open main.pdf
> ```
>
> From here, clicking on a clickable item in the pdf results in the
> console logging:
>
> ```
> sh: 1: exec: lilypond-invoke-editor: Permission denied
> ```
>
> I found the thread
> [here](https://lists.gnu.org/archive/html/lilypond-user/2019-02/msg00276.html)
> where David Sumbler figured out some required configuration for
> apparmor and evince, so I tried to follow the same process. I already
> had a file at `/etc/apparmor.d/usr.bin.evince`, so I edited the
> `/usr/bin/evince` section of the file like this:
>
> ```
> /usr/bin/evince {
>   ...
>   /usr/local/bin/lilypond-invoke-editor Cx -> sanitized_helper,
> }
> ```
>
> I ran the parser, double-checked that this is the actual location of
> `lilypond-invoke-editor`, and restarted the apparmor service:
>
> ```
> ~$ sudo apparmor_parser -r -T -W /etc/apparmor.d/usr.bin.evince
> ~$ echo $?
> 0
> ~$ which lilypond-invoke-editor
> /usr/local/bin/lilypond-invoke-editor
> ~$ sudo systemctl restart apparmor
> ~$ sudo systemctl status apparmor
> ● apparmor.service - Load AppArmor profiles
>  Loaded: loaded (/lib/systemd/system/apparmor.service; enabled;
> vendor preset: enabled)
>  Active: active (exited) since Fri 2024-03-22 09:12:02 EDT; 1s ago
>Docs: man:apparmor(7)
>  https://gitlab.com/apparmor/apparmor/wikis/home/
> Process: 24362 ExecStart=/lib/apparmor/apparmor.systemd reload
> (code=exited, status=0/SUCCESS)
>Main PID: 24362 (code=exited, status=0/SUCCESS)
> CPU: 161ms
>
> Mar 22 09:12:02 chester systemd[1]: Starting Load AppArmor profiles...
> Mar 22 09:12:02 chester apparmor.systemd[24362]: Restarting AppArmor
> Mar 22 09:12:02 chester apparmor.systemd[24362]: Reloading AppArmor profiles
> Mar 22 09:12:02 chester apparmor.systemd[24379]: Skipping profile in
> /etc/apparmor.d/disable: usr.sbin.rsyslogd
> Mar 22 09:12:02 chester systemd[1]: Finished Load AppArmor profiles.
> ```
>
> This didn't change anything (still getting the permission denied error
> when clicking).
>
> I also tried to stop the apparmor service and then reboot
>
> ```
> ~$ sudo systemctl stop apparmor
> ~$ 

Re: draw box around score

2024-03-22 Thread Leo Correia de Verdier
Sorry, I got a fudged quote-apostrophe in last answer. It should be:

\markup \box \score { c'1 }

> 22 mars 2024 kl. 15:06 skrev Leo Correia de Verdier 
> :
> 
> Hi Joop!
> 
> Do you mean something like
> \markup \box \score { c’1 }
> 
> HTH
> /Leo
> 
>> 22 mars 2024 kl. 14:40 skrev Go77 :
>> 
>> 
>> Hi all,
>> 
>> I tried to find how to draw a box around a piece of music. Looked through 
>> the manual, snippets etc, but didn't find out how to do this yet. See below 
>> what I mean. Any suggestions?
>> 
>> Joop
>> 
>> 
>> 
>> 
>> 




Re: draw box around score

2024-03-22 Thread Leo Correia de Verdier
Hi Joop!

Do you mean something like
\markup \box \score { c’1 }

HTH
/Leo

> 22 mars 2024 kl. 14:40 skrev Go77 :
> 
> 
> Hi all,
> 
> I tried to find how to draw a box around a piece of music. Looked through the 
> manual, snippets etc, but didn't find out how to do this yet. See below what 
> I mean. Any suggestions?
> 
> Joop
> 
> 
> 
> 


draw box around score

2024-03-22 Thread Go77

Hi all,

I tried to find how to draw a box around a piece of music. Looked 
through the manual, snippets etc, but didn't find out how to do this 
yet. See below what I mean. Any suggestions?


Joop



Point and click - permission denied

2024-03-22 Thread Tom Brennan
Hello

(Note: this email uses markdown formatting.)

It's been a while since I've used lilypond, and I had point and click
working on another system, but I can't remember what I did. I do
remember there were hiccups. Also, it was probably Arch Linux and now
the distro I'm using is Ubuntu 22.04, Lilypond version 2.22.2.

I want to set up point and click with VS Code, ultimately, and I open
the pdf from a terminal emulator with xdg-open (I believe the app that
opens it is called "evince" but it just displays "Document Viewer".

First I updated the `LYEDITOR` to point to VS Code with its required
CLI arguments.

```
~/Workspace/my-lilypond-project$ lilypond main.ly
~/Workspace/my-lilypond-project$ xdg-open main.pdf
~/Workspace/my-lilypond-project$ export LYEDITOR="code --goto
%(file)s:%(line)s:%(column)s"
```

>From there I right-clicked a clickable thing and copied its address to
try it out with the CLI:

```
~/Workspace/my-lilypond-project$ lilypond-invoke-editor
textedit:///home/tjb1982/Workspace/my-lilypond-project/./movement-foo/cello.ly:27:107:108
```

And this worked as expected, so then I went to configure xdg-mime to
handle the `x-scheme-handler/textedit` mimetype as per the docs
[here](https://lilypond.org/doc/v2.25/Documentation/usage/using-gnome-for-point-and-click).

```shell
~/Workspace/my-lilypond-project$ cd /tmp
/tmp$ cat <<_EOF > 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
_EOF
/tmp$ xdg-desktop-menu install ./lilypond-invoke-editor.desktop
/tmp$ xdg-mime default lilypond-invoke-editor.desktop x-scheme-handler/textedit
/tmp$ cd -
~/Workspace/my-lilypond-project$ lilypond main.ly
~/Workspace/my-lilypond-project$ xdg-open main.pdf
```

>From here, clicking on a clickable item in the pdf results in the
console logging:

```
sh: 1: exec: lilypond-invoke-editor: Permission denied
```

I found the thread
[here](https://lists.gnu.org/archive/html/lilypond-user/2019-02/msg00276.html)
where David Sumbler figured out some required configuration for
apparmor and evince, so I tried to follow the same process. I already
had a file at `/etc/apparmor.d/usr.bin.evince`, so I edited the
`/usr/bin/evince` section of the file like this:

```
/usr/bin/evince {
  ...
  /usr/local/bin/lilypond-invoke-editor Cx -> sanitized_helper,
}
```

I ran the parser, double-checked that this is the actual location of
`lilypond-invoke-editor`, and restarted the apparmor service:

```
~$ sudo apparmor_parser -r -T -W /etc/apparmor.d/usr.bin.evince
~$ echo $?
0
~$ which lilypond-invoke-editor
/usr/local/bin/lilypond-invoke-editor
~$ sudo systemctl restart apparmor
~$ sudo systemctl status apparmor
● apparmor.service - Load AppArmor profiles
 Loaded: loaded (/lib/systemd/system/apparmor.service; enabled;
vendor preset: enabled)
 Active: active (exited) since Fri 2024-03-22 09:12:02 EDT; 1s ago
   Docs: man:apparmor(7)
 https://gitlab.com/apparmor/apparmor/wikis/home/
Process: 24362 ExecStart=/lib/apparmor/apparmor.systemd reload
(code=exited, status=0/SUCCESS)
   Main PID: 24362 (code=exited, status=0/SUCCESS)
CPU: 161ms

Mar 22 09:12:02 chester systemd[1]: Starting Load AppArmor profiles...
Mar 22 09:12:02 chester apparmor.systemd[24362]: Restarting AppArmor
Mar 22 09:12:02 chester apparmor.systemd[24362]: Reloading AppArmor profiles
Mar 22 09:12:02 chester apparmor.systemd[24379]: Skipping profile in
/etc/apparmor.d/disable: usr.sbin.rsyslogd
Mar 22 09:12:02 chester systemd[1]: Finished Load AppArmor profiles.
```

This didn't change anything (still getting the permission denied error
when clicking).

I also tried to stop the apparmor service and then reboot

```
~$ sudo systemctl stop apparmor
~$ sudo systemctl disable apparmor
```

This didn't have any effect. What should I try next?

Thanks,
Tom