2

Q: how can I get pdf-tools to work simultaneously on OSX and Linux?

I keep my .emacs.d directory synced over Dropbox, and share it between machines running OSX and Linux (Fedora and Ubuntu). I got pdf-tools off of melpa and successfully installed it on OSX.

The problem is that pdf-tools creates an executable (epdfinfo) in its melpa directory. The executable it generates on OSX is not usable on the Linux machines (and I presume vice versa).

How can I get pdf-tools to play nice across the different systems? Can I (should I) generate another executable on the Linux machines to store in the same directory, and if so, how?

The nuclear option, I believe, is to remove the melpa package, go old school, and install pdf-tools by hand -- but do it twice, once for OSX, and once for the Linux systems, and then do some system checking at startup to see which one to use. That seems like a lot of fuss.

1 Answer 1

2

I guess one option is to add a .gitignore which prevents Git from tracking that executable. The downside of course is that it will force you to re-build that executable on every machine.

Another is to set pdf-info-epdfinfo-program to a filename that includes some system info, such as (expand-file-name (concat "epdfinfo-" system-type) ...) and then to rename those executables accordingly. You'll probably also want to adjust the above code since system-type can be gnu/linux where the slash is rather inconvenient.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.