On Wed, 2022-07-20 at 16:52 +0100, David Sumbler wrote:
> On Tue, 2022-07-19 at 23:56 +0200, Jean Abou Samra wrote:
> > Le 19/07/2022 à 18:26, David Sumbler a écrit :
> > > My usual work pattern is to edit .ly files etc. in emacs, and
> > > then to 
> > > use the Lilypond-mode command C-c C-l or C-c C-f to produce a PDF
> > > or 
> > > Postscript file.  Unfortunately I found that this now just
> > > produces an 
> > > error message, such as:
> > > 
> > > lilypond /home/david/Cloud/LilyPond/test.ly
> > > /bin/bash: line 1: lilypond: command not found
> > > 
> > > Compilation exited abnormally with code 127 at Tue Jul 19
> > > 16:07:42
> > > 
> > > I eventually realized that having the alias included in .bashrc
> > > was 
> > > not working because this is only for interactive shells.  But I
> > > have 
> > > tried putting it in .bash_profile, logging out and then logging
> > > in 
> > > again, and this doesn't work either.
> > 
> > 
> > An alias only has effect in the shell, not on the system
> > in general. You'd need to set up actual scripts in a place
> > where they will be found. One way to do so is to add
> > symlinks in a directory that is on your PATH, like ~/bin.
> > 
> > ln -s /path/to/lilypond-2.23.10/bin/* ~/bin
> > 
> > Though, in my opinion, the best way is to actually point
> > your editor to the executable, see below.
> > 
> > 
> > 
> > > If somebody can suggest how I get emacs-mode Lilypond-command-
> > > lilypond 
> > > and Lilypond-command-formatps to work, it will be very much 
> > > appreciated, as always.
> > 
> > 
> > Try this:
> > 
> > Edit any .ly file in Emacs
> > 
> > M-x customize-variable
> > 
> > In minibuffer, enter 'LilyPond-lilypond-command'
> > 
> > A customization screen appears, click on the arrow on the
> > left to expand the variable. On the right, write the full
> > path to LilyPond:
> > 
> > /.../lilypond-2.23.10/bin/lilypond
> > 
> > Now C-x C-s to save, and q to quit Custom.
> > 
> > After that, try C-c C-l on the .ly file. It should
> > be compiled with the lilypond executable you specified.
> 
> This worked perfectly, although I don't fully understand it.  At
> first I assumed that your 'LilyPond-lilypond-command' was a typo for
> 'LilyPond-command-lilypond', but that wasn't recognized as a command
> whereas your version was.  I now see that your version is a Lilypond-
> mode command, and my version is a Lilypond-mode Lisp function.  No
> wonder I couldn't figure it out for myself.
> 
> Anyway, thanks for all your help.  It looks as if I now have Lilypond
> up and running again.
> 
> David
> 
> 
> 

Reply via email to