branch: externals/org-transclusion commit 27abeab88debe275ee36ceaf18b5b471ab6210ac Author: Noboru Ota <m...@nobiot.com> Commit: Noboru Ota <m...@nobiot.com>
test: test files things-at-point --- test/things-at-point-dir/baz.el | 10 ++++++++++ test/things-at-point-dir/story.txt | 7 +++++++ test/things-at-point.org | 27 +++++++++++++++++++++++++++ 3 files changed, 44 insertions(+) diff --git a/test/things-at-point-dir/baz.el b/test/things-at-point-dir/baz.el new file mode 100644 index 0000000000..f0546a38dc --- /dev/null +++ b/test/things-at-point-dir/baz.el @@ -0,0 +1,10 @@ +(defun bar (arg) + "Documentation for bar" + arg) + + +;; Comments +(defun foo () + "Documentation for this function." + (bar (let ((fuzz (buzz))) ;<id:1234567890> + (baz fuzz))) diff --git a/test/things-at-point-dir/story.txt b/test/things-at-point-dir/story.txt new file mode 100644 index 0000000000..3c9521de54 --- /dev/null +++ b/test/things-at-point-dir/story.txt @@ -0,0 +1,7 @@ +This is a story + +Once upon a time. This paragraph should be transcluded. This is a story. +And if I have a hard line break, I belive this line is still part of +the paragraph as defined by ... thing-at-point I think. + +This is a new paragraph and should not be included. diff --git a/test/things-at-point.org b/test/things-at-point.org new file mode 100644 index 0000000000..1b1a99e0b1 --- /dev/null +++ b/test/things-at-point.org @@ -0,0 +1,27 @@ + What are the allowed (intended?) or tested "things"? + +I've briefly tested these: + + word + symbol + line (redundant, since we already have :lines) + +forward-thing is the function used for selecting multiple things. Some gotchas from some of the less common things could stem from this not handing them as expected. + +I expect these will be more common: + + sentence + paragraph + defun + sexp + list + +#+transclude: [[./things-at-point-dir/story.txt::Once upon a time][story]] :thing-at-point paragraph + +#+transclude: [[./things-at-point-dir/story.txt::Once upon a time][story]] :thing-at-point sentence + +#+transclude: [[./things-at-point-dir/baz.el::id:1234567890][[barz-baz-fuzz]] :src elisp :thing-at-point sexp + +#+transclude: [[./things-at-point-dir/baz.el::foo][[barz-baz-fuzz]] :src elisp :thing-at-point defun + +#+transclude: [[./things-at-point-dir/baz.el::id:1234567890][[barz-baz-fuzz]] :src elisp :thing-at-point defun