summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2018-09-20 11:23:49 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2018-09-20 11:23:49 +0200
commit17edaf8c14e9999f87b2a038ababb8d9dcf887d3 (patch)
treea14c26f78e0bb67450fa115a7c1ef9c4781c9fd9
parent4c8b227144a2db36c49f65e81d666fc0e58a587e (diff)
downloadorg-mode-17edaf8c14e9999f87b2a038ababb8d9dcf887d3.tar.gz
"src block" -> "source block" in documentation and comments
* etc/ORG-NEWS (Maxima: new headers ~:prologue~ and ~:epilogue~): (Texinfo exports inline source blocks as ~@code{}~): (Default lexical evaluation of emacs-lisp source blocks): * lisp/ob-clojure.el (org-babel-clojure-default-ns): * lisp/ob-core.el (org-babel-named-src-block-regexp-for-name): (org-babel-current-src-block-location): (org-babel-mark-block): (org-babel-insert-result): * lisp/ob-emacs-lisp.el (org-babel-default-header-args:emacs-lisp): * lisp/ob-exp.el (org-babel-exp-process-buffer): * lisp/ob-lob.el (org-babel-lob-ingest): * lisp/ob-ref.el: * lisp/org-element.el (org-element-object-restrictions): (org-element-src-block-parser): (org-element-inline-src-block-parser): * lisp/org-lint.el: (org-lint--checkers): * lisp/org-pcomplete.el (pcomplete/org-mode/block-option/src): * lisp/org-src.el (org-edit-inline-src-code): * lisp/org.el (org-ctrl-c-ctrl-c): (org-in-src-block-p): (org-fill-element): * lisp/ox-html.el (org-html--textarea-block): (org-html-format-code): * lisp/ox-latex.el (org-latex-minted-options): (org-latex-custom-lang-environments): * lisp/ox-md.el: * lisp/ox-odt.el (org-odt-format-code): * lisp/ox.el (org-export-collect-listings): * testing/lisp/test-ob-exp.el (ob-exp/src-block-with-affiliated-keyword): * testing/lisp/test-ob.el (test-ob/preserve-results-indentation): Correct "src block" occurrences when they do not specifically refer to the element type `src-block'.
-rw-r--r--etc/ORG-NEWS8
-rw-r--r--lisp/ob-clojure.el2
-rw-r--r--lisp/ob-core.el10
-rw-r--r--lisp/ob-emacs-lisp.el2
-rw-r--r--lisp/ob-exp.el6
-rw-r--r--lisp/ob-lob.el2
-rw-r--r--lisp/ob-ref.el4
-rw-r--r--lisp/org-element.el11
-rw-r--r--lisp/org-lint.el6
-rw-r--r--lisp/org-pcomplete.el5
-rw-r--r--lisp/org-src.el2
-rw-r--r--lisp/org.el8
-rw-r--r--lisp/ox-html.el8
-rw-r--r--lisp/ox-latex.el19
-rw-r--r--lisp/ox-md.el2
-rw-r--r--lisp/ox-odt.el2
-rw-r--r--lisp/ox.el4
-rw-r--r--testing/lisp/test-ob-exp.el2
-rw-r--r--testing/lisp/test-ob.el2
19 files changed, 54 insertions, 51 deletions
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 2a22be0..6d83ae5 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -609,7 +609,7 @@ value of the code will be displayed in the results section.
**** Maxima: new headers ~:prologue~ and ~:epilogue~
Babel options ~:prologue~ and ~:epilogue~ have been implemented for
-Maxima src blocks which prepend and append, respectively, the given
+Maxima source blocks which prepend and append, respectively, the given
code strings. This can be useful for specifying formatting settings
which would add clutter to exported code. For instance, you can use
this ~:prologue "fpprintprec: 2; linel: 50;"~ for presenting Maxima
@@ -891,7 +891,7 @@ is now obsolete.
Now ~=...=~ markup uses ~@samp{}~ instead of ~@verb{}~. You can use
~@verb{}~ again by customizing the variable.
*** Texinfo exports example blocks as ~@example~
-*** Texinfo exports inline src blocks as ~@code{}~
+*** Texinfo exports inline source blocks as ~@code{}~
*** Texinfo default table markup is ~@asis~
It used to be ~@samp~ but ~@asis~ is neutral and, therefore, more
suitable as a default value.
@@ -1708,9 +1708,9 @@ docstring for more information.
** New features
-*** Default lexical evaluation of emacs-lisp src blocks
+*** Default lexical evaluation of emacs-lisp source blocks
-Emacs-lisp src blocks in babel are now evaluated using lexical
+Emacs-lisp source blocks in Babel are now evaluated using lexical
scoping. There is a new header to control this behavior.
The default results in an eval with lexical scoping.
diff --git a/lisp/ob-clojure.el b/lisp/ob-clojure.el
index 98bed12..d5b918b 100644
--- a/lisp/ob-clojure.el
+++ b/lisp/ob-clojure.el
@@ -80,7 +80,7 @@ If the value is nil, timeout is disabled."
(const :tag "SLIME" slime)))
(defcustom org-babel-clojure-default-ns "user"
- "Default Clojure namespace for src block when all find ns ways failed."
+ "Default Clojure namespace for source block when finding ns failed."
:type 'string
:group 'org-babel)
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 42360d6..32de18e 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -521,7 +521,7 @@ to raise errors for all languages.")
"Hook for functions to be called after `org-babel-execute-src-block'")
(defun org-babel-named-src-block-regexp-for-name (&optional name)
- "This generates a regexp used to match a src block named NAME.
+ "This generates a regexp used to match a source block named NAME.
If NAME is nil, match any name. Matched name is then put in
match group 9. Other match groups are defined in
`org-babel-src-block-regexp'."
@@ -555,7 +555,7 @@ Remove final newline character and spurious indentation."
;;; functions
(defvar org-babel-current-src-block-location nil
- "Marker pointing to the src block currently being executed.
+ "Marker pointing to the source block currently being executed.
This may also point to a call line or an inline code block. If
multiple blocks are being executed (e.g., in chained execution
through use of the :var header argument) this marker points to
@@ -1855,7 +1855,7 @@ With optional prefix argument ARG, jump backward ARG many source blocks."
;;;###autoload
(defun org-babel-mark-block ()
- "Mark current src block."
+ "Mark current source block."
(interactive)
(let ((head (org-babel-where-is-src-block-head)))
(when head
@@ -2216,10 +2216,10 @@ code ---- the results are extracted in the syntax of the source
optional LANG argument.
list ---- the results are rendered as a list. This option not
- allowed for inline src blocks.
+ allowed for inline source blocks.
table --- the results are rendered as a table. This option not
- allowed for inline src blocks.
+ allowed for inline source blocks.
INFO may provide the values of these header arguments (in the
`header-arguments-alist' see the docstring for
diff --git a/lisp/ob-emacs-lisp.el b/lisp/ob-emacs-lisp.el
index 8ea2ec1..f675046 100644
--- a/lisp/ob-emacs-lisp.el
+++ b/lisp/ob-emacs-lisp.el
@@ -34,7 +34,7 @@
(defvar org-babel-default-header-args:emacs-lisp '((:lexical . "no"))
"Default arguments for evaluating an emacs-lisp source block.
-A value of \"yes\" or t causes src blocks to be eval'd using
+A value of \"yes\" or t causes source blocks to be eval'd using
lexical scoping. It can also be an alist mapping symbols to
their value. It is used as the optional LEXICAL argument to
`eval', which see.")
diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el
index 9ab93ec..482649e 100644
--- a/lisp/ob-exp.el
+++ b/lisp/ob-exp.el
@@ -209,9 +209,9 @@ this template."
(progn (goto-char end)
(skip-chars-forward " \t")
(point)))
- ;; Otherwise: remove inline src block but
- ;; preserve following white spaces. Then
- ;; insert value.
+ ;; Otherwise: remove inline source block
+ ;; but preserve following white spaces.
+ ;; Then insert value.
(delete-region begin end)
(insert replacement)))))
((or `babel-call `inline-babel-call)
diff --git a/lisp/ob-lob.el b/lisp/ob-lob.el
index 9bf6858..734d7d0 100644
--- a/lisp/ob-lob.el
+++ b/lisp/ob-lob.el
@@ -62,7 +62,7 @@ should not be inherited from a source block.")
(cons (cons source info)
(assq-delete-all source org-babel-library-of-babel))))
(cl-incf lob-ingest-count))))
- (message "%d src block%s added to Library of Babel"
+ (message "%d source block%s added to Library of Babel"
lob-ingest-count (if (> lob-ingest-count 1) "s" ""))
lob-ingest-count))
diff --git a/lisp/ob-ref.el b/lisp/ob-ref.el
index 78cf7df..095c420 100644
--- a/lisp/ob-ref.el
+++ b/lisp/ob-ref.el
@@ -37,8 +37,8 @@
;; - resource-id :: the id or name of the resource
-;; So an example of a simple src block referencing table data in the
-;; same file would be
+;; So an example of a simple source block referencing table data in
+;; the same file would be
;; #+NAME: sandbox
;; | 1 | 2 | 3 |
diff --git a/lisp/org-element.el b/lisp/org-element.el
index d757e65..cdb574e 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -307,8 +307,9 @@ Don't modify it, set `org-element-affiliated-keywords' instead.")
(strike-through ,@standard-set)
(subscript ,@standard-set)
(superscript ,@standard-set)
- ;; Ignore inline babel call and inline src block as formulas are
- ;; possible. Also ignore line breaks and statistics cookies.
+ ;; Ignore inline babel call and inline source block as formulas
+ ;; are possible. Also ignore line breaks and statistics
+ ;; cookies.
(table-cell bold code entity export-snippet footnote-reference italic
latex-fragment link macro radio-target strike-through
subscript superscript target timestamp underline verbatim)
@@ -2399,7 +2400,7 @@ containing `:closed', `:deadline', `:scheduled', `:begin',
;;;; Src Block
(defun org-element-src-block-parser (limit affiliated)
- "Parse a src block.
+ "Parse a source block.
LIMIT bounds the search. AFFILIATED is a list of which CAR is
the buffer position at the beginning of the first affiliated
@@ -2455,7 +2456,7 @@ Assume point is at the beginning of the block."
(string-match "-l +\"\\([^\"\n]+\\)\"" switches)
(match-string 1 switches)))
;; Should labels be retained in (or stripped from)
- ;; src blocks?
+ ;; source blocks?
(retain-labels
(or (not switches)
(not (string-match "-r\\>" switches))
@@ -2929,7 +2930,7 @@ When at an inline source block, return a list whose car is
`:language', `:value', `:parameters' and `:post-blank' as
keywords. Otherwise, return nil.
-Assume point is at the beginning of the inline src block."
+Assume point is at the beginning of the inline source block."
(save-excursion
(catch :no-object
(when (let ((case-fold-search nil))
diff --git a/lisp/org-lint.el b/lisp/org-lint.el
index 1b969f0..a311b1d 100644
--- a/lisp/org-lint.el
+++ b/lisp/org-lint.el
@@ -69,13 +69,13 @@
;; - duplicate footnote definitions
;; - orphaned affiliated keywords
;; - obsolete affiliated keywords
-;; - missing language in src blocks
+;; - missing language in source blocks
;; - missing back-end in export blocks
;; - invalid Babel call blocks
;; - NAME values with a colon
;; - deprecated export block syntax
;; - deprecated Babel header properties
-;; - wrong header arguments in src blocks
+;; - wrong header arguments in source blocks
;; - misuse of CATEGORY keyword
;; - "coderef" links with unknown destination
;; - "custom-id" links with unknown destination
@@ -162,7 +162,7 @@
:trust 'low)
(make-org-lint-checker
:name 'missing-language-in-src-block
- :description "Report missing language in src blocks"
+ :description "Report missing language in source blocks"
:categories '(babel))
(make-org-lint-checker
:name 'missing-backend-in-export-block
diff --git a/lisp/org-pcomplete.el b/lisp/org-pcomplete.el
index 2653658..a10a6a2 100644
--- a/lisp/org-pcomplete.el
+++ b/lisp/org-pcomplete.el
@@ -346,8 +346,9 @@ This needs more work, to handle headings with lots of spaces in them."
(substring pcomplete-stub 1)))
(defun pcomplete/org-mode/block-option/src ()
- "Complete the arguments of a begin_src block.
-Complete a language in the first field, the header arguments and switches."
+ "Complete the arguments of a source block.
+Complete a language in the first field, the header arguments and
+switches."
(pcomplete-here
(mapcar
(lambda(x) (symbol-name (nth 3 x)))
diff --git a/lisp/org-src.el b/lisp/org-src.el
index 42e1225..9c462b7 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -1037,7 +1037,7 @@ name of the sub-editing buffer."
(org-src--construct-edit-buffer-name (buffer-name) lang)
lang-f
(lambda ()
- ;; Inline src blocks are limited to one line.
+ ;; Inline source blocks are limited to one line.
(while (re-search-forward "\n[ \t]*" nil t) (replace-match " "))
;; Trim contents.
(goto-char (point-min))
diff --git a/lisp/org.el b/lisp/org.el
index affac0b..ebe928b 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -20241,7 +20241,7 @@ This command does many different things, depending on context:
;; Act according to type of element or object at point.
;;
;; Do nothing on a blank line, except if it is contained in
- ;; a src block. Hence, we first check if point is in such
+ ;; a source block. Hence, we first check if point is in such
;; a block and then if it is at a blank line.
(pcase type
((or `inline-src-block `src-block)
@@ -21226,8 +21226,8 @@ If there is no description, use the link target."
(defun org-in-src-block-p (&optional inside)
"Whether point is in a code source block.
-When INSIDE is non-nil, don't consider we are within a src block
-when point is at #+BEGIN_SRC or #+END_SRC."
+When INSIDE is non-nil, don't consider we are within a source
+block when point is at #+BEGIN_SRC or #+END_SRC."
(let ((case-fold-search t))
(or (and (eq (get-char-property (point) 'src-block) t))
(and (not inside)
@@ -22030,7 +22030,7 @@ a footnote definition, try to fill the first paragraph within."
;; First check if point is in a blank line at the beginning of
;; the buffer. In that case, ignore filling.
(cl-case (org-element-type element)
- ;; Use major mode filling function is src blocks.
+ ;; Use major mode filling function is source blocks.
(src-block (org-babel-do-key-sequence-in-edit-buffer (kbd "M-q")))
;; Align Org tables, leave table.el tables as-is.
(table-row (org-table-align) t)
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 90fa54f..c5b6369 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -1706,7 +1706,7 @@ object unless a different class is specified with an attribute."
(defun org-html--textarea-block (element)
"Transcode ELEMENT into a textarea block.
-ELEMENT is either a src block or an example block."
+ELEMENT is either a source or an example block."
(let* ((code (car (org-export-unravel-code element)))
(attr (org-export-read-attribute :attr_html element)))
(format "<p>\n<textarea cols=\"%s\" rows=\"%s\">\n%s</textarea>\n</p>"
@@ -2250,14 +2250,14 @@ line of code."
(defun org-html-format-code (element info)
"Format contents of ELEMENT as source code.
-ELEMENT is either an example block or a src block. INFO is
-a plist used as a communication channel."
+ELEMENT is either an example or a source block. INFO is a plist
+used as a communication channel."
(let* ((lang (org-element-property :language element))
;; Extract code and references.
(code-info (org-export-unravel-code element))
(code (car code-info))
(refs (cdr code-info))
- ;; Does the src block contain labels?
+ ;; Does the source block contain labels?
(retain-labels (org-element-property :retain-labels element))
;; Does it have line numbers?
(num-start (org-export-get-loc element info)))
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 7191a39..3f5d2ee 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1027,7 +1027,7 @@ value. For example,
(setq org-latex-minted-options
\\='((\"bgcolor\" \"bg\") (\"frame\" \"lines\")))
-will result in src blocks being exported with
+will result in source blocks being exported with
\\begin{minted}[bgcolor=bg,frame=lines]{<LANG>}
@@ -1048,12 +1048,13 @@ block-specific options, you may use the following syntax:
(defcustom org-latex-custom-lang-environments nil
"Alist mapping languages to language-specific LaTeX environments.
-It is used during export of src blocks by the listings and minted
-latex packages. The environment may be a simple string, composed of
-only letters and numbers. In this case, the string is directly the
-name of the latex environment to use. The environment may also be
-a format string. In this case the format string will be directly
-exported. This format string may contain these elements:
+It is used during export of source blocks by the listings and
+minted latex packages. The environment may be a simple string,
+composed of only letters and numbers. In this case, the string
+is directly the name of the latex environment to use. The
+environment may also be a format string. In this case the format
+string will be directly exported. This format string may contain
+these elements:
%s for the formatted source
%c for the caption
@@ -1075,7 +1076,7 @@ would have the effect that if Org encounters a Python source block
during LaTeX export it will produce
\\begin{pythoncode}
- <src block body>
+ <source block body>
\\end{pythoncode}
and if Org encounters an Ocaml source block during LaTeX export it
@@ -1083,7 +1084,7 @@ will produce
\\begin{listing}
\\begin{minted}[<attr_latex options>]{ocaml}
- <src block body>
+ <source block body>
\\end{minted}
\\caption{<caption>}
\\label{<label>}
diff --git a/lisp/ox-md.el b/lisp/ox-md.el
index 7a40134..b10ca74 100644
--- a/lisp/ox-md.el
+++ b/lisp/ox-md.el
@@ -175,7 +175,7 @@ channel."
value)))
-;;;; Example Block, Src Block and export Block
+;;;; Example Block, Src Block and Export Block
(defun org-md-example-block (example-block _contents info)
"Transcode EXAMPLE-BLOCK element into Markdown format.
diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index 74d811d..70ef9de 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -3139,7 +3139,7 @@ and prefix with \"OrgSrc\". For example,
(code-info (org-export-unravel-code element))
(code (car code-info))
(refs (cdr code-info))
- ;; Does the src block contain labels?
+ ;; Does the source block contain labels?
(retain-labels (org-element-property :retain-labels element))
;; Does it have line numbers?
(num-start (org-export-get-loc element info)))
diff --git a/lisp/ox.el b/lisp/ox.el
index 6d2059c..b5f6e5e 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -5310,11 +5310,11 @@ Return a list of elements recognized as figures."
(org-export-collect-elements 'paragraph info predicate))
(defun org-export-collect-listings (info)
- "Build a list of src blocks.
+ "Build a list of source blocks.
INFO is a plist used as a communication channel.
-Return a list of src-block elements with a caption."
+Return a list of `src-block' elements with a caption."
(org-export-collect-elements 'src-block info))
(defun org-export-excluded-from-toc-p (headline info)
diff --git a/testing/lisp/test-ob-exp.el b/testing/lisp/test-ob-exp.el
index 97bc014..6936bf9 100644
--- a/testing/lisp/test-ob-exp.el
+++ b/testing/lisp/test-ob-exp.el
@@ -575,7 +575,7 @@ src_emacs-lisp{(+ 1 1)}"
(ert-deftest ob-exp/src-block-with-affiliated-keyword ()
"Test exporting a code block with affiliated keywords."
- ;; Pathological case: affiliated keyword matches inline src block
+ ;; Pathological case: affiliated keyword matches inline source block
;; syntax.
(should
(equal "#+name: call_foo\n#+BEGIN_SRC emacs-lisp\n42\n#+END_SRC"
diff --git a/testing/lisp/test-ob.el b/testing/lisp/test-ob.el
index af38815..095f66a 100644
--- a/testing/lisp/test-ob.el
+++ b/testing/lisp/test-ob.el
@@ -1434,7 +1434,7 @@ echo \"$data\"
(org-babel-execute-src-block))))))
(ert-deftest test-ob/preserve-results-indentation ()
- "Preserve indentation when executing a src block."
+ "Preserve indentation when executing a source block."
(should
(equal
'(2 2)