Emacs & Lilypond-mode: view PDF

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Emacs & Lilypond-mode: view PDF

Antonio Gervasoni
Hi all,

I've just figured out how to get Emacs to work with Lilypond in OSX. Everything works fine except the command for viewing the pdf output (C-c C-s). When I run it I get this:

"xpdf /Users/Antonio/Desktop/Emacs/Test.pdf
/bin/bash: xpdf: command not found

Compilation exited abnormally with code 127 at Wed Sep 24 20:08:44"

Xpdf is installed. My guess is that Emacs can't find the path to it but I don't know how to set it up.

Anyone knows how to solve this?

Antonio
Reply | Threaded
Open this post in threaded view
|

Re: Emacs & Lilypond-mode: view PDF

Jacques Menu Muzhic
Hello Antonio,

How did you install xpdf? The file can be at different places according to that.

Do you find it with the regular file search of the Finder? Some folders such as /sw (MacPorts) might not be searched, though.

JM

Le 25 sept. 2014 à 03:17, Antonio Gervasoni <[hidden email]> a écrit :

> Hi all,
>
> I've just figured out how to get Emacs to work with Lilypond in OSX.
> Everything works fine except the command for viewing the pdf output (C-c
> C-s). When I run it I get this:
>
> "xpdf /Users/Antonio/Desktop/Emacs/Test.pdf
> /bin/bash: xpdf: command not found
>
> Compilation exited abnormally with code 127 at Wed Sep 24 20:08:44"
>
> Xpdf is installed. My guess is that Emacs can't find the path to it but I
> don't know how to set it up.
>
> Anyone knows how to solve this?
>
> Antonio
>
>
>
>
> --
> View this message in context: http://lilypond.1069038.n5.nabble.com/Emacs-Lilypond-mode-view-PDF-tp166776.html
> Sent from the User mailing list archive at Nabble.com.
>
> _______________________________________________
> lilypond-user mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/lilypond-user


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Emacs & Lilypond-mode: view PDF

Jacques Menu Muzhic
Hello Antonio,

If the Grab utility supplied by Mac OS X is fine, you can use the following path to launch it:

/Applications/Utilities/Grab.app/Contents/MacOS/Grab 

JM

Am 25.09.2014 um 08:35:30 schrieb Jacques Menu <[hidden email]>:

Hello Antonio,

How did you install xpdf? The file can be at different places according to that.

Do you find it with the regular file search of the Finder? Some folders such as /sw (MacPorts) might not be searched, though.

JM

Le 25 sept. 2014 à 03:17, Antonio Gervasoni <[hidden email]> a écrit :

Hi all,

I've just figured out how to get Emacs to work with Lilypond in OSX.
Everything works fine except the command for viewing the pdf output (C-c
C-s). When I run it I get this:

"xpdf /Users/Antonio/Desktop/Emacs/Test.pdf
/bin/bash: xpdf: command not found

Compilation exited abnormally with code 127 at Wed Sep 24 20:08:44"

Xpdf is installed. My guess is that Emacs can't find the path to it but I
don't know how to set it up.

Anyone knows how to solve this?

Antonio




--
View this message in context: http://lilypond.1069038.n5.nabble.com/Emacs-Lilypond-mode-view-PDF-tp166776.html
Sent from the User mailing list archive at Nabble.com.

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user



_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Emacs & Lilypond-mode: view PDF

Antonio Gervasoni
Hi Jacques!

First, I tried following the installation instructions inside the tar.gz file that is provided for Mac at the xpdf website. The instructions I followed were these:

1. Copy the executables (xpdf, pdftotext, etc.) to to /usr/local/bin.

2. Copy the man pages (*.1 and *.5) to /usr/local/man/man1 and
   /usr/local/man/man5.

3. Copy the sample-xpdfrc file to /usr/local/etc/xpdfrc.  You'll
   probably want to edit its contents (as distributed, everything is
   commented out) -- see xpdfrc(5) for details.

