mirror of https://github.com/Chizi123/.emacs.d.git

Chizi123
2018-11-18 76bbd07de7add0f9d13c6914f158d19630fe2f62
commit | author | age
76bbd0 1 ;ELC
C 2 ;;; Compiled
3 ;;; in Emacs version 26.1
4 ;;; with all optimizations.
5
6 ;;; This file uses dynamic docstrings, first added in Emacs 19.29.
7
8 ;;; This file does not contain utf-8 non-ASCII characters,
9 ;;; and so can be loaded in Emacs versions earlier than 23.
10
11 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13
14
15 (byte-code "\300\301!\210\300\302!\210\303\304\305\"\210\306\307\310\"\207" [require ob outline defalias lilypond-mode LilyPond-mode add-to-list org-babel-tangle-lang-exts ("LilyPond" . "ly")] 3)
16 #@154 Default header arguments for lilypond code blocks.
17 NOTE: The arguments are determined at lilypond compile time.
18 See (org-babel-lilypond-set-header-args)
19 (defvar org-babel-default-header-args:lilypond nil (#$ . 605))
20 #@269 Following the org-babel-tangle (C-c C-v t) command,
21 org-babel-lilypond-compile-post-tangle determines whether ob-lilypond should
22 automatically attempt to compile the resultant tangled file.
23 If the value is nil, no automated compilation takes place.
24 Default value is t
25 (defvar org-babel-lilypond-compile-post-tangle t (#$ . 828))
26 #@245 Following a successful LilyPond compilation
27 org-babel-lilypond-display-pdf-post-tangle determines whether to automate the
28 drawing / redrawing of the resultant pdf.  If the value is nil,
29 the pdf is not automatically redrawn.  Default value is t
30 (defvar org-babel-lilypond-display-pdf-post-tangle t (#$ . 1164))
31 #@242 Following a successful LilyPond compilation
32 org-babel-lilypond-play-midi-post-tangle determines whether to automate the
33 playing of the resultant midi file.  If the value is nil,
34 the midi file is not automatically played.  Default value is t
35 (defvar org-babel-lilypond-play-midi-post-tangle t (#$ . 1481))
36 #@119 Command to execute lilypond on your system.
37 Do not set it directly.  Customize `org-babel-lilypond-commands' instead.
38 (defvar org-babel-lilypond-ly-command "" (#$ . 1793))
39 #@118 Command to show a PDF file on your system.
40 Do not set it directly.  Customize `org-babel-lilypond-commands' instead.
41 (defvar org-babel-lilypond-pdf-command "" (#$ . 1972))
42 #@119 Command to play a MIDI file on your system.
43 Do not set it directly.  Customize `org-babel-lilypond-commands' instead.
44 (defvar org-babel-lilypond-midi-command "" (#$ . 2151))
45 (byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313\314\315\316\317& \207" [custom-declare-variable org-babel-lilypond-commands funcall function #[0 "\301\267\202\n\302\207\303\207\304\207" [system-type #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (darwin 6 windows-nt 8)) ("/Applications/lilypond.app/Contents/Resources/bin/lilypond" "open" "open") ("lilypond" #1="" #1#) ("lilypond" "xdg-open" "xdg-open")] 2] "Commands to run lilypond and view or play the results.\nThese should be executables that take a filename as an argument.\nOn some system it is possible to specify the filename directly\nand the viewer or player will be determined from the file type;\nyou can leave the string empty on this case." :group org-babel :type (list (string :tag "Lilypond   ") (string :tag "PDF Viewer ") (string :tag "MIDI Player")) :version "24.4" :package-version (Org . "8.2.7") :set #[514 "\211@\211A@\3038\211\207" [org-babel-lilypond-ly-command org-babel-lilypond-pdf-command org-babel-lilypond-midi-command 2] 4 "\n\n(fn SYMBOL VALUE)"]] 14)
46 #@63 Non-nil means image generation (PNG) is turned on by default.
47 (defvar org-babel-lilypond-gen-png nil (#$ . 3428))
48 #@66 Non-nil means image generation (SVG) is be turned on by default.
49 (defvar org-babel-lilypond-gen-svg nil (#$ . 3548))
50 #@56 Non-nil means HTML generation is turned on by default.
51 (defvar org-babel-lilypond-gen-html nil (#$ . 3671))
52 #@58 Non-nil means PDF generation is be turned on by default.
53 (defvar org-babel-lilypond-gen-pdf nil (#$ . 3785))
54 #@53 Non-nil forces the compiler to use the EPS backend.
55 (defvar org-babel-lilypond-use-eps nil (#$ . 3900))
56 #@232 Non-nil turns Arrange mode on.
57 In Arrange mode the following settings are altered from default:
58 :tangle yes,    :noweb yes
59 :results silent :comments yes.
60 In addition lilypond block execution causes tangling of all lilypond
61 blocks.
62 (defvar org-babel-lilypond-arrange-mode nil (#$ . 4011))
63 #@78 Expand BODY according to PARAMS, return the expanded body.
64
65 (fn BODY PARAMS)
66 (defalias 'org-babel-expand-body:lilypond #[514 "C\300!\301\302\303\304\305\306!\307\"\310\311%\"\210\242\262\207" [org-babel--get-vars mapc make-byte-code 257 "\301@!A\300\302\303\304!P;\203\202\305\306\"\300\242#\240\207" vconcat vector [symbol-name replace-regexp-in-string "$" regexp-quote format "%S"] 9 "\n\n(fn PAIR)"] 11 (#$ . 4305)])
67 #@298 This function is called by `org-babel-execute-src-block'.
68 Depending on whether we are in arrange mode either:
69 1. Attempt to execute lilypond block according to header settings
70   (This is the default basic mode)
71 2. Tangle all lilypond blocks and process the result (arrange mode)
72
73 (fn BODY PARAMS)
74 (defalias 'org-babel-execute:lilypond #[514 "\301!\210\203 \302 \207\303\"\207" [org-babel-lilypond-arrange-mode org-babel-lilypond-set-header-args org-babel-lilypond-tangle org-babel-lilypond-process-basic] 5 (#$ . 4749)])
75 #@152 ob-lilypond specific tangle, attempts to invoke
76 =ly-execute-tangled-ly= if tangle is successful.  Also passes
77 specific arguments to =org-babel-tangle=
78 (defalias 'org-babel-lilypond-tangle #[0 "\300\301\302\303#\205\n\304 \207" [org-babel-tangle nil "yes" "lilypond" org-babel-lilypond-execute-tangled-ly] 4 (#$ . 5282) nil])
79 #@59 Execute a lilypond block in basic mode.
80
81 (fn BODY PARAMS)
82 (defalias 'org-babel-lilypond-process-basic #[514 "\301\236A\302\236A\206\f\303\304\305!\211\306\307\310!!\311\312\313\314\315!\316\"\317$\216r\211q\210\320\"c\210)r\211q\210\321\322\211\322\312%\210*\266\323\324\325\326\327\330    !\331\"A\206N\332\333\334\n!\335\n\n\260\n\303\"\266\322\207" [org-babel-lilypond-ly-command :file :cmdline "" org-babel-temp-file "lilypond-" get-buffer-create generate-new-buffer-name " *temp file*" make-byte-code 0 "\301\300!\205    \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 org-babel-expand-body:generic write-region nil org-babel-eval " -dbackend=eps " "-dno-gs-load-fonts " "-dinclude-eps-fonts " assoc file-name-extension (("pdf" . "--pdf ") ("ps" . "--ps ") ("png" . "--png ")) "--png " "--output=" file-name-sans-extension " "] 16 (#$ . 5614)])
83 #@91 Return an error because LilyPond exporter does not support sessions.
84
85 (fn SESSION PARAMS)
86 (defalias 'org-babel-prep-session:lilypond #[514 "\300\301!\207" [error "Sorry, LilyPond does not currently support sessions!"] 4 (#$ . 6492)])
87 #@119 Compile result of block tangle with lilypond.
88 If error in compilation, attempt to mark the error in lilypond org file
89 (defalias 'org-babel-lilypond-execute-tangled-ly #[0 "\205Q\301\302 \303\"\301\302 \304\"\305!\204\306\307!\210\202*\305!\203%\310!\210\311\"\210\312\313!\210\314 \210\315!\210eb\210\316!\203D\306\317!\202O\320\321!\210\322!\210\323!\266\202\207" [org-babel-lilypond-compile-post-tangle org-babel-lilypond-switch-extension buffer-file-name ".lilypond" ".ly" file-exists-p error "Error: Tangle Failed!" delete-file rename-file switch-to-buffer-other-window "*lilypond*" erase-buffer org-babel-lilypond-compile-lilyfile org-babel-lilypond-check-for-compile-error "Error in Compilation!" other-window -1 org-babel-lilypond-attempt-to-open-pdf org-babel-lilypond-attempt-to-play-midi] 5 (#$ . 6733)])
90 #@129 Compile lilypond file and check for compile errors
91 FILE-NAME is full path to lilypond (.ly) file
92
93 (fn FILE-NAME &optional TEST)
94 (defalias 'org-babel-lilypond-compile-lilyfile #[513 "\306\307!\210\310\311\312    \203\313\202\314\n\203\315\202\314 \203\"\316\202#\314\f\203+\317\202,\314 \2034\320\2025\314\321\322\f!P  \203]\n\n\n\n\n\n\n\n\n\n\n\257 \202v\323           & \207" [org-babel-lilypond-ly-command org-babel-lilypond-gen-png org-babel-lilypond-gen-html org-babel-lilypond-gen-pdf org-babel-lilypond-use-eps org-babel-lilypond-gen-svg message "Compiling LilyPond..." nil "*lilypond*" t "--png" "" "--html" "--pdf" "-dbackend=eps" "-dbackend=svg" "--output=" file-name-sans-extension call-process] 25 (#$ . 7572)])
95 #@310 Check for compile error.
96 This is performed by parsing the *lilypond* buffer
97 containing the output message from the compilation.
98 FILE-NAME is full path to lilypond file.
99 If TEST is t just return nil if no error found, and pass
100 nil as file-name since it is unused in this context
101
102 (fn FILE-NAME &optional TEST)
103 (defalias 'org-babel-lilypond-check-for-compile-error #[513 "\300\301\302\303#\203 \211\202\211\205\304!\207" [search-forward "error:" nil t org-babel-lilypond-process-compile-error] 6 (#$ . 8342)])
104 #@106 Process the compilation error that has occurred.
105 FILE-NAME is full path to lilypond file
106
107 (fn FILE-NAME)
108 (defalias 'org-babel-lilypond-process-compile-error #[257 "\300 \301\"\302\"\210\303\304!\262\207" [org-babel-lilypond-parse-line-num org-babel-lilypond-parse-error-line org-babel-lilypond-mark-error-line error "Error: Compilation Failed!"] 6 (#$ . 8864)])
109 #@143 Mark the erroneous lines in the lilypond org buffer.
110 FILE-NAME is full path to lilypond file.
111 LINE is the erroneous line
112
113 (fn FILE-NAME LINE)
114 (defalias 'org-babel-lilypond-mark-error-line #[514 "\301\302\303\304\"!\260!\210`eb\210\305\306\305\307#\203(\310 \210\311`!\210`GZb\202*\211b\207" [case-fold-search switch-to-buffer-other-window file-name-nondirectory org-babel-lilypond-switch-extension ".org" nil search-forward t outline-show-all set-mark] 7 (#$ . 9238)])
115 #@51 Extract error line number.
116
117 (fn &optional BUFFER)
118 (defalias 'org-babel-lilypond-parse-line-num #[256 "\211\203\211q\210\300\301\302\303#\205$\300\301\302\303#\205$\300\301\302\303#\205$\300\301\302\303#\211\205>\302u\210\304T\305\301\302\303#S{!\211\247\205<\211\262\207" [search-backward ":" nil t string-to-number search-forward] 8 (#$ . 9720)])
119 #@161 Extract the erroneous line from the tangled .ly file
120 FILE-NAME is full path to lilypond file.
121 LINENO is the number of the erroneous line
122
123 (fn FILE-NAME LINENO)
124 (defalias 'org-babel-lilypond-parse-error-line #[514 "\300\301!r\211q\210\302\303\304\305\306!\307\"\310$\216\311\312\313\"\314\211\211\315%\210\303V\205/eb\210Sy\210`\316 {*\207" [generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205    \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 insert-file-contents org-babel-lilypond-switch-extension ".ly" nil t point-at-eol] 9 (#$ . 10084)])
125 #@179 Attempt to display the generated pdf file
126 FILE-NAME is full path to lilypond file
127 If TEST is non-nil, the shell command is returned and is not run
128
129 (fn FILE-NAME &optional TEST)
130 (defalias 'org-babel-lilypond-attempt-to-open-pdf #[513 "\205*\302\303\"\304!\203%    \305Q\203\211\202 \306\307\310    $\262\202(\311\312!\262\207" [org-babel-lilypond-display-pdf-post-tangle org-babel-lilypond-pdf-command org-babel-lilypond-switch-extension ".pdf" file-exists-p " " start-process "\"Audition pdf\"" "*lilypond*" message "No pdf file generated so can't display!"] 9 (#$ . 10658)])
131 #@177 Attempt to play the generated MIDI file
132 FILE-NAME is full path to lilypond file
133 If TEST is non-nil, the shell command is returned and is not run
134
135 (fn FILE-NAME &optional TEST)
136 (defalias 'org-babel-lilypond-attempt-to-play-midi #[513 "\205*\302\303\"\304!\203%    \305Q\203\211\202 \306\307\310    $\262\202(\311\312!\262\207" [org-babel-lilypond-play-midi-post-tangle org-babel-lilypond-midi-command org-babel-lilypond-switch-extension ".midi" file-exists-p " " start-process "\"Audition midi\"" "*lilypond*" message "No midi file generated so can't play!"] 9 (#$ . 11250)])
137 #@72 Toggle whether midi will be played following a successful compilation.
138 (defalias 'org-babel-lilypond-toggle-midi-play #[0 "?\301\302\203 \303\202\304P!\207" [org-babel-lilypond-play-midi-post-tangle message "Post-Tangle MIDI play has been " "ENABLED." "DISABLED."] 3 (#$ . 11839) nil])
139 #@74 Toggle whether pdf will be displayed following a successful compilation.
140 (defalias 'org-babel-lilypond-toggle-pdf-display #[0 "?\301\302\203 \303\202\304P!\207" [org-babel-lilypond-display-pdf-post-tangle message "Post-Tangle PDF display has been " "ENABLED." "DISABLED."] 3 (#$ . 12137) nil])
141 #@60 Toggle whether png image will be generated by compilation.
142 (defalias 'org-babel-lilypond-toggle-png-generation #[0 "?\301\302\203 \303\202\304P!\207" [org-babel-lilypond-gen-png message "PNG image generation has been " "ENABLED." "DISABLED."] 3 (#$ . 12443) nil])
143 #@55 Toggle whether html will be generated by compilation.
144 (defalias 'org-babel-lilypond-toggle-html-generation #[0 "?\301\302\203 \303\202\304P!\207" [org-babel-lilypond-gen-html message "HTML generation has been " "ENABLED." "DISABLED."] 3 (#$ . 12719) nil])
145 #@54 Toggle whether pdf will be generated by compilation.
146 (defalias 'org-babel-lilypond-toggle-pdf-generation #[0 "?\301\302\203 \303\202\304P!\207" [org-babel-lilypond-gen-pdf message "PDF generation has been " "ENABLED." "DISABLED."] 3 (#$ . 12987) nil])
147 #@47 Toggle whether in Arrange mode or Basic mode.
148 (defalias 'org-babel-lilypond-toggle-arrange-mode #[0 "?\301\302\203 \303\202\304P!\207" [org-babel-lilypond-arrange-mode message "Arrange mode has been " "ENABLED." "DISABLED."] 3 (#$ . 13251) nil])
149 #@82 Utility command to swap current FILE-NAME extension with EXT
150
151 (fn FILE-NAME EXT)
152 (defalias 'org-babel-lilypond-switch-extension #[514 "\300!P\207" [file-name-sans-extension] 4 (#$ . 13509)])
153 #@152 Default arguments to use when evaluating a lilypond
154 source block.  These depend upon whether we are in arrange
155 mode i.e.  ARRANGE-MODE is t
156
157 (fn MODE)
158 (defalias 'org-babel-lilypond-get-header-args #[257 "\211\203\300\207\301\207" [((:tangle . "yes") (:noweb . "yes") (:results . "silent") (:cache . "yes") (:comments . "yes")) ((:results . "file") (:exports . "results"))] 2 (#$ . 13709)])
159 #@100 Set org-babel-default-header-args:lilypond
160 dependent on ORG-BABEL-LILYPOND-ARRANGE-MODE
161
162 (fn MODE)
163 (defalias 'org-babel-lilypond-set-header-args #[257 "\301!\211\207" [org-babel-default-header-args:lilypond org-babel-lilypond-get-header-args] 3 (#$ . 14108)])
164 (provide 'ob-lilypond)