Ejemplo n.º 1
0
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))'
        )
    ]
Ejemplo n.º 2
0
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}")'))]
Ejemplo n.º 3
0
Archivo: emacs.py Proyecto: zed/cook
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))"))
Ejemplo n.º 4
0
Archivo: emacs.py Proyecto: zed/cook
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})"))
Ejemplo n.º 5
0
Archivo: emacs.py Proyecto: zed/cook
def install(recipe, *packages):
    packages_str = " ".join(packages)
    return el.emacs_batch_eval(lf("(cook-install-deps '({packages_str}))"))
Ejemplo n.º 6
0
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)]