As that didn't seem to work, I removed everything and then tried the pre-compiled binary (.dmg) that can also be found there. However, when I looked inside the folders, I found the executables had not been installed. Therefore, I removed all the files again so now everything is like it was before my first attempt.

This morning I have re-read the installation instructions copied above and discovered something intriguing. The first point says "Copy the executables (xpdf, pdftotext, etc.)..." however, there is no xpdf executable inside the tar.gz file. A quick search on Google shows that other users have had the same problem (even when compiling xpdf themselves). Could that be the source of my problem?

For the moment, I found a workaround. I opened the Lilypond-mode.el file and changed "xpdf" for "open" on line 346. This way, Preview is being called instead of xpdf.

Any suggestions?

Best,

Antonio
Reply | Threaded
Open this post in threaded view
|

Re: Emacs & Lilypond-mode: view PDF

Jacques Menu Muzhic
Hello Antonio,

Actually yes, the dmg tells it contains only pdf* tools, not xpdf.

I did the installation with MacPorts (http://www.macports.org/install.php), first two steps only needed since I don’t use Xcode daily:


[hidden email]:~ > sudo port install xpdf
Password:
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.
Error: It seems you have not accepted the Xcode license; most ports will fail to build.
Error: Agree to the license by opening Xcode or running `sudo xcodebuild -license'.
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port xpdf failed

[hidden email]:~ > sudo xcodebuild -license


You have not agreed to the Xcode license agreements. You must agree to both license agreements below in order to use Xcode.

Hit the Enter key to view the license agreements at '/Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf'

… … …

By typing 'agree' you are agreeing to the terms of the software license agreements. Type 'print' to print them or anything else to cancel, [agree, print, cancel] agree

You can view the license agreements in Xcode's About Box, or at /Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf

menu@dynamic.wline.6rd.res.cust.swisscom.ch:~ > sudo port install xpdf
… … …

menu@dynamic.wline.6rd.res.cust.swisscom.ch:~ > which xpdf
/opt/local/bin/xpdf


Le 25 sept. 2014 à 18:24, Antonio Gervasoni <[hidden email]> a écrit :

Hi Jacques!

First, I tried following the installation instructions inside the tar.gz
file that is provided for Mac at the xpdf website. The instructions I
followed were these:

1. Copy the executables (xpdf, pdftotext, etc.) to to /usr/local/bin.

2. Copy the man pages (*.1 and *.5) to /usr/local/man/man1 and
  /usr/local/man/man5.

3. Copy the sample-xpdfrc file to /usr/local/etc/xpdfrc.  You'll
  probably want to edit its contents (as distributed, everything is
  commented out) -- see xpdfrc(5) for details.

As that didn't seem to work, I removed everything and then tried the
pre-compiled binary (.dmg) that can also be found there. However, when I
looked inside the folders, I found the executables had not been installed.
Therefore, I removed all the files again so now everything is like it was
before my first attempt.

This morning I have re-read the installation instructions copied above and
discovered something intriguing. The first point says "Copy the executables
(xpdf, pdftotext, etc.)..." however, there is no xpdf executable inside the
tar.gz file. A quick search on Google shows that other users have had the
same problem (even when compiling xpdf themselves). Could that be the source
of my problem?

For the moment, I found a workaround. I opened the Lilypond-mode.el file and
changed "xpdf" for "open" on line 346. This way, Preview is being called
instead of xpdf.

Any suggestions?

Best,

Antonio



--
View this message in context: http://lilypond.1069038.n5.nabble.com/Emacs-Lilypond-mode-view-PDF-tp166776p166806.html
Sent from the User mailing list archive at Nabble.com.

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Emacs & Lilypond-mode: view PDF

Antonio Gervasoni
Thank you very much Jacques! It never occurred to me to install it via Macports. I did it and now it works as expected. I still have to install the tools manually, right?

One final question, do I have to go through all the trouble of installing Macports and Xcode on my student's Mac so that I can then build the xpdf executable there or can I simply copy the one in my machine and put it manually on his computer?

Thanks again for all your help!

Antonio