mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-21 06:55:35 +00:00
Activate lexical binding in some libraries
* lisp/ob-C.el (org-babel-prep-session:C): (org-babel-load-session:C): * lisp/ob-J.el: (org-babel-expand-body:J): (org-babel-execute:J): * lisp/ob-R.el: (org-babel-expand-body:R): * lisp/ob-abc.el: (org-babel-execute:abc): (org-babel-prep-session:abc): * lisp/ob-asymptote.el: (org-babel-execute:asymptote): (org-babel-prep-session:asymptote): * lisp/ob-awk.el: (org-babel-expand-body:awk): * lisp/ob-calc.el: (org-babel-expand-body:calc): * lisp/ob-clojure.el: * lisp/ob-comint.el: (org-babel-comint-in-buffer): (org-babel-comint-with-output): (org-babel-comint-eval-invisibly-and-wait-for-file): * lisp/ob-coq.el: * lisp/ob-css.el: (org-babel-execute:css): (org-babel-prep-session:css): * lisp/ob-ditaa.el: (org-babel-execute:ditaa): (org-babel-prep-session:ditaa): * lisp/ob-dot.el: (org-babel-execute:dot): (org-babel-prep-session:dot): * lisp/ob-ebnf.el: * lisp/ob-emacs-lisp.el: * lisp/ob-eval.el: * lisp/ob-forth.el: * lisp/ob-fortran.el: (org-babel-execute:fortran): (org-babel-prep-session:fortran): (org-babel-load-session:fortran): * lisp/ob-gnuplot.el: (org-babel-expand-body:gnuplot): (org-babel-prep-session:gnuplot): (org-babel-gnuplot-initiate-session): * lisp/ob-groovy.el: (org-babel-prep-session:groovy): (org-babel-groovy-initiate-session): * lisp/ob-haskell.el: (org-babel-haskell-initiate-session): * lisp/ob-io.el: (org-babel-prep-session:io): (org-babel-io-initiate-session): * lisp/ob-java.el: (org-babel-execute:java): * lisp/ob-js.el: * lisp/ob-keys.el: * lisp/ob-latex.el: (org-babel-prep-session:latex): * lisp/ob-ledger.el: (org-babel-execute:ledger): (org-babel-prep-session:ledger): * lisp/ob-lilypond.el: (org-babel-lilypond-commands): (org-babel-lilypond-process-basic): (org-babel-prep-session:lilypond): (org-babel-lilypond-parse-line-num): * lisp/ob-lisp.el: * lisp/ob-makefile.el: (org-babel-execute:makefile): (org-babel-prep-session:makefile): * lisp/ob-matlab.el: * lisp/ob-maxima.el: (org-babel-prep-session:maxima): * lisp/ob-mscgen.el: (org-babel-prep-session:mscgen): * lisp/ob-ocaml.el: (org-babel-execute:ocaml): (org-babel-prep-session:ocaml): * lisp/ob-octave.el: (org-babel-execute:octave): (org-babel-octave-initiate-session): * lisp/ob-org.el: (org-babel-prep-session:org): * lisp/ob-perl.el: (org-babel-prep-session:perl): (org-babel-perl--var-to-perl): (org-babel-perl-initiate-session): * lisp/ob-picolisp.el: (org-babel-expand-body:picolisp): (org-babel-execute:picolisp): * lisp/ob-plantuml.el: (org-babel-execute:plantuml): (org-babel-prep-session:plantuml): * lisp/ob-processing.el: (org-babel-prep-session:processing): * lisp/ob-python.el: (org-babel-python-initiate-session): * lisp/ob-ref.el: (org-babel-ref-resolve): * lisp/ob-ruby.el: (org-babel-ruby-initiate-session): * lisp/ob-sass.el: (org-babel-execute:sass): (org-babel-prep-session:sass): * lisp/ob-scala.el: (org-babel-execute:scala): (org-babel-prep-session:scala): (org-babel-scala-initiate-session): * lisp/ob-scheme.el: * lisp/ob-screen.el: (org-babel-prep-session:screen): (org-babel-screen-session-write-temp-file): (org-babel-screen-test): * lisp/ob.el: * lisp/org-colview.el: (org-columns-todo): (org-columns-set-tags-or-toggle): (org-columns-new): (org-columns-uncompile-format): (org-agenda-colview-summarize): * lisp/org-footnote.el: (electric-indent-mode): * lisp/org-indent.el: (org-indent-refresh-maybe): * lisp/org-list.el: * lisp/org-macro.el: (org-macro--collect-macros): * lisp/org-src.el: * lisp/org-table.el: (sort-fold-case): (org-table-create): (org-table-field-info): (org-table-transpose-table-at-point): (org-table-remove-rectangle-highlight): (orgtbl-create-or-convert-from-region): (org-define-lookup-function): * lisp/ox-ascii.el: (org-ascii-format-drawer-function): (org-ascii--has-caption-p): (org-ascii-bold): (org-ascii-center-block): (org-ascii-clock): (org-ascii-code): (org-ascii-dynamic-block): (org-ascii-entity): (org-ascii-example-block): (org-ascii-export-snippet): (org-ascii-export-block): (org-ascii-fixed-width): (org-ascii-footnote-reference): (org-ascii-horizontal-rule): (org-ascii-inline-src-block): (org-ascii-format-inlinetask-default): (org-ascii-italic): (org-ascii-keyword): (org-ascii-latex-environment): (org-ascii-latex-fragment): (org-ascii-line-break): (org-ascii-node-property): (org-ascii-planning): (org-ascii-quote-block): (org-ascii-radio-target): (org-ascii-special-block): (org-ascii-src-block): (org-ascii-statistics-cookie): (org-ascii-subscript): (org-ascii-superscript): (org-ascii-strike-through): (org-ascii-timestamp): (org-ascii-underline): (org-ascii-verbatim): (org-ascii-verse-block): (org-ascii-filter-headline-blank-lines): (org-ascii-filter-paragraph-spacing): (org-ascii-filter-comment-spacing): Use lexical binding.
This commit is contained in:
parent
b4af3f0852
commit
f0bf77e82a
@ -1,4 +1,4 @@
|
||||
;;; ob-C.el --- org-babel functions for C and similar languages
|
||||
;;; ob-C.el --- Babel Functions for C and Similar Languages -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2010-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -265,12 +265,12 @@ it's header arguments."
|
||||
body
|
||||
(format "int main() {\n%s\nreturn 0;\n}\n" body)))
|
||||
|
||||
(defun org-babel-prep-session:C (session params)
|
||||
(defun org-babel-prep-session:C (_session _params)
|
||||
"This function does nothing as C is a compiled language with no
|
||||
support for sessions"
|
||||
(error "C is a compiled languages -- no support for sessions"))
|
||||
|
||||
(defun org-babel-load-session:C (session body params)
|
||||
(defun org-babel-load-session:C (_session _body _params)
|
||||
"This function does nothing as C is a compiled language with no
|
||||
support for sessions"
|
||||
(error "C is a compiled languages -- no support for sessions"))
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-J.el --- org-babel functions for J evaluation
|
||||
;;; ob-J.el --- Babel Functions for J -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2011-2013 Free Software Foundation, Inc.
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
(declare-function org-trim "org" (S))
|
||||
(declare-function j-console-ensure-session "ext:j-console" ())
|
||||
|
||||
(defun org-babel-expand-body:J (body params &optional processed-params)
|
||||
(defun org-babel-expand-body:J (body _params &optional _processed-params)
|
||||
"Expand BODY according to PARAMS, return the expanded body.
|
||||
PROCESSED-PARAMS isn't used yet."
|
||||
(org-babel-J-interleave-echos-except-functions body))
|
||||
@ -66,13 +66,10 @@ This function is called by `org-babel-execute-src-block'"
|
||||
(message "executing J source code block")
|
||||
(let* ((processed-params (org-babel-process-params params))
|
||||
(sessionp (cdr (assoc :session params)))
|
||||
(session (org-babel-j-initiate-session sessionp))
|
||||
(vars (nth 2 processed-params))
|
||||
(result-params (nth 3 processed-params))
|
||||
(result-type (nth 4 processed-params))
|
||||
(full-body (org-babel-expand-body:J
|
||||
body params processed-params))
|
||||
(tmp-script-file (org-babel-temp-file "J-src")))
|
||||
(org-babel-j-initiate-session sessionp)
|
||||
(org-babel-J-strip-whitespace
|
||||
(if (string= sessionp "none")
|
||||
(progn
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-R.el --- org-babel functions for R code evaluation
|
||||
;;; ob-R.el --- Babel Functions for R -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -139,7 +139,7 @@ This function is used when the table contains a header.")
|
||||
|
||||
This function is used when the table does not contain a header.")
|
||||
|
||||
(defun org-babel-expand-body:R (body params &optional graphics-file)
|
||||
(defun org-babel-expand-body:R (body params &optional &graphics-file)
|
||||
"Expand BODY according to PARAMS, return the expanded body."
|
||||
(mapconcat 'identity
|
||||
(append
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-abc.el --- org-babel functions for template evaluation
|
||||
;;; ob-abc.el --- Org Babel Functions for ABC -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) Free Software Foundation
|
||||
|
||||
@ -59,12 +59,10 @@
|
||||
"Execute a block of ABC code with org-babel. This function is
|
||||
called by `org-babel-execute-src-block'"
|
||||
(message "executing Abc source code block")
|
||||
(let* ((result-params (split-string (or (cdr (assoc :results params)))))
|
||||
(cmdline (cdr (assoc :cmdline params)))
|
||||
(out-file ((lambda (el)
|
||||
(or el
|
||||
(error "abc code block requires :file header argument")))
|
||||
(replace-regexp-in-string "\.pdf$" ".ps" (cdr (assoc :file params)))))
|
||||
(let* ((cmdline (cdr (assoc :cmdline params)))
|
||||
(out-file (let ((file (cdr (assq :file params))))
|
||||
(if file (replace-regexp-in-string "\.pdf$" ".ps" file)
|
||||
(error "abc code block requires :file header argument"))))
|
||||
(in-file (org-babel-temp-file "abc-"))
|
||||
(render (concat "abcm2ps" " " cmdline
|
||||
" -O " (org-babel-process-file-name out-file)
|
||||
@ -86,7 +84,7 @@
|
||||
|
||||
;; This function should be used to assign any variables in params in
|
||||
;; the context of the session environment.
|
||||
(defun org-babel-prep-session:abc (session params)
|
||||
(defun org-babel-prep-session:abc (_session _params)
|
||||
"Return an error because abc does not support sessions."
|
||||
(error "ABC does not support sessions"))
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-asymptote.el --- org-babel functions for asymptote evaluation
|
||||
;;; ob-asymptote.el --- Babel Functions for Asymptote -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -55,8 +55,7 @@
|
||||
(defun org-babel-execute:asymptote (body params)
|
||||
"Execute a block of Asymptote code.
|
||||
This function is called by `org-babel-execute-src-block'."
|
||||
(let* ((result-params (split-string (or (cdr (assoc :results params)) "")))
|
||||
(out-file (cdr (assoc :file params)))
|
||||
(let* ((out-file (cdr (assoc :file params)))
|
||||
(format (or (and out-file
|
||||
(string-match ".+\\.\\(.+\\)" out-file)
|
||||
(match-string 1 out-file))
|
||||
@ -79,7 +78,7 @@ This function is called by `org-babel-execute-src-block'."
|
||||
(message cmd) (shell-command cmd)
|
||||
nil)) ;; signal that output has already been written to file
|
||||
|
||||
(defun org-babel-prep-session:asymptote (session params)
|
||||
(defun org-babel-prep-session:asymptote (_session _params)
|
||||
"Return an error if the :session header argument is set.
|
||||
Asymptote does not support sessions"
|
||||
(error "Asymptote does not support sessions"))
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-awk.el --- org-babel functions for awk evaluation
|
||||
;;; ob-awk.el --- Babel Functions for Awk -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2011-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
(defvar org-babel-awk-command "awk"
|
||||
"Name of the awk executable command.")
|
||||
|
||||
(defun org-babel-expand-body:awk (body params)
|
||||
(defun org-babel-expand-body:awk (body _params)
|
||||
"Expand BODY according to PARAMS, return the expanded body."
|
||||
body)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-calc.el --- org-babel functions for calc code evaluation
|
||||
;;; ob-calc.el --- Babel Functions for Calc -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2010-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
(defvar org-babel-default-header-args:calc nil
|
||||
"Default arguments for evaluating an calc source block.")
|
||||
|
||||
(defun org-babel-expand-body:calc (body params)
|
||||
(defun org-babel-expand-body:calc (body _params)
|
||||
"Expand BODY according to PARAMS, return the expanded body." body)
|
||||
|
||||
(defvar org--var-syms) ; Dynamically scoped from org-babel-execute:calc
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-clojure.el --- org-babel functions for clojure evaluation
|
||||
;;; ob-clojure.el --- Babel Functions for Clojure -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-comint.el --- org-babel functions for interaction with comint buffers
|
||||
;;; ob-comint.el --- Babel Functions for Interaction with Comint Buffers -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -53,7 +53,7 @@ executed inside the protection of `save-excursion' and
|
||||
(error "Buffer %s does not exist or has no process" ,buffer))
|
||||
(save-match-data
|
||||
(with-current-buffer ,buffer
|
||||
(let ((comint-input-filter (lambda (input) nil)))
|
||||
(let ((comint-input-filter (lambda (_input) nil)))
|
||||
,@body)))))
|
||||
(def-edebug-spec org-babel-comint-in-buffer (form body))
|
||||
|
||||
@ -79,7 +79,7 @@ or user `keyboard-quit' during execution of body."
|
||||
(comint-output-filter-functions
|
||||
(cons (lambda (text) (setq string-buffer (concat string-buffer text)))
|
||||
comint-output-filter-functions))
|
||||
dangling-text raw)
|
||||
dangling-text)
|
||||
;; got located, and save dangling text
|
||||
(goto-char (process-mark (get-buffer-process (current-buffer))))
|
||||
(let ((start (point))
|
||||
@ -107,12 +107,12 @@ or user `keyboard-quit' during execution of body."
|
||||
(insert dangling-text)
|
||||
|
||||
;; remove echo'd FULL-BODY from input
|
||||
(if (and ,remove-echo ,full-body
|
||||
(string-match
|
||||
(replace-regexp-in-string
|
||||
"\n" "[\r\n]+" (regexp-quote (or ,full-body "")))
|
||||
string-buffer))
|
||||
(setq raw (substring string-buffer (match-end 0))))
|
||||
(when (and ,remove-echo ,full-body
|
||||
(string-match
|
||||
(replace-regexp-in-string
|
||||
"\n" "[\r\n]+" (regexp-quote (or ,full-body "")))
|
||||
string-buffer))
|
||||
(setq string-buffer (substring string-buffer (match-end 0))))
|
||||
(split-string string-buffer comint-prompt-regexp)))))
|
||||
(def-edebug-spec org-babel-comint-with-output (sexp body))
|
||||
|
||||
@ -153,7 +153,7 @@ FILE exists at end of evaluation."
|
||||
(if (file-remote-p default-directory)
|
||||
(let (v)
|
||||
(with-parsed-tramp-file-name default-directory nil
|
||||
(tramp-flush-directory-property v ""))))
|
||||
(tramp-flush-directory-property v ""))))
|
||||
(while (not (file-exists-p file)) (sit-for (or period 0.25))))
|
||||
|
||||
(provide 'ob-comint)
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-coq.el --- org-babel functions for Coq
|
||||
;;; ob-coq.el --- Babel Functions for Coq -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2010-2015 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-css.el --- org-babel functions for css evaluation
|
||||
;;; ob-css.el --- Babel Functions for CSS -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -31,12 +31,12 @@
|
||||
|
||||
(defvar org-babel-default-header-args:css '())
|
||||
|
||||
(defun org-babel-execute:css (body params)
|
||||
(defun org-babel-execute:css (body _params)
|
||||
"Execute a block of CSS code.
|
||||
This function is called by `org-babel-execute-src-block'."
|
||||
body)
|
||||
|
||||
(defun org-babel-prep-session:css (session params)
|
||||
(defun org-babel-prep-session:css (_session _params)
|
||||
"Return an error if the :session header argument is set.
|
||||
CSS does not support sessions."
|
||||
(error "CSS sessions are nonsensical"))
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-ditaa.el --- org-babel functions for ditaa evaluation
|
||||
;;; ob-ditaa.el --- Babel Functions for ditaa -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -81,11 +81,9 @@ Do not leave leading or trailing spaces in this string."
|
||||
(defun org-babel-execute:ditaa (body params)
|
||||
"Execute a block of Ditaa code with org-babel.
|
||||
This function is called by `org-babel-execute-src-block'."
|
||||
(let* ((result-params (split-string (or (cdr (assoc :results params)) "")))
|
||||
(out-file (let ((el (cdr (assoc :file params))))
|
||||
(or el
|
||||
(error
|
||||
"ditaa code block requires :file header argument"))))
|
||||
(let* ((out-file (or (cdr (assoc :file params))
|
||||
(error
|
||||
"ditaa code block requires :file header argument")))
|
||||
(cmdline (cdr (assoc :cmdline params)))
|
||||
(java (cdr (assoc :java params)))
|
||||
(in-file (org-babel-temp-file "ditaa-"))
|
||||
@ -115,7 +113,7 @@ This function is called by `org-babel-execute-src-block'."
|
||||
(when pdf-cmd (message pdf-cmd) (shell-command pdf-cmd))
|
||||
nil)) ;; signal that output has already been written to file
|
||||
|
||||
(defun org-babel-prep-session:ditaa (session params)
|
||||
(defun org-babel-prep-session:ditaa (_session _params)
|
||||
"Return an error because ditaa does not support sessions."
|
||||
(error "Ditaa does not support sessions"))
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-dot.el --- org-babel functions for dot evaluation
|
||||
;;; ob-dot.el --- Babel Functions for dot -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -64,8 +64,7 @@
|
||||
(defun org-babel-execute:dot (body params)
|
||||
"Execute a block of Dot code with org-babel.
|
||||
This function is called by `org-babel-execute-src-block'."
|
||||
(let* ((result-params (cdr (assoc :result-params params)))
|
||||
(out-file (cdr (or (assoc :file params)
|
||||
(let* ((out-file (cdr (or (assoc :file params)
|
||||
(error "You need to specify a :file parameter"))))
|
||||
(cmdline (or (cdr (assoc :cmdline params))
|
||||
(format "-T%s" (file-name-extension out-file))))
|
||||
@ -80,7 +79,7 @@ This function is called by `org-babel-execute-src-block'."
|
||||
" -o " (org-babel-process-file-name out-file)) "")
|
||||
nil)) ;; signal that output has already been written to file
|
||||
|
||||
(defun org-babel-prep-session:dot (session params)
|
||||
(defun org-babel-prep-session:dot (_session _params)
|
||||
"Return an error because Dot does not support sessions."
|
||||
(error "Dot does not support sessions"))
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-ebnf.el --- org-babel functions for ebnf evaluation
|
||||
;;; ob-ebnf.el --- Babel Functions for EBNF -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
|
||||
@ -58,9 +58,7 @@ called by `org-babel-execute-src-block'"
|
||||
(dest-dir (file-name-directory dest-file))
|
||||
(dest-root (file-name-sans-extension
|
||||
(file-name-nondirectory dest-file)))
|
||||
(dest-ext (file-name-extension dest-file))
|
||||
(style (cdr (assoc :style params)))
|
||||
(current-dir default-directory)
|
||||
(result nil))
|
||||
(with-temp-buffer
|
||||
(when style (ebnf-push-style style))
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-emacs-lisp.el --- org-babel functions for emacs-lisp code evaluation
|
||||
;;; ob-emacs-lisp.el --- Babel Functions for Emacs-lisp Code -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-eval.el --- org-babel functions for external code evaluation
|
||||
;;; ob-eval.el --- Babel Functions for External Code Evaluation -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-forth.el --- org-babel functions for Forth
|
||||
;;; ob-forth.el --- Babel Functions for Forth -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2014 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-fortran.el --- org-babel functions for fortran
|
||||
;;; ob-fortran.el --- Babel Functions for Fortran -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2011-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -50,17 +50,15 @@
|
||||
(tmp-bin-file (org-babel-temp-file "fortran-bin-" org-babel-exeext))
|
||||
(cmdline (cdr (assoc :cmdline params)))
|
||||
(flags (cdr (assoc :flags params)))
|
||||
(full-body (org-babel-expand-body:fortran body params))
|
||||
(compile
|
||||
(progn
|
||||
(with-temp-file tmp-src-file (insert full-body))
|
||||
(org-babel-eval
|
||||
(format "%s -o %s %s %s"
|
||||
org-babel-fortran-compiler
|
||||
(org-babel-process-file-name tmp-bin-file)
|
||||
(mapconcat 'identity
|
||||
(if (listp flags) flags (list flags)) " ")
|
||||
(org-babel-process-file-name tmp-src-file)) ""))))
|
||||
(full-body (org-babel-expand-body:fortran body params)))
|
||||
(with-temp-file tmp-src-file (insert full-body))
|
||||
(org-babel-eval
|
||||
(format "%s -o %s %s %s"
|
||||
org-babel-fortran-compiler
|
||||
(org-babel-process-file-name tmp-bin-file)
|
||||
(mapconcat 'identity
|
||||
(if (listp flags) flags (list flags)) " ")
|
||||
(org-babel-process-file-name tmp-src-file)) "")
|
||||
(let ((results
|
||||
(org-babel-trim
|
||||
(org-remove-indentation
|
||||
@ -114,12 +112,12 @@ it's header arguments."
|
||||
body)
|
||||
(format "program main\n%s\nend program main\n" body)))
|
||||
|
||||
(defun org-babel-prep-session:fortran (session params)
|
||||
(defun org-babel-prep-session:fortran (_session _params)
|
||||
"This function does nothing as fortran is a compiled language with no
|
||||
support for sessions"
|
||||
(error "Fortran is a compiled languages -- no support for sessions"))
|
||||
|
||||
(defun org-babel-load-session:fortran (session body params)
|
||||
(defun org-babel-load-session:fortran (_session _body _params)
|
||||
"This function does nothing as fortran is a compiled language with no
|
||||
support for sessions"
|
||||
(error "Fortran is a compiled languages -- no support for sessions"))
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-gnuplot.el --- org-babel functions for gnuplot evaluation
|
||||
;;; ob-gnuplot.el --- Babel Functions for Gnuplot -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -109,7 +109,6 @@ code."
|
||||
(or (cdr (assoc (intern (downcase ext))
|
||||
*org-babel-gnuplot-terms*))
|
||||
ext)))))
|
||||
(cmdline (cdr (assoc :cmdline params)))
|
||||
(title (cdr (assoc :title params)))
|
||||
(lines (cdr (assoc :line params)))
|
||||
(sets (cdr (assoc :set params)))
|
||||
@ -118,8 +117,7 @@ code."
|
||||
(timefmt (cdr (assoc :timefmt params)))
|
||||
(time-ind (or (cdr (assoc :timeind params))
|
||||
(when timefmt 1)))
|
||||
(add-to-body (lambda (text) (setq body (concat text "\n" body))))
|
||||
output)
|
||||
(add-to-body (lambda (text) (setq body (concat text "\n" body)))))
|
||||
;; append header argument settings to body
|
||||
(when title (funcall add-to-body (format "set title '%s'" title)))
|
||||
(when lines (mapc (lambda (el) (funcall add-to-body el)) lines))
|
||||
@ -173,7 +171,6 @@ This function is called by `org-babel-execute-src-block'."
|
||||
(require 'gnuplot)
|
||||
(let ((session (cdr (assoc :session params)))
|
||||
(result-type (cdr (assoc :results params)))
|
||||
(out-file (cdr (assoc :file params)))
|
||||
(body (org-babel-expand-body:gnuplot body params))
|
||||
output)
|
||||
(save-window-excursion
|
||||
@ -206,10 +203,12 @@ This function is called by `org-babel-execute-src-block'."
|
||||
(var-lines (org-babel-variable-assignments:gnuplot params)))
|
||||
(message "%S" session)
|
||||
(org-babel-comint-in-buffer session
|
||||
(mapc (lambda (var-line)
|
||||
(insert var-line) (comint-send-input nil t)
|
||||
(org-babel-comint-wait-for-output session)
|
||||
(sit-for .1) (goto-char (point-max))) var-lines))
|
||||
(dolist (var-line var-lines)
|
||||
(insert var-line)
|
||||
(comint-send-input nil t)
|
||||
(org-babel-comint-wait-for-output session)
|
||||
(sit-for .1)
|
||||
(goto-char (point-max))))
|
||||
session))
|
||||
|
||||
(defun org-babel-load-session:gnuplot (session body params)
|
||||
@ -228,7 +227,7 @@ This function is called by `org-babel-execute-src-block'."
|
||||
(org-babel-gnuplot-process-vars params)))
|
||||
|
||||
(defvar gnuplot-buffer)
|
||||
(defun org-babel-gnuplot-initiate-session (&optional session params)
|
||||
(defun org-babel-gnuplot-initiate-session (&optional session _params)
|
||||
"Initiate a gnuplot session.
|
||||
If there is not a current inferior-process-buffer in SESSION
|
||||
then create one. Return the initialized session. The current
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-groovy.el --- org-babel functions for Groovy evaluation
|
||||
;;; ob-groovy.el --- Babel Functions for Groovy -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2013-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -51,7 +51,6 @@ called by `org-babel-execute-src-block'"
|
||||
(message "executing Groovy source code block")
|
||||
(let* ((processed-params (org-babel-process-params params))
|
||||
(session (org-babel-groovy-initiate-session (nth 0 processed-params)))
|
||||
(vars (nth 1 processed-params))
|
||||
(result-params (nth 2 processed-params))
|
||||
(result-type (cdr (assoc :result-type params)))
|
||||
(full-body (org-babel-expand-body:generic
|
||||
@ -101,11 +100,11 @@ in BODY as elisp."
|
||||
(org-babel-script-escape raw)))))))
|
||||
|
||||
|
||||
(defun org-babel-prep-session:groovy (session params)
|
||||
(defun org-babel-prep-session:groovy (_session _params)
|
||||
"Prepare SESSION according to the header arguments specified in PARAMS."
|
||||
(error "Sessions are not (yet) supported for Groovy"))
|
||||
|
||||
(defun org-babel-groovy-initiate-session (&optional session)
|
||||
(defun org-babel-groovy-initiate-session (&optional _session)
|
||||
"If there is not a current inferior-process-buffer in SESSION
|
||||
then create. Return the initialized session. Sessions are not
|
||||
supported in Groovy."
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-haskell.el --- org-babel functions for haskell evaluation
|
||||
;;; ob-haskell.el --- Babel Functions for Haskell -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -62,7 +62,6 @@
|
||||
(defun org-babel-execute:haskell (body params)
|
||||
"Execute a block of Haskell code."
|
||||
(let* ((session (cdr (assoc :session params)))
|
||||
(vars (mapcar #'cdr (org-babel-get-header params :var)))
|
||||
(result-type (cdr (assoc :result-type params)))
|
||||
(full-body (org-babel-expand-body:generic
|
||||
body params
|
||||
@ -96,7 +95,7 @@
|
||||
(match-string 1 string)
|
||||
string))
|
||||
|
||||
(defun org-babel-haskell-initiate-session (&optional session params)
|
||||
(defun org-babel-haskell-initiate-session (&optional _session _params)
|
||||
"Initiate a haskell session.
|
||||
If there is not a current inferior-process-buffer in SESSION
|
||||
then create one. Return the initialized session."
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-io.el --- org-babel functions for Io evaluation
|
||||
;;; ob-io.el --- Babel Functions for Io -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2012-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -47,7 +47,6 @@ called by `org-babel-execute-src-block'"
|
||||
(message "executing Io source code block")
|
||||
(let* ((processed-params (org-babel-process-params params))
|
||||
(session (org-babel-io-initiate-session (nth 0 processed-params)))
|
||||
(vars (nth 1 processed-params))
|
||||
(result-params (nth 2 processed-params))
|
||||
(result-type (cdr (assoc :result-type params)))
|
||||
(full-body (org-babel-expand-body:generic
|
||||
@ -93,11 +92,11 @@ in BODY as elisp."
|
||||
(org-babel-script-escape raw)))))))
|
||||
|
||||
|
||||
(defun org-babel-prep-session:io (session params)
|
||||
(defun org-babel-prep-session:io (_session _params)
|
||||
"Prepare SESSION according to the header arguments specified in PARAMS."
|
||||
(error "Sessions are not (yet) supported for Io"))
|
||||
|
||||
(defun org-babel-io-initiate-session (&optional session)
|
||||
(defun org-babel-io-initiate-session (&optional _session)
|
||||
"If there is not a current inferior-process-buffer in SESSION
|
||||
then create. Return the initialized session. Sessions are not
|
||||
supported in Io."
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-java.el --- org-babel functions for java evaluation
|
||||
;;; ob-java.el --- Babel Functions for Java -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2011-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -58,12 +58,10 @@ parameters may be used, like javac -verbose"
|
||||
(src-file (concat classname ".java"))
|
||||
(cmpflag (or (cdr (assoc :cmpflag params)) ""))
|
||||
(cmdline (or (cdr (assoc :cmdline params)) ""))
|
||||
(full-body (org-babel-expand-body:generic body params))
|
||||
(compile
|
||||
(progn (with-temp-file src-file (insert full-body))
|
||||
(org-babel-eval
|
||||
(concat org-babel-java-compiler
|
||||
" " cmpflag " " src-file) ""))))
|
||||
(full-body (org-babel-expand-body:generic body params)))
|
||||
(with-temp-file src-file (insert full-body))
|
||||
(org-babel-eval
|
||||
(concat org-babel-java-compiler " " cmpflag " " src-file) "")
|
||||
;; created package-name directories if missing
|
||||
(unless (or (not packagename) (file-exists-p packagename))
|
||||
(make-directory packagename 'parents))
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-js.el --- org-babel functions for Javascript
|
||||
;;; ob-js.el --- Babel Functions for Javascript -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2010-2015 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-keys.el --- key bindings for org-babel
|
||||
;;; ob-keys.el --- Key Bindings for Babel -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-latex.el --- org-babel functions for latex "evaluation"
|
||||
;;; ob-latex.el --- Babel Functions for LaTeX -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -94,7 +94,6 @@ This function is called by `org-babel-execute-src-block'."
|
||||
(imagemagick (cdr (assoc :imagemagick params)))
|
||||
(im-in-options (cdr (assoc :iminoptions params)))
|
||||
(im-out-options (cdr (assoc :imoutoptions params)))
|
||||
(pdfpng (cdr (assoc :pdfpng params)))
|
||||
(fit (or (cdr (assoc :fit params)) border))
|
||||
(height (and fit (cdr (assoc :pdfheight params))))
|
||||
(width (and fit (cdr (assoc :pdfwidth params))))
|
||||
@ -213,7 +212,7 @@ This function is called by `org-babel-execute-src-block'."
|
||||
(require 'ox-latex)
|
||||
(org-latex-compile file))
|
||||
|
||||
(defun org-babel-prep-session:latex (session params)
|
||||
(defun org-babel-prep-session:latex (_session _params)
|
||||
"Return an error because LaTeX doesn't support sessions."
|
||||
(error "LaTeX does not support sessions"))
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-ledger.el --- org-babel functions for ledger evaluation
|
||||
;;; ob-ledger.el --- Babel Functions for Ledger -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2010-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -46,8 +46,7 @@
|
||||
"Execute a block of Ledger entries with org-babel. This function is
|
||||
called by `org-babel-execute-src-block'."
|
||||
(message "executing Ledger source code block")
|
||||
(let ((result-params (split-string (or (cdr (assoc :results params)) "")))
|
||||
(cmdline (cdr (assoc :cmdline params)))
|
||||
(let ((cmdline (cdr (assoc :cmdline params)))
|
||||
(in-file (org-babel-temp-file "ledger-"))
|
||||
(out-file (org-babel-temp-file "ledger-output-")))
|
||||
(with-temp-file in-file (insert body))
|
||||
@ -61,7 +60,7 @@ called by `org-babel-execute-src-block'."
|
||||
" > " (org-babel-process-file-name out-file))))
|
||||
(with-temp-buffer (insert-file-contents out-file) (buffer-string))))
|
||||
|
||||
(defun org-babel-prep-session:ledger (session params)
|
||||
(defun org-babel-prep-session:ledger (_session _params)
|
||||
(error "Ledger does not support sessions"))
|
||||
|
||||
(provide 'ob-ledger)
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-lilypond.el --- org-babel functions for lilypond evaluation
|
||||
;;; ob-lilypond.el --- Babel Functions for Lilypond -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2010-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -92,7 +92,7 @@ you can leave the string empty on this case."
|
||||
:version "24.3"
|
||||
:package-version '(Org . "8.2.7")
|
||||
:set
|
||||
(lambda (symbol value)
|
||||
(lambda (_symbol value)
|
||||
(setq
|
||||
org-babel-lilypond-ly-command (nth 0 value)
|
||||
org-babel-lilypond-pdf-command (nth 1 value)
|
||||
@ -157,8 +157,7 @@ specific arguments to =org-babel-tangle="
|
||||
|
||||
(defun org-babel-lilypond-process-basic (body params)
|
||||
"Execute a lilypond block in basic mode."
|
||||
(let* ((result-params (cdr (assoc :result-params params)))
|
||||
(out-file (cdr (assoc :file params)))
|
||||
(let* ((out-file (cdr (assoc :file params)))
|
||||
(cmdline (or (cdr (assoc :cmdline params))
|
||||
""))
|
||||
(in-file (org-babel-temp-file "lilypond-")))
|
||||
@ -182,7 +181,7 @@ specific arguments to =org-babel-tangle="
|
||||
cmdline
|
||||
in-file) "")) nil)
|
||||
|
||||
(defun org-babel-prep-session:lilypond (session params)
|
||||
(defun org-babel-prep-session:lilypond (_session _params)
|
||||
"Return an error because LilyPond exporter does not support sessions."
|
||||
(error "Sorry, LilyPond does not currently support sessions!"))
|
||||
|
||||
@ -272,25 +271,19 @@ LINE is the erroneous line"
|
||||
|
||||
(defun org-babel-lilypond-parse-line-num (&optional buffer)
|
||||
"Extract error line number."
|
||||
(when buffer
|
||||
(set-buffer buffer))
|
||||
(when buffer (set-buffer buffer))
|
||||
(let ((start
|
||||
(and (search-backward ":" nil t)
|
||||
(search-backward ":" nil t)
|
||||
(search-backward ":" nil t)
|
||||
(search-backward ":" nil t)))
|
||||
(num nil))
|
||||
(if start
|
||||
(progn
|
||||
(forward-char)
|
||||
(let ((num (buffer-substring
|
||||
(+ 1 start)
|
||||
(- (search-forward ":" nil t) 1))))
|
||||
(setq num (string-to-number num))
|
||||
(if (numberp num)
|
||||
num
|
||||
nil)))
|
||||
nil)))
|
||||
(search-backward ":" nil t))))
|
||||
(when start
|
||||
(forward-char)
|
||||
(let ((num (string-to-number
|
||||
(buffer-substring
|
||||
(+ 1 start)
|
||||
(- (search-forward ":" nil t) 1)))))
|
||||
(and (numberp num) num)))))
|
||||
|
||||
(defun org-babel-lilypond-parse-error-line (file-name lineNo)
|
||||
"Extract the erroneous line from the tangled .ly file
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-lisp.el --- org-babel functions for common lisp evaluation
|
||||
;;; ob-lisp.el --- Babel Functions for Common Lisp -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-makefile.el --- org-babel functions for makefile evaluation
|
||||
;;; ob-makefile.el --- Babel Functions for Makefile -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -24,19 +24,19 @@
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This file exists solely for tangling a Makefile from org-mode files.
|
||||
;; This file exists solely for tangling a Makefile from Org files.
|
||||
|
||||
;;; Code:
|
||||
(require 'ob)
|
||||
|
||||
(defvar org-babel-default-header-args:makefile '())
|
||||
|
||||
(defun org-babel-execute:makefile (body params)
|
||||
(defun org-babel-execute:makefile (body _params)
|
||||
"Execute a block of makefile code.
|
||||
This function is called by `org-babel-execute-src-block'."
|
||||
body)
|
||||
|
||||
(defun org-babel-prep-session:makefile (session params)
|
||||
(defun org-babel-prep-session:makefile (_session _params)
|
||||
"Return an error if the :session header argument is set. Make
|
||||
does not support sessions."
|
||||
(error "Makefile sessions are nonsensical"))
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-matlab.el --- org-babel support for matlab evaluation
|
||||
;;; ob-matlab.el --- Babel support for Matlab -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2010-2015 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-maxima.el --- org-babel functions for maxima evaluation
|
||||
;;; ob-maxima.el --- Babel Functions for Maxima -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -98,7 +98,7 @@ This function is called by `org-babel-execute-src-block'."
|
||||
(org-babel-import-elisp-from-file tmp-file))))))
|
||||
|
||||
|
||||
(defun org-babel-prep-session:maxima (session params)
|
||||
(defun org-babel-prep-session:maxima (_session _params)
|
||||
(error "Maxima does not support sessions"))
|
||||
|
||||
(defun org-babel-maxima-var-to-maxima (pair)
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-msc.el --- org-babel functions for mscgen evaluation
|
||||
;;; ob-msc.el --- Babel Functions for Mscgen -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2010-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -73,7 +73,7 @@ ERROR: no output file specified. Add \":file name.png\" to the src header"))
|
||||
(org-babel-eval (concat "mscgen -T " filetype " -o " out-file) body)
|
||||
nil)) ;; signal that output has already been written to file
|
||||
|
||||
(defun org-babel-prep-session:mscgen (session params)
|
||||
(defun org-babel-prep-session:mscgen (_session _params)
|
||||
"Raise an error because Mscgen doesn't support sessions."
|
||||
(error "Mscgen does not support sessions"))
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-ocaml.el --- org-babel functions for ocaml evaluation
|
||||
;;; ob-ocaml.el --- Babel Functions for Ocaml -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -60,8 +60,7 @@
|
||||
|
||||
(defun org-babel-execute:ocaml (body params)
|
||||
"Execute a block of Ocaml code with Babel."
|
||||
(let* ((vars (mapcar #'cdr (org-babel-get-header params :var)))
|
||||
(full-body (org-babel-expand-body:generic
|
||||
(let* ((full-body (org-babel-expand-body:generic
|
||||
body params
|
||||
(org-babel-variable-assignments:ocaml params)))
|
||||
(session (org-babel-prep-session:ocaml
|
||||
@ -82,30 +81,29 @@
|
||||
(progn (setq out t) nil))))
|
||||
(mapcar #'org-babel-trim (reverse raw)))))))
|
||||
(raw (org-babel-trim clean))
|
||||
(result-params (cdr (assoc :result-params params)))
|
||||
(parsed
|
||||
(string-match
|
||||
"\\(\\(.*\n\\)*\\)[^:\n]+ : \\([^=\n]+\\) =\\(\n\\| \\)\\(.+\\)$"
|
||||
(result-params (cdr (assoc :result-params params))))
|
||||
(string-match
|
||||
"\\(\\(.*\n\\)*\\)[^:\n]+ : \\([^=\n]+\\) =\\(\n\\| \\)\\(.+\\)$"
|
||||
raw)
|
||||
(let ((output (match-string 1 raw))
|
||||
(type (match-string 3 raw))
|
||||
(value (match-string 5 raw)))
|
||||
(org-babel-reassemble-table
|
||||
(org-babel-result-cond result-params
|
||||
(cond
|
||||
((member "verbatim" result-params) raw)
|
||||
((member "output" result-params) output)
|
||||
(t raw))
|
||||
(if (and value type)
|
||||
(org-babel-ocaml-parse-output value type)
|
||||
raw))
|
||||
(output (match-string 1 raw))
|
||||
(type (match-string 3 raw))
|
||||
(value (match-string 5 raw)))
|
||||
(org-babel-reassemble-table
|
||||
(org-babel-result-cond result-params
|
||||
(cond
|
||||
((member "verbatim" result-params) raw)
|
||||
((member "output" result-params) output)
|
||||
(t raw))
|
||||
(if (and value type)
|
||||
(org-babel-ocaml-parse-output value type)
|
||||
raw))
|
||||
(org-babel-pick-name
|
||||
(cdr (assoc :colname-names params)) (cdr (assoc :colnames params)))
|
||||
(org-babel-pick-name
|
||||
(cdr (assoc :rowname-names params)) (cdr (assoc :rownames params))))))
|
||||
(org-babel-pick-name
|
||||
(cdr (assoc :colname-names params)) (cdr (assoc :colnames params)))
|
||||
(org-babel-pick-name
|
||||
(cdr (assoc :rowname-names params)) (cdr (assoc :rownames params)))))))
|
||||
|
||||
(defvar tuareg-interactive-buffer-name)
|
||||
(defun org-babel-prep-session:ocaml (session params)
|
||||
(defun org-babel-prep-session:ocaml (session _params)
|
||||
"Prepare SESSION according to the header arguments in PARAMS."
|
||||
(require 'tuareg)
|
||||
(let ((tuareg-interactive-buffer-name (if (and (not (string= session "none"))
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-octave.el --- org-babel functions for octave and matlab evaluation
|
||||
;;; ob-octave.el --- Babel Functions for Octave and Matlab -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2010-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -75,10 +75,7 @@ end")
|
||||
(funcall (intern (format "org-babel-%s-initiate-session"
|
||||
(if matlabp "matlab" "octave")))
|
||||
(cdr (assoc :session params)) params))
|
||||
(vars (mapcar #'cdr (org-babel-get-header params :var)))
|
||||
(result-params (cdr (assoc :result-params params)))
|
||||
(result-type (cdr (assoc :result-type params)))
|
||||
(out-file (cdr (assoc :file params)))
|
||||
(full-body
|
||||
(org-babel-expand-body:generic
|
||||
body params (org-babel-variable-assignments:octave params)))
|
||||
@ -148,7 +145,7 @@ If there is not a current inferior-process-buffer in SESSION then
|
||||
create. Return the initialized session."
|
||||
(org-babel-octave-initiate-session session params 'matlab))
|
||||
|
||||
(defun org-babel-octave-initiate-session (&optional session params matlabp)
|
||||
(defun org-babel-octave-initiate-session (&optional session _params matlabp)
|
||||
"Create an octave inferior process buffer.
|
||||
If there is not a current inferior-process-buffer in SESSION then
|
||||
create. Return the initialized session."
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-org.el --- org-babel functions for org code block evaluation
|
||||
;;; ob-org.el --- Babel Functions for Org Code Blocks -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2010-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -61,7 +61,7 @@ This function is called by `org-babel-execute-src-block'."
|
||||
((member "ascii" result-params) (org-export-string-as body 'ascii t))
|
||||
(t body))))
|
||||
|
||||
(defun org-babel-prep-session:org (session params)
|
||||
(defun org-babel-prep-session:org (_session _params)
|
||||
"Return an error because org does not support sessions."
|
||||
(error "Org does not support sessions"))
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-perl.el --- org-babel functions for perl evaluation
|
||||
;;; ob-perl.el --- Babel Functions for Perl -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -54,7 +54,7 @@ This function is called by `org-babel-execute-src-block'."
|
||||
(org-babel-pick-name
|
||||
(cdr (assoc :rowname-names params)) (cdr (assoc :rownames params))))))
|
||||
|
||||
(defun org-babel-prep-session:perl (session params)
|
||||
(defun org-babel-prep-session:perl (_session _params)
|
||||
"Prepare SESSION according to the header arguments in PARAMS."
|
||||
(error "Sessions are not supported for Perl"))
|
||||
|
||||
@ -76,7 +76,7 @@ This function is called by `org-babel-execute-src-block'."
|
||||
The elisp value, VAR, is converted to a string of perl source code
|
||||
specifying a var of the same value."
|
||||
(if varn
|
||||
(let ((org-babel-perl--lvl 0) (lvar (listp var)) prefix)
|
||||
(let ((org-babel-perl--lvl 0) (lvar (listp var)))
|
||||
(concat "my $" (symbol-name varn) "=" (when lvar "\n")
|
||||
(org-babel-perl--var-to-perl var)
|
||||
";\n"))
|
||||
@ -92,7 +92,7 @@ specifying a var of the same value."
|
||||
|
||||
(defvar org-babel-perl-buffers '(:default . nil))
|
||||
|
||||
(defun org-babel-perl-initiate-session (&optional session params)
|
||||
(defun org-babel-perl-initiate-session (&optional _session _params)
|
||||
"Return nil because sessions are not supported by perl."
|
||||
nil)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-picolisp.el --- org-babel functions for picolisp evaluation
|
||||
;;; ob-picolisp.el --- Babel Functions for Picolisp -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2010-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -81,8 +81,8 @@
|
||||
(defun org-babel-expand-body:picolisp (body params)
|
||||
"Expand BODY according to PARAMS, return the expanded body."
|
||||
(let ((vars (mapcar #'cdr (org-babel-get-header params :var)))
|
||||
(result-params (cdr (assoc :result-params params)))
|
||||
(print-level nil) (print-length nil))
|
||||
(print-level nil)
|
||||
(print-length nil))
|
||||
(if (> (length vars) 0)
|
||||
(concat "(prog (let ("
|
||||
(mapconcat
|
||||
@ -104,7 +104,6 @@
|
||||
;; Set the session if the session variable is non-nil.
|
||||
(session (org-babel-picolisp-initiate-session session-name))
|
||||
;; Either OUTPUT or VALUE which should behave as described above.
|
||||
(result-type (cdr (assoc :result-type params)))
|
||||
(result-params (cdr (assoc :result-params params)))
|
||||
;; Expand the body with `org-babel-expand-body:picolisp'.
|
||||
(full-body (org-babel-expand-body:picolisp body params))
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-plantuml.el --- org-babel functions for plantuml evaluation
|
||||
;;; ob-plantuml.el --- Babel Functions for Plantuml -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2010-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -49,8 +49,7 @@
|
||||
(defun org-babel-execute:plantuml (body params)
|
||||
"Execute a block of plantuml code with org-babel.
|
||||
This function is called by `org-babel-execute-src-block'."
|
||||
(let* ((result-params (split-string (or (cdr (assoc :results params)) "")))
|
||||
(out-file (or (cdr (assoc :file params))
|
||||
(let* ((out-file (or (cdr (assoc :file params))
|
||||
(error "PlantUML requires a \":file\" header argument")))
|
||||
(cmdline (cdr (assoc :cmdline params)))
|
||||
(in-file (org-babel-temp-file "plantuml-"))
|
||||
@ -74,7 +73,7 @@ This function is called by `org-babel-execute-src-block'."
|
||||
(message "%s" cmd) (org-babel-eval cmd "")
|
||||
nil)) ;; signal that output has already been written to file
|
||||
|
||||
(defun org-babel-prep-session:plantuml (session params)
|
||||
(defun org-babel-prep-session:plantuml (_session _params)
|
||||
"Return an error because plantuml does not support sessions."
|
||||
(error "Plantuml does not support sessions"))
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-processing.el --- Babel functions for evaluation of processing
|
||||
;;; ob-processing.el --- Babel functions for processing -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -134,7 +134,7 @@ This function is called by `org-babel-execute-src-block'."
|
||||
sketch-canvas-id
|
||||
"\"></canvas>"))))
|
||||
|
||||
(defun org-babel-prep-session:processing (session params)
|
||||
(defun org-babel-prep-session:processing (_session _params)
|
||||
"Return an error if the :session header argument is set.
|
||||
Processing does not support sessions"
|
||||
(error "Processing does not support sessions"))
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-python.el --- org-babel functions for python evaluation
|
||||
;;; ob-python.el --- Babel Functions for Python -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -216,7 +216,7 @@ then create. Return the initialized session."
|
||||
(assq-delete-all session org-babel-python-buffers)))
|
||||
session)))
|
||||
|
||||
(defun org-babel-python-initiate-session (&optional session params)
|
||||
(defun org-babel-python-initiate-session (&optional session _params)
|
||||
"Create a session named SESSION according to PARAMS."
|
||||
(unless (string= session "none")
|
||||
(org-babel-python-session-buffer
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-ref.el --- org-babel functions for referencing external data
|
||||
;;; ob-ref.el --- Babel Functions for Referencing External Data -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -130,7 +130,7 @@ the variable."
|
||||
(save-excursion
|
||||
(let ((case-fold-search t)
|
||||
type args new-refere new-header-args new-referent result
|
||||
lob-info split-file split-ref index index-row index-col id)
|
||||
lob-info split-file split-ref index id)
|
||||
;; if ref is indexed grab the indices -- beware nested indices
|
||||
(when (and (string-match "\\[\\([^\\[]+\\)\\]$" ref)
|
||||
(let ((str (substring ref 0 (match-beginning 0))))
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-ruby.el --- org-babel functions for ruby evaluation
|
||||
;;; ob-ruby.el --- Babel Functions for Ruby -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -144,7 +144,7 @@ Emacs-lisp table, otherwise return the results as a string."
|
||||
res)
|
||||
res)))
|
||||
|
||||
(defun org-babel-ruby-initiate-session (&optional session params)
|
||||
(defun org-babel-ruby-initiate-session (&optional session _params)
|
||||
"Initiate a ruby session.
|
||||
If there is not a current inferior-process-buffer in SESSION
|
||||
then create one. Return the initialized session."
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-sass.el --- org-babel functions for the sass css generation language
|
||||
;;; ob-sass.el --- Babel Functions for the Sass CSS generation language -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -45,8 +45,7 @@
|
||||
(defun org-babel-execute:sass (body params)
|
||||
"Execute a block of Sass code with Babel.
|
||||
This function is called by `org-babel-execute-src-block'."
|
||||
(let* ((result-params (split-string (or (cdr (assoc :results params)) "")))
|
||||
(file (cdr (assoc :file params)))
|
||||
(let* ((file (cdr (assoc :file params)))
|
||||
(out-file (or file (org-babel-temp-file "sass-out-")))
|
||||
(cmdline (cdr (assoc :cmdline params)))
|
||||
(in-file (org-babel-temp-file "sass-in-"))
|
||||
@ -60,7 +59,7 @@ This function is called by `org-babel-execute-src-block'."
|
||||
nil ;; signal that output has already been written to file
|
||||
(with-temp-buffer (insert-file-contents out-file) (buffer-string)))))
|
||||
|
||||
(defun org-babel-prep-session:sass (session params)
|
||||
(defun org-babel-prep-session:sass (_session _params)
|
||||
"Raise an error because sass does not support sessions."
|
||||
(error "Sass does not support sessions"))
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-scala.el --- org-babel functions for Scala evaluation
|
||||
;;; ob-scala.el --- Babel Functions for Scala -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2012-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -45,7 +45,6 @@ called by `org-babel-execute-src-block'"
|
||||
(message "executing Scala source code block")
|
||||
(let* ((processed-params (org-babel-process-params params))
|
||||
(session (org-babel-scala-initiate-session (nth 0 processed-params)))
|
||||
(vars (nth 1 processed-params))
|
||||
(result-params (nth 2 processed-params))
|
||||
(result-type (cdr (assoc :result-type params)))
|
||||
(full-body (org-babel-expand-body:generic
|
||||
@ -99,11 +98,11 @@ in BODY as elisp."
|
||||
(org-babel-script-escape raw)))))))
|
||||
|
||||
|
||||
(defun org-babel-prep-session:scala (session params)
|
||||
(defun org-babel-prep-session:scala (_session _params)
|
||||
"Prepare SESSION according to the header arguments specified in PARAMS."
|
||||
(error "Sessions are not (yet) supported for Scala"))
|
||||
|
||||
(defun org-babel-scala-initiate-session (&optional session)
|
||||
(defun org-babel-scala-initiate-session (&optional _session)
|
||||
"If there is not a current inferior-process-buffer in SESSION
|
||||
then create. Return the initialized session. Sessions are not
|
||||
supported in Scala."
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-scheme.el --- org-babel functions for Scheme
|
||||
;;; ob-scheme.el --- Babel Functions for Scheme -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2010-2015 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob-screen.el --- org-babel support for interactive terminal
|
||||
;;; ob-screen.el --- Babel Support for Interactive Terminal -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -54,10 +54,9 @@ In case you want to use a different screen than one selected by your $PATH")
|
||||
(org-babel-screen-session-execute-string
|
||||
session (org-babel-expand-body:generic body params)))))
|
||||
|
||||
(defun org-babel-prep-session:screen (session params)
|
||||
(defun org-babel-prep-session:screen (_session params)
|
||||
"Prepare SESSION according to the header arguments specified in PARAMS."
|
||||
(let* ((session (cdr (assoc :session params)))
|
||||
(socket (org-babel-screen-session-socketname session))
|
||||
(cmd (cdr (assoc :cmd params)))
|
||||
(terminal (cdr (assoc :terminal params)))
|
||||
(process-name (concat "org-babel: terminal (" session ")")))
|
||||
@ -104,7 +103,7 @@ In case you want to use a different screen than one selected by your $PATH")
|
||||
sockets)))))
|
||||
(when match-socket (car (split-string match-socket)))))
|
||||
|
||||
(defun org-babel-screen-session-write-temp-file (session body)
|
||||
(defun org-babel-screen-session-write-temp-file (_session body)
|
||||
"Save BODY in a temp file that is named after SESSION."
|
||||
(let ((tmpfile (org-babel-temp-file "screen-")))
|
||||
(with-temp-file tmpfile
|
||||
@ -119,11 +118,10 @@ In case you want to use a different screen than one selected by your $PATH")
|
||||
"Test if the default setup works.
|
||||
The terminal should shortly flicker."
|
||||
(interactive)
|
||||
(let* ((session "org-babel-testing")
|
||||
(random-string (format "%s" (random 99999)))
|
||||
(let* ((random-string (format "%s" (random 99999)))
|
||||
(tmpfile (org-babel-temp-file "ob-screen-test-"))
|
||||
(body (concat "echo '" random-string "' > " tmpfile "\nexit\n"))
|
||||
process tmp-string)
|
||||
tmp-string)
|
||||
(org-babel-execute:screen body org-babel-default-header-args:screen)
|
||||
;; XXX: need to find a better way to do the following
|
||||
(while (not (file-readable-p tmpfile))
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ob.el --- working with code blocks in org-mode
|
||||
;;; ob.el --- Working with Code Blocks in Org -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; org-colview.el --- Column View in Org-mode
|
||||
;;; org-colview.el --- Column View in Org -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2004-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -43,6 +43,8 @@
|
||||
(defvar org-columns-overlays nil
|
||||
"Holds the list of current column overlays.")
|
||||
|
||||
(defvar org-columns-time)
|
||||
|
||||
(defvar org-columns-current-fmt nil
|
||||
"Local variable, holds the currently active column format.")
|
||||
(make-variable-buffer-local 'org-columns-current-fmt)
|
||||
@ -394,12 +396,12 @@ If yes, throw an error indicating that changing it does not make sense."
|
||||
(get-char-property 0 'org-computed val))
|
||||
(error "This value is computed from the entry's children"))))
|
||||
|
||||
(defun org-columns-todo (&optional arg)
|
||||
(defun org-columns-todo (&optional _arg)
|
||||
"Change the TODO state during column view."
|
||||
(interactive "P")
|
||||
(org-columns-edit-value "TODO"))
|
||||
|
||||
(defun org-columns-set-tags-or-toggle (&optional arg)
|
||||
(defun org-columns-set-tags-or-toggle (&optional _arg)
|
||||
"Toggle checkbox at point, or set tags for current headline."
|
||||
(interactive "P")
|
||||
(if (string-match "\\`\\[[ xX-]\\]\\'"
|
||||
@ -738,8 +740,6 @@ When COLUMNS-FMT-STRING is non-nil, use it as the column format."
|
||||
(goto-char (car x))
|
||||
(org-columns-display-here (cdr x))))))))
|
||||
|
||||
(eval-when-compile (defvar org-columns-time))
|
||||
|
||||
(defvar org-columns-compile-map
|
||||
'(("none" none +)
|
||||
(":" add_times +)
|
||||
@ -777,7 +777,7 @@ function called with a list of values as argument to calculate
|
||||
calc function called on every element before summarizing. This is
|
||||
optional and should only be specified if needed")
|
||||
|
||||
(defun org-columns-new (&optional prop title width op fmt fun &rest rest)
|
||||
(defun org-columns-new (&optional prop title width _op fmt fun &rest _rest)
|
||||
"Insert a new column, to the left of the current column."
|
||||
(interactive)
|
||||
(let ((editp (and prop
|
||||
@ -1125,16 +1125,14 @@ display, or in the #+COLUMNS line of the current buffer."
|
||||
|
||||
(defun org-columns-uncompile-format (cfmt)
|
||||
"Turn the compiled columns format back into a string representation."
|
||||
(let ((rtn "") e s prop title op op-match width fmt printf fun calc ee map)
|
||||
(let ((rtn "") e s prop title op width fmt printf ee map)
|
||||
(while (setq e (pop cfmt))
|
||||
(setq prop (car e)
|
||||
title (nth 1 e)
|
||||
width (nth 2 e)
|
||||
op (nth 3 e)
|
||||
fmt (nth 4 e)
|
||||
printf (nth 5 e)
|
||||
fun (nth 6 e)
|
||||
calc (nth 7 e))
|
||||
printf (nth 5 e))
|
||||
(setq map (copy-sequence org-columns-compile-map))
|
||||
(while (setq ee (pop map))
|
||||
(if (equal fmt (nth 1 ee))
|
||||
@ -1459,7 +1457,7 @@ This will add overlays to the date lines, to show the summary for each day."
|
||||
nil '+ nil)
|
||||
x))
|
||||
org-columns-current-fmt-compiled))
|
||||
line c c1 stype calc sumfunc props lsum entries prop v title)
|
||||
line c c1 stype calc sumfunc props lsum entries prop v)
|
||||
(catch 'exit
|
||||
(when (delq nil (mapcar 'cadr fmt))
|
||||
;; OK, at least one summation column, it makes sense to try this
|
||||
@ -1483,7 +1481,6 @@ This will add overlays to the date lines, to show the summary for each day."
|
||||
(mapcar
|
||||
(lambda (f)
|
||||
(setq prop (car f)
|
||||
title (nth 1 f)
|
||||
stype (nth 4 f)
|
||||
sumfunc (nth 6 f)
|
||||
calc (or (nth 7 f) 'identity))
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; org-footnote.el --- Footnote support in Org and elsewhere
|
||||
;;; org-footnote.el --- Footnote support in Org -*- lexical-binding: t; -*-
|
||||
;;
|
||||
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
;;
|
||||
@ -566,6 +566,7 @@ or new, let the user edit the definition of the footnote."
|
||||
(org-footnote-auto-adjust-maybe)
|
||||
(org-edit-footnote-reference)))))))
|
||||
|
||||
(defvar electric-indent-mode)
|
||||
(defvar org-blank-before-new-entry) ; Silence byte-compiler.
|
||||
(defun org-footnote-create-definition (label)
|
||||
"Start the definition of a footnote with label LABEL.
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; org-indent.el --- Dynamic indentation for Org-mode
|
||||
;;; org-indent.el --- Dynamic indentation for Org -*- lexical-binding: t; -*-
|
||||
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
;;
|
||||
;; Author: Carsten Dominik <carsten at orgmode dot org>
|
||||
@ -348,7 +348,7 @@ headline."
|
||||
(or (and (org-at-heading-p) (< beg (match-end 0)))
|
||||
(re-search-forward org-outline-regexp-bol end t)))))))
|
||||
|
||||
(defun org-indent-refresh-maybe (beg end dummy)
|
||||
(defun org-indent-refresh-maybe (beg end _)
|
||||
"Refresh indentation properties in an adequate portion of buffer.
|
||||
BEG and END are the positions of the beginning and end of the
|
||||
range of inserted text. DUMMY is an unused argument.
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; org-list.el --- Plain lists for Org-mode
|
||||
;;; org-list.el --- Plain lists for Org-mode -*- lexical-binding: t; -*-
|
||||
;;
|
||||
;; Copyright (C) 2004-2015 Free Software Foundation, Inc.
|
||||
;;
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; org-macro.el --- Macro Replacement Code for Org Mode
|
||||
;;; org-macro.el --- Macro Replacement Code for Org -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2013-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -78,42 +78,42 @@ directly, use instead:
|
||||
(defun org-macro--collect-macros ()
|
||||
"Collect macro definitions in current buffer and setup files.
|
||||
Return an alist containing all macro templates found."
|
||||
(let* (collect-macros ; For byte-compiler.
|
||||
(collect-macros
|
||||
(lambda (files templates)
|
||||
;; Return an alist of macro templates. FILES is a list of
|
||||
;; setup files names read so far, used to avoid circular
|
||||
;; dependencies. TEMPLATES is the alist collected so far.
|
||||
(let ((case-fold-search t))
|
||||
(org-with-wide-buffer
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward
|
||||
"^[ \t]*#\\+\\(MACRO\\|SETUPFILE\\):" nil t)
|
||||
(let ((element (org-element-at-point)))
|
||||
(when (eq (org-element-type element) 'keyword)
|
||||
(let ((val (org-element-property :value element)))
|
||||
(if (equal (org-element-property :key element) "MACRO")
|
||||
;; Install macro in TEMPLATES.
|
||||
(when (string-match
|
||||
"^\\(.*?\\)\\(?:\\s-+\\(.*\\)\\)?\\s-*$" val)
|
||||
(let* ((name (match-string 1 val))
|
||||
(template (or (match-string 2 val) ""))
|
||||
(old-cell (assoc name templates)))
|
||||
(if old-cell (setcdr old-cell template)
|
||||
(push (cons name template) templates))))
|
||||
;; Enter setup file.
|
||||
(let ((file (expand-file-name
|
||||
(org-remove-double-quotes val))))
|
||||
(unless (member file files)
|
||||
(with-temp-buffer
|
||||
(setq default-directory
|
||||
(file-name-directory file))
|
||||
(org-mode)
|
||||
(insert (org-file-contents file 'noerror))
|
||||
(setq templates
|
||||
(funcall collect-macros (cons file files)
|
||||
templates)))))))))))
|
||||
templates))))
|
||||
(letrec ((collect-macros
|
||||
(lambda (files templates)
|
||||
;; Return an alist of macro templates. FILES is a list
|
||||
;; of setup files names read so far, used to avoid
|
||||
;; circular dependencies. TEMPLATES is the alist
|
||||
;; collected so far.
|
||||
(let ((case-fold-search t))
|
||||
(org-with-wide-buffer
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward
|
||||
"^[ \t]*#\\+\\(MACRO\\|SETUPFILE\\):" nil t)
|
||||
(let ((element (org-element-at-point)))
|
||||
(when (eq (org-element-type element) 'keyword)
|
||||
(let ((val (org-element-property :value element)))
|
||||
(if (equal (org-element-property :key element) "MACRO")
|
||||
;; Install macro in TEMPLATES.
|
||||
(when (string-match
|
||||
"^\\(.*?\\)\\(?:\\s-+\\(.*\\)\\)?\\s-*$" val)
|
||||
(let* ((name (match-string 1 val))
|
||||
(template (or (match-string 2 val) ""))
|
||||
(old-cell (assoc name templates)))
|
||||
(if old-cell (setcdr old-cell template)
|
||||
(push (cons name template) templates))))
|
||||
;; Enter setup file.
|
||||
(let ((file (expand-file-name
|
||||
(org-remove-double-quotes val))))
|
||||
(unless (member file files)
|
||||
(with-temp-buffer
|
||||
(setq default-directory
|
||||
(file-name-directory file))
|
||||
(org-mode)
|
||||
(insert (org-file-contents file 'noerror))
|
||||
(setq templates
|
||||
(funcall collect-macros (cons file files)
|
||||
templates)))))))))))
|
||||
templates))))
|
||||
(funcall collect-macros nil nil)))
|
||||
|
||||
(defun org-macro-initialize-templates ()
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; org-src.el --- Source code examples in Org
|
||||
;;; org-src.el --- Source code examples in Org -*- lexical-binding: t; -*-
|
||||
;;
|
||||
;; Copyright (C) 2004-2015 Free Software Foundation, Inc.
|
||||
;;
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; org-table.el --- The table editor for Org mode
|
||||
;;; org-table.el --- The Table Editor for Org -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2004-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -66,6 +66,7 @@
|
||||
(defvar orgtbl-mode-menu) ; defined when orgtbl mode get initialized
|
||||
(defvar constants-unit-system)
|
||||
(defvar org-table-follow-field-mode)
|
||||
(defvar sort-fold-case)
|
||||
|
||||
(defvar orgtbl-after-send-table-hook nil
|
||||
"Hook for functions attaching to `C-c C-c', if the table is sent.
|
||||
@ -544,7 +545,7 @@ SIZE is a string Columns x Rows like for example \"3x2\"."
|
||||
(beginning-of-line 1)
|
||||
(newline))
|
||||
;; (mapcar (lambda (x) (insert line)) (make-list rows t))
|
||||
(dotimes (i rows) (insert line))
|
||||
(dotimes (_ rows) (insert line))
|
||||
(goto-char pos)
|
||||
(if (> rows 1)
|
||||
;; Insert a hline after the first row.
|
||||
@ -1264,7 +1265,7 @@ is always the old value."
|
||||
(forward-char 1) ""))
|
||||
|
||||
;;;###autoload
|
||||
(defun org-table-field-info (arg)
|
||||
(defun org-table-field-info (_arg)
|
||||
"Show info about the current field, and highlight any reference at point."
|
||||
(interactive "P")
|
||||
(unless (org-at-table-p) (user-error "Not at a table"))
|
||||
@ -1891,10 +1892,10 @@ Note that horizontal lines disappear."
|
||||
(let* ((table (delete 'hline (org-table-to-lisp)))
|
||||
(dline_old (org-table-current-line))
|
||||
(col_old (org-table-current-column))
|
||||
(contents (mapcar (lambda (p)
|
||||
(contents (mapcar (lambda (_)
|
||||
(let ((tp table))
|
||||
(mapcar
|
||||
(lambda (rown)
|
||||
(lambda (_)
|
||||
(prog1
|
||||
(pop (car tp))
|
||||
(setq tp (cdr tp))))
|
||||
@ -2193,16 +2194,11 @@ When NAMED is non-nil, look for a named equation."
|
||||
org-table-named-field-locations)))
|
||||
(ref (format "@%d$%d" (org-table-current-dline)
|
||||
(org-table-current-column)))
|
||||
(refass (assoc ref stored-list))
|
||||
(nameass (assoc name stored-list))
|
||||
(scol (if named
|
||||
(if (and name (not (string-match "^LR[0-9]+$" name)))
|
||||
name
|
||||
ref)
|
||||
(int-to-string (org-table-current-column))))
|
||||
(dummy (and (or nameass refass) (not named)
|
||||
(not (y-or-n-p "Replace existing field formula with column formula? " ))
|
||||
(message "Formula not replaced")))
|
||||
(name (or name ref))
|
||||
(org-table-may-need-update nil)
|
||||
(stored (cdr (assoc scol stored-list)))
|
||||
@ -4107,7 +4103,7 @@ FACE, when non-nil, for the highlight."
|
||||
(goto-char (car start-coordinates)))
|
||||
(add-hook 'before-change-functions #'org-table-remove-rectangle-highlight))
|
||||
|
||||
(defun org-table-remove-rectangle-highlight (&rest ignore)
|
||||
(defun org-table-remove-rectangle-highlight (&rest _ignore)
|
||||
"Remove the rectangle overlays."
|
||||
(unless org-inhibit-highlight-removal
|
||||
(remove-hook 'before-change-functions 'org-table-remove-rectangle-highlight)
|
||||
@ -4481,7 +4477,7 @@ With prefix arg, also recompute table."
|
||||
(t (let (orgtbl-mode)
|
||||
(call-interactively (key-binding "\C-c\C-c")))))))
|
||||
|
||||
(defun orgtbl-create-or-convert-from-region (arg)
|
||||
(defun orgtbl-create-or-convert-from-region (_arg)
|
||||
"Create table or convert region to table, if no conflicting binding.
|
||||
This installs the table binding `C-c |', but only if there is no
|
||||
conflicting binding to this key outside orgtbl-mode."
|
||||
@ -5417,16 +5413,13 @@ This function is generated by a call to the macro `org-define-lookup-function'."
|
||||
(sl s-list)
|
||||
(rl (or r-list s-list))
|
||||
(ret nil))))
|
||||
(if first-p (add-to-list 'lvars '(match-p nil)))
|
||||
lvars)
|
||||
(if first-p (cons '(match-p nil) lvars) lvars))
|
||||
(while ,(if first-p '(and (not match-p) sl) 'sl)
|
||||
(progn
|
||||
(if (funcall p val (car sl))
|
||||
(progn
|
||||
,(if first-p '(setq match-p t))
|
||||
(let ((rval (car rl)))
|
||||
(setq ret ,(if all-p '(append ret (list rval)) 'rval)))))
|
||||
(setq sl (cdr sl) rl (cdr rl))))
|
||||
(when (funcall p val (car sl))
|
||||
,(when first-p '(setq match-p t))
|
||||
(let ((rval (car rl)))
|
||||
(setq ret ,(if all-p '(append ret (list rval)) 'rval))))
|
||||
(setq sl (cdr sl) rl (cdr rl)))
|
||||
ret)))))
|
||||
|
||||
(org-define-lookup-function first)
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; ox-ascii.el --- ASCII Back-End for Org Export Engine
|
||||
;;; ox-ascii.el --- ASCII Back-End for Org Export Engine -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2012-2015 Free Software Foundation, Inc.
|
||||
|
||||
@ -370,7 +370,7 @@ Otherwise, place it right after it."
|
||||
:type 'string)
|
||||
|
||||
(defcustom org-ascii-format-drawer-function
|
||||
(lambda (name contents width) contents)
|
||||
(lambda (_name contents _width) contents)
|
||||
"Function called to format a drawer in ASCII.
|
||||
|
||||
The function must accept three parameters:
|
||||
@ -712,7 +712,7 @@ possible. It doesn't apply to `inlinetask' elements."
|
||||
(char-width under-char))
|
||||
under-char))))))))
|
||||
|
||||
(defun org-ascii--has-caption-p (element info)
|
||||
(defun org-ascii--has-caption-p (element _info)
|
||||
"Non-nil when ELEMENT has a caption affiliated keyword.
|
||||
INFO is a plist used as a communication channel. This function
|
||||
is meant to be used as a predicate for `org-export-get-ordinal'."
|
||||
@ -1141,7 +1141,7 @@ INFO is a plist used as a communication channel."
|
||||
|
||||
;;;; Bold
|
||||
|
||||
(defun org-ascii-bold (bold contents info)
|
||||
(defun org-ascii-bold (_bold contents _info)
|
||||
"Transcode BOLD from Org to ASCII.
|
||||
CONTENTS is the text with bold markup. INFO is a plist holding
|
||||
contextual information."
|
||||
@ -1150,7 +1150,7 @@ contextual information."
|
||||
|
||||
;;;; Center Block
|
||||
|
||||
(defun org-ascii-center-block (center-block contents info)
|
||||
(defun org-ascii-center-block (_center-block contents _info)
|
||||
"Transcode a CENTER-BLOCK element from Org to ASCII.
|
||||
CONTENTS holds the contents of the block. INFO is a plist
|
||||
holding contextual information."
|
||||
@ -1161,7 +1161,7 @@ holding contextual information."
|
||||
|
||||
;;;; Clock
|
||||
|
||||
(defun org-ascii-clock (clock contents info)
|
||||
(defun org-ascii-clock (clock _contents info)
|
||||
"Transcode a CLOCK object from Org to ASCII.
|
||||
CONTENTS is nil. INFO is a plist holding contextual
|
||||
information."
|
||||
@ -1179,7 +1179,7 @@ information."
|
||||
|
||||
;;;; Code
|
||||
|
||||
(defun org-ascii-code (code contents info)
|
||||
(defun org-ascii-code (code _contents info)
|
||||
"Return a CODE object from Org to ASCII.
|
||||
CONTENTS is nil. INFO is a plist holding contextual
|
||||
information."
|
||||
@ -1201,7 +1201,7 @@ holding contextual information."
|
||||
|
||||
;;;; Dynamic Block
|
||||
|
||||
(defun org-ascii-dynamic-block (dynamic-block contents info)
|
||||
(defun org-ascii-dynamic-block (_dynamic-block contents _info)
|
||||
"Transcode a DYNAMIC-BLOCK element from Org to ASCII.
|
||||
CONTENTS holds the contents of the block. INFO is a plist
|
||||
holding contextual information."
|
||||
@ -1210,7 +1210,7 @@ holding contextual information."
|
||||
|
||||
;;;; Entity
|
||||
|
||||
(defun org-ascii-entity (entity contents info)
|
||||
(defun org-ascii-entity (entity _contents info)
|
||||
"Transcode an ENTITY object from Org to ASCII.
|
||||
CONTENTS are the definition itself. INFO is a plist holding
|
||||
contextual information."
|
||||
@ -1221,7 +1221,7 @@ contextual information."
|
||||
|
||||
;;;; Example Block
|
||||
|
||||
(defun org-ascii-example-block (example-block contents info)
|
||||
(defun org-ascii-example-block (example-block _contents info)
|
||||
"Transcode a EXAMPLE-BLOCK element from Org to ASCII.
|
||||
CONTENTS is nil. INFO is a plist holding contextual information."
|
||||
(org-ascii--justify-element
|
||||
@ -1232,7 +1232,7 @@ CONTENTS is nil. INFO is a plist holding contextual information."
|
||||
|
||||
;;;; Export Snippet
|
||||
|
||||
(defun org-ascii-export-snippet (export-snippet contents info)
|
||||
(defun org-ascii-export-snippet (export-snippet _contents _info)
|
||||
"Transcode a EXPORT-SNIPPET object from Org to ASCII.
|
||||
CONTENTS is nil. INFO is a plist holding contextual information."
|
||||
(when (eq (org-export-snippet-backend export-snippet) 'ascii)
|
||||
@ -1241,7 +1241,7 @@ CONTENTS is nil. INFO is a plist holding contextual information."
|
||||
|
||||
;;;; Export Block
|
||||
|
||||
(defun org-ascii-export-block (export-block contents info)
|
||||
(defun org-ascii-export-block (export-block _contents info)
|
||||
"Transcode a EXPORT-BLOCK element from Org to ASCII.
|
||||
CONTENTS is nil. INFO is a plist holding contextual information."
|
||||
(when (string= (org-element-property :type export-block) "ASCII")
|
||||
@ -1251,7 +1251,7 @@ CONTENTS is nil. INFO is a plist holding contextual information."
|
||||
|
||||
;;;; Fixed Width
|
||||
|
||||
(defun org-ascii-fixed-width (fixed-width contents info)
|
||||
(defun org-ascii-fixed-width (fixed-width _contents info)
|
||||
"Transcode a FIXED-WIDTH element from Org to ASCII.
|
||||
CONTENTS is nil. INFO is a plist holding contextual information."
|
||||
(org-ascii--justify-element
|
||||
@ -1269,7 +1269,7 @@ CONTENTS is nil. INFO is a plist holding contextual information."
|
||||
|
||||
;;;; Footnote Reference
|
||||
|
||||
(defun org-ascii-footnote-reference (footnote-reference contents info)
|
||||
(defun org-ascii-footnote-reference (footnote-reference _contents info)
|
||||
"Transcode a FOOTNOTE-REFERENCE element from Org to ASCII.
|
||||
CONTENTS is nil. INFO is a plist holding contextual information."
|
||||
(format "[%s]" (org-export-get-footnote-number footnote-reference info)))
|
||||
@ -1328,7 +1328,7 @@ holding contextual information."
|
||||
|
||||
;;;; Horizontal Rule
|
||||
|
||||
(defun org-ascii-horizontal-rule (horizontal-rule contents info)
|
||||
(defun org-ascii-horizontal-rule (horizontal-rule _contents info)
|
||||
"Transcode an HORIZONTAL-RULE object from Org to ASCII.
|
||||
CONTENTS is nil. INFO is a plist holding contextual
|
||||
information."
|
||||
@ -1345,7 +1345,7 @@ information."
|
||||
|
||||
;;;; Inline Src Block
|
||||
|
||||
(defun org-ascii-inline-src-block (inline-src-block contents info)
|
||||
(defun org-ascii-inline-src-block (inline-src-block _contents info)
|
||||
"Transcode an INLINE-SRC-BLOCK element from Org to ASCII.
|
||||
CONTENTS holds the contents of the item. INFO is a plist holding
|
||||
contextual information."
|
||||
@ -1356,7 +1356,7 @@ contextual information."
|
||||
;;;; Inlinetask
|
||||
|
||||
(defun org-ascii-format-inlinetask-default
|
||||
(todo type priority name tags contents width inlinetask info)
|
||||
(_todo _type _priority _name _tags contents width inlinetask info)
|
||||
"Format an inline task element for ASCII export.
|
||||
See `org-ascii-format-inlinetask-function' for a description
|
||||
of the parameters."
|
||||
@ -1411,7 +1411,7 @@ holding contextual information."
|
||||
|
||||
;;;; Italic
|
||||
|
||||
(defun org-ascii-italic (italic contents info)
|
||||
(defun org-ascii-italic (_italic contents _info)
|
||||
"Transcode italic from Org to ASCII.
|
||||
CONTENTS is the text with italic markup. INFO is a plist holding
|
||||
contextual information."
|
||||
@ -1470,7 +1470,7 @@ contextual information."
|
||||
|
||||
;;;; Keyword
|
||||
|
||||
(defun org-ascii-keyword (keyword contents info)
|
||||
(defun org-ascii-keyword (keyword _contents info)
|
||||
"Transcode a KEYWORD element from Org to ASCII.
|
||||
CONTENTS is nil. INFO is a plist holding contextual
|
||||
information."
|
||||
@ -1496,7 +1496,7 @@ information."
|
||||
|
||||
;;;; Latex Environment
|
||||
|
||||
(defun org-ascii-latex-environment (latex-environment contents info)
|
||||
(defun org-ascii-latex-environment (latex-environment _contents info)
|
||||
"Transcode a LATEX-ENVIRONMENT element from Org to ASCII.
|
||||
CONTENTS is nil. INFO is a plist holding contextual
|
||||
information."
|
||||
@ -1508,7 +1508,7 @@ information."
|
||||
|
||||
;;;; Latex Fragment
|
||||
|
||||
(defun org-ascii-latex-fragment (latex-fragment contents info)
|
||||
(defun org-ascii-latex-fragment (latex-fragment _contents info)
|
||||
"Transcode a LATEX-FRAGMENT object from Org to ASCII.
|
||||
CONTENTS is nil. INFO is a plist holding contextual
|
||||
information."
|
||||
@ -1518,7 +1518,7 @@ information."
|
||||
|
||||
;;;; Line Break
|
||||
|
||||
(defun org-ascii-line-break (line-break contents info)
|
||||
(defun org-ascii-line-break (_line-break _contents _info)
|
||||
"Transcode a LINE-BREAK object from Org to ASCII.
|
||||
CONTENTS is nil. INFO is a plist holding contextual
|
||||
information." hard-newline)
|
||||
@ -1569,7 +1569,7 @@ INFO is a plist holding contextual information."
|
||||
|
||||
;;;; Node Properties
|
||||
|
||||
(defun org-ascii-node-property (node-property contents info)
|
||||
(defun org-ascii-node-property (node-property _contents _info)
|
||||
"Transcode a NODE-PROPERTY element from Org to ASCII.
|
||||
CONTENTS is nil. INFO is a plist holding contextual
|
||||
information."
|
||||
@ -1632,7 +1632,7 @@ INFO is a plist used as a communication channel."
|
||||
|
||||
;;;; Planning
|
||||
|
||||
(defun org-ascii-planning (planning contents info)
|
||||
(defun org-ascii-planning (planning _contents info)
|
||||
"Transcode a PLANNING element from Org to ASCII.
|
||||
CONTENTS is nil. INFO is a plist used as a communication
|
||||
channel."
|
||||
@ -1668,7 +1668,7 @@ holding contextual information."
|
||||
|
||||
;;;; Quote Block
|
||||
|
||||
(defun org-ascii-quote-block (quote-block contents info)
|
||||
(defun org-ascii-quote-block (_quote-block contents info)
|
||||
"Transcode a QUOTE-BLOCK element from Org to ASCII.
|
||||
CONTENTS holds the contents of the block. INFO is a plist
|
||||
holding contextual information."
|
||||
@ -1677,7 +1677,7 @@ holding contextual information."
|
||||
|
||||
;;;; Radio Target
|
||||
|
||||
(defun org-ascii-radio-target (radio-target contents info)
|
||||
(defun org-ascii-radio-target (_radio-target contents _info)
|
||||
"Transcode a RADIO-TARGET object from Org to ASCII.
|
||||
CONTENTS is the contents of the target. INFO is a plist holding
|
||||
contextual information."
|
||||
@ -1708,7 +1708,7 @@ contextual information."
|
||||
|
||||
;;;; Special Block
|
||||
|
||||
(defun org-ascii-special-block (special-block contents info)
|
||||
(defun org-ascii-special-block (_special-block contents _info)
|
||||
"Transcode a SPECIAL-BLOCK element from Org to ASCII.
|
||||
CONTENTS holds the contents of the block. INFO is a plist
|
||||
holding contextual information."
|
||||
@ -1720,7 +1720,7 @@ holding contextual information."
|
||||
|
||||
;;;; Src Block
|
||||
|
||||
(defun org-ascii-src-block (src-block contents info)
|
||||
(defun org-ascii-src-block (src-block _contents info)
|
||||
"Transcode a SRC-BLOCK element from Org to ASCII.
|
||||
CONTENTS holds the contents of the item. INFO is a plist holding
|
||||
contextual information."
|
||||
@ -1738,7 +1738,7 @@ contextual information."
|
||||
|
||||
;;;; Statistics Cookie
|
||||
|
||||
(defun org-ascii-statistics-cookie (statistics-cookie contents info)
|
||||
(defun org-ascii-statistics-cookie (statistics-cookie _contents _info)
|
||||
"Transcode a STATISTICS-COOKIE object from Org to ASCII.
|
||||
CONTENTS is nil. INFO is a plist holding contextual information."
|
||||
(org-element-property :value statistics-cookie))
|
||||
@ -1746,7 +1746,7 @@ CONTENTS is nil. INFO is a plist holding contextual information."
|
||||
|
||||
;;;; Subscript
|
||||
|
||||
(defun org-ascii-subscript (subscript contents info)
|
||||
(defun org-ascii-subscript (subscript contents _info)
|
||||
"Transcode a SUBSCRIPT object from Org to ASCII.
|
||||
CONTENTS is the contents of the object. INFO is a plist holding
|
||||
contextual information."
|
||||
@ -1757,7 +1757,7 @@ contextual information."
|
||||
|
||||
;;;; Superscript
|
||||
|
||||
(defun org-ascii-superscript (superscript contents info)
|
||||
(defun org-ascii-superscript (superscript contents _info)
|
||||
"Transcode a SUPERSCRIPT object from Org to ASCII.
|
||||
CONTENTS is the contents of the object. INFO is a plist holding
|
||||
contextual information."
|
||||
@ -1768,7 +1768,7 @@ contextual information."
|
||||
|
||||
;;;; Strike-through
|
||||
|
||||
(defun org-ascii-strike-through (strike-through contents info)
|
||||
(defun org-ascii-strike-through (_strike-through contents _info)
|
||||
"Transcode STRIKE-THROUGH from Org to ASCII.
|
||||
CONTENTS is text with strike-through markup. INFO is a plist
|
||||
holding contextual information."
|
||||
@ -1938,7 +1938,7 @@ a communication channel."
|
||||
|
||||
;;;; Timestamp
|
||||
|
||||
(defun org-ascii-timestamp (timestamp contents info)
|
||||
(defun org-ascii-timestamp (timestamp _contents info)
|
||||
"Transcode a TIMESTAMP object from Org to ASCII.
|
||||
CONTENTS is nil. INFO is a plist holding contextual information."
|
||||
(org-ascii-plain-text (org-timestamp-translate timestamp) info))
|
||||
@ -1946,7 +1946,7 @@ CONTENTS is nil. INFO is a plist holding contextual information."
|
||||
|
||||
;;;; Underline
|
||||
|
||||
(defun org-ascii-underline (underline contents info)
|
||||
(defun org-ascii-underline (_underline contents _info)
|
||||
"Transcode UNDERLINE from Org to ASCII.
|
||||
CONTENTS is the text with underline markup. INFO is a plist
|
||||
holding contextual information."
|
||||
@ -1955,7 +1955,7 @@ holding contextual information."
|
||||
|
||||
;;;; Verbatim
|
||||
|
||||
(defun org-ascii-verbatim (verbatim contents info)
|
||||
(defun org-ascii-verbatim (verbatim _contents info)
|
||||
"Return a VERBATIM object from Org to ASCII.
|
||||
CONTENTS is nil. INFO is a plist holding contextual information."
|
||||
(format (plist-get info :ascii-verbatim-format)
|
||||
@ -1968,21 +1968,20 @@ CONTENTS is nil. INFO is a plist holding contextual information."
|
||||
"Transcode a VERSE-BLOCK element from Org to ASCII.
|
||||
CONTENTS is verse block contents. INFO is a plist holding
|
||||
contextual information."
|
||||
(let ((verse-width (org-ascii--current-text-width verse-block info)))
|
||||
(org-ascii--indent-string
|
||||
(org-ascii--justify-element contents verse-block info)
|
||||
(plist-get info :ascii-quote-margin))))
|
||||
(org-ascii--indent-string
|
||||
(org-ascii--justify-element contents verse-block info)
|
||||
(plist-get info :ascii-quote-margin)))
|
||||
|
||||
|
||||
|
||||
;;; Filters
|
||||
|
||||
(defun org-ascii-filter-headline-blank-lines (headline back-end info)
|
||||
(defun org-ascii-filter-headline-blank-lines (headline _backend info)
|
||||
"Filter controlling number of blank lines after a headline.
|
||||
|
||||
HEADLINE is a string representing a transcoded headline.
|
||||
BACK-END is symbol specifying back-end used for export. INFO is
|
||||
plist containing the communication channel.
|
||||
HEADLINE is a string representing a transcoded headline. BACKEND
|
||||
is symbol specifying back-end used for export. INFO is plist
|
||||
containing the communication channel.
|
||||
|
||||
This function only applies to `ascii' back-end. See
|
||||
`org-ascii-headline-spacing' for information."
|
||||
@ -1991,10 +1990,10 @@ This function only applies to `ascii' back-end. See
|
||||
(let ((blanks (make-string (1+ (cdr headline-spacing)) ?\n)))
|
||||
(replace-regexp-in-string "\n\\(?:\n[ \t]*\\)*\\'" blanks headline)))))
|
||||
|
||||
(defun org-ascii-filter-paragraph-spacing (tree back-end info)
|
||||
(defun org-ascii-filter-paragraph-spacing (tree _backend info)
|
||||
"Filter controlling number of blank lines between paragraphs.
|
||||
|
||||
TREE is the parse tree. BACK-END is the symbol specifying
|
||||
TREE is the parse tree. BACKEND is the symbol specifying
|
||||
back-end used for export. INFO is a plist used as
|
||||
a communication channel.
|
||||
|
||||
@ -2008,9 +2007,9 @@ See `org-ascii-paragraph-spacing' for information."
|
||||
(org-element-put-property p :post-blank paragraph-spacing))))))
|
||||
tree)
|
||||
|
||||
(defun org-ascii-filter-comment-spacing (tree backend info)
|
||||
(defun org-ascii-filter-comment-spacing (tree _backend info)
|
||||
"Filter removing blank lines between comments.
|
||||
TREE is the parse tree. BACK-END is the symbol specifying
|
||||
TREE is the parse tree. BACKEND is the symbol specifying
|
||||
back-end used for export. INFO is a plist used as
|
||||
a communication channel."
|
||||
(org-element-map tree '(comment comment-block)
|
||||
|
Loading…
Reference in New Issue
Block a user