Function: org-babel-lilypond-attempt-to-open-pdf

org-babel-lilypond-attempt-to-open-pdf is a byte-compiled function defined in ob-lilypond.el.gz.

Signature

(org-babel-lilypond-attempt-to-open-pdf FILE-NAME &optional TEST)

Documentation

Attempt to display the generated pdf file.

FILE-NAME is full path to lilypond file. If TEST is non-nil, the shell command is returned and is not run.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ob-lilypond.el.gz
(defun org-babel-lilypond-attempt-to-open-pdf (file-name &optional test)
  "Attempt to display the generated pdf file.
FILE-NAME is full path to lilypond file.
If TEST is non-nil, the shell command is returned and is not run."
  (when org-babel-lilypond-display-pdf-post-tangle
    (let ((pdf-file (org-babel-lilypond-switch-extension file-name ".pdf")))
      (if (file-exists-p pdf-file)
          (let ((cmd-string
                 (concat org-babel-lilypond-pdf-command " " pdf-file)))
            (if test
                cmd-string
	      (start-process
	       "\"Audition pdf\""
	       "*lilypond*"
	       org-babel-lilypond-pdf-command
	       pdf-file)))
	(message  "No pdf file generated so can't display!")))))