Merge branch 'maint' into emacs-sync

This commit is contained in:
Kyle Meyer 2018-03-26 18:42:14 -04:00
commit c8605f1ef6
7 changed files with 22 additions and 65 deletions

View File

@ -24,7 +24,7 @@
;;; Commentary:
;; `ob-sclang' requires `sclang-interp' from SuperCollider.
;; `ob-sclang' requires `sclang' from SuperCollider.
;; Usually SuperCollider dependencies for Emacs are at /usr/share/emacs/site-lisp/SuperCollider/
;; You can install SuperCollider following this article:
;; https://github.com/supercollider/supercollider#building-the-source-code
@ -60,7 +60,7 @@
(require 'org)
(require 'ob)
(require 'sclang-interp)
(require 'sclang)
(defgroup ob-sclang nil
"org-mode blocks for SuperCollider SCLang."

View File

@ -89,8 +89,6 @@ NOTE: By default, string variable names are interpreted as
references to source-code blocks, to force interpretation of a
cell's value as a string, prefix the identifier a \"$\" (e.g.,
\"$$2\" instead of \"$2\" or \"$@2$2\" instead of \"@2$2\").
This will not work with a range; instead, pass it as a list,
e.g. (org-sbe fun (r (list $1..$2))).
NOTE: It is also possible to pass header arguments to the code
block. In this case a table cell should hold the string value of
@ -114,7 +112,7 @@ as shown in the example below.
(prog1 nil (setq quote t))
(prog1
(cond
(quote (format "%S" el))
(quote (format "\"%s\"" el))
((stringp el) (org-no-properties el))
(t el))
(setq quote nil))))
@ -134,17 +132,12 @@ as shown in the example below.
"("
(mapconcat
(lambda (var-spec)
(cond
((> (length (cdr var-spec)) 1)
(format "%S='%S"
(car var-spec)
(mapcar #'read (cdr var-spec))))
((stringp (cadr var-spec))
(format "%S=%s"
(car var-spec) (cadr var-spec)))
(t
(format "%S=%S"
(car var-spec) (cadr var-spec)))))
(if (> (length (cdr var-spec)) 1)
(format "%S='%S"
(car var-spec)
(mapcar #'read (cdr var-spec)))
(format "%S=%s"
(car var-spec) (cadr var-spec))))
',variables ", ")
")")))))
(org-babel-execute-src-block

View File

@ -6176,7 +6176,7 @@ scheduled items with an hour specification like [h]h:mm."
;; Nullify delay when a repeater triggered already
;; and the delay is of the form --Xd.
((and (string-match-p "--[0-9]+[hdwmy]" s)
(> current schedule))
(> schedule (org-agenda--timestamp-to-absolute s)))
0)
(suppress-delay
(let ((org-scheduled-delay-days suppress-delay))

View File

@ -130,7 +130,7 @@ Templates are stored in buffer-local variable
function installs the following ones: \"property\",
\"time\". and, if the buffer is associated to a file,
\"input-file\" and \"modification-time\"."
(let* ((templates (org-macro--collect-macros))
(let* ((templates nil)
(update-templates
(lambda (cell)
(let ((old-template (assoc (car cell) templates)))
@ -164,7 +164,7 @@ function installs the following ones: \"property\",
(org-macro--counter-initialize)
(funcall update-templates
(cons "n" "(eval (org-macro--counter-increment \"$1\" \"$2\"))"))
(setq org-macro-templates templates)))
(setq org-macro-templates (nconc (org-macro--collect-macros) templates))))
(defun org-macro-expand (macro templates)
"Return expanded MACRO, as a string.

View File

@ -7,7 +7,7 @@
;; Maintainer: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: https://orgmode.org
;; Version: 9.1.8
;; Version: 9.1.9
;;
;; This file is part of GNU Emacs.
;;

View File

@ -30,51 +30,6 @@
;; (org-test-at-id "6d2ff4ce-4489-4e2a-9c65-e3f71f77d975"
;; (should (= 2 (sbe take-sqrt (n "4"))))))
(ert-deftest test-ob-table/sbe-quote ()
"Test that `org-sbe' can correctly handle cell values containing quotes."
(org-test-table-target-expect
"
#+name: identity
#+begin_src emacs-lisp :eval yes
x
#+end_src
| a\"b\"c | replace |
"
"
#+name: identity
#+begin_src emacs-lisp :eval yes
x
#+end_src
| a\"b\"c | a\"b\"c |
"
1
"#+TBLFM: $2 = '(org-sbe identity (x $$1))"))
(ert-deftest test-ob-table/sbe-list ()
"Test that `org-sbe' can correctly handle ranges as lists."
(org-test-table-target-expect
"
#+name: concat
#+begin_src emacs-lisp :eval yes
(mapconcat #'identity x \"\")
#+end_src
| foo | bar | replace |
"
"
#+name: concat
#+begin_src emacs-lisp :eval yes
(mapconcat #'identity x \"\")
#+end_src
| foo | bar | foobar |
"
1
"#+TBLFM: $3 = '(org-sbe concat (x (list $1..$2)))"
"#+TBLFM: $3 = '(org-sbe concat (x $ (list $1..$2)))"))
(provide 'test-ob-table)
;;; test-ob-table.el ends here

View File

@ -5731,6 +5731,15 @@ Paragraph<point>"
(org-match-sparse-tree nil "Lev_1")
(search-forward "H4")
(org-invisible-p2)))
(should-not
(org-test-with-temp-text
"#+TAGS: [ Lev_1 : Lev_2 ]\n
#+TAGS: [ Lev_2 : Lev_3 ]\n
#+TAGS: { Lev_3 : Lev_4 }\n
* H\n** H1 :Lev_1:\n** H2 :Lev_2:\n** H3 :Lev_3:\n** H4 :Lev_4:"
(org-match-sparse-tree nil "Lev_1+Lev_3")
(search-forward "H4")
(org-invisible-p2)))
;; Match regular expressions in tags
(should-not
(org-test-with-temp-text