Start an investigation into affiliated keyword behavior.
This commit is contained in:
parent
77ab636e6a
commit
1168ddb1fe
23
notes/affiliated_keyword_investigation/run_test.bash
Executable file
23
notes/affiliated_keyword_investigation/run_test.bash
Executable file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
file_path="${DIR}/test_document.org"
|
||||
|
||||
INIT_SCRIPT=$(cat <<EOF
|
||||
(progn
|
||||
(erase-buffer)
|
||||
(require 'org)
|
||||
(defun org-table-align () t)
|
||||
(setq vc-handled-backends nil)
|
||||
(find-file-read-only "/input/${file_path}")
|
||||
(setq-default org-element-affiliated-keywords (list "foo"))
|
||||
(org-mode)
|
||||
(message "%s" (pp-to-string (org-element-parse-buffer)))
|
||||
)
|
||||
EOF
|
||||
)
|
||||
|
||||
exec docker run --init --rm -i --mount type=tmpfs,destination=/tmp -v "/:/input:ro" -w /input --entrypoint "" organic-test emacs -q --no-site-file --no-splash --batch --eval "$INIT_SCRIPT"
|
25
notes/affiliated_keyword_investigation/test_document.org
Normal file
25
notes/affiliated_keyword_investigation/test_document.org
Normal file
@ -0,0 +1,25 @@
|
||||
# Single instance
|
||||
#+foo: *a*
|
||||
#+begin_example
|
||||
|
||||
#+end_example
|
||||
|
||||
# Two instances
|
||||
#+foo: *b*
|
||||
#+foo: *c*
|
||||
#+begin_example
|
||||
|
||||
#+end_example
|
||||
|
||||
# Single with optval
|
||||
#+foo[*bar*]: *d*
|
||||
#+begin_example
|
||||
|
||||
#+end_example
|
||||
|
||||
# Two with optval
|
||||
#+foo[*bar*]: *e*
|
||||
#+foo[*bar*]: *f*
|
||||
#+begin_example
|
||||
|
||||
#+end_example
|
Loading…
Reference in New Issue
Block a user