def export_pdf(recipe, fname): fpdf = re.sub("org$", "pdf", fname) return [ el.emacs_batch_eval(lf('(cs-org-to-pdf "{fname}")')), lf("nohup 1>/dev/null 2>/dev/null evince {fpdf} &"), el.emacsclient_eval( '(with-current-buffer (window-buffer (selected-window)) (bury-buffer))' ) ]
def export_org(recipe, fname): forg = re.sub("md$", "org", fname) return [("pandoc -f markdown -t org --columns=100 -o " + shlex.quote(forg) + " " + shlex.quote(fname)), el.emacs_batch_eval(lf('(cs-md-cleanup "{fname}")'))]
def checkdoc(recipe, *fnames): fnames = fnames or elisp_files_cwd() fnames_str = " ".join(['"' + fname + '"' for fname in fnames]) return el.emacs_batch_eval( lf("(dolist (file '({fnames_str})) (checkdoc-file file))"))
def byte_compile(recipe, *fnames): fnames = fnames or elisp_files_cwd() fnames_str = " ".join(['"' + fname + '"' for fname in fnames]) return el.emacs_batch_eval(lf("(cook-byte-compile {fnames_str})"))
def install(recipe, *packages): packages_str = " ".join(packages) return el.emacs_batch_eval(lf("(cook-install-deps '({packages_str}))"))
def export_html(recipe, fname): fname = el.expand_file_name(fname) fhtml = re.sub("org$", "html", fname) el.sc(el.emacs_batch_eval(lf('(cs-org-to-html "{fname}")'))) if "INSIDE_EMACS" not in os.environ: return ["firefox " + shlex.quote(fhtml)]