From fc01255025f3270df0f275055b3c18b1cb2d00f0 Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Tue, 10 Nov 2020 13:34:03 -0500 Subject: Let's try it with individual info pages that are included --- 2020/schedule/22.md | 74 ++--------------------------------------------------- 1 file changed, 2 insertions(+), 72 deletions(-) (limited to '2020/schedule/22.md') diff --git a/2020/schedule/22.md b/2020/schedule/22.md index 9d9907b9..60a2ae35 100644 --- a/2020/schedule/22.md +++ b/2020/schedule/22.md @@ -5,79 +5,9 @@ Back to the [[schedule]] Previous: Emacs development update Next: Incremental Parsing with emacs-tree-sitter +Sunday, Nov 29 2020, 9:33 AM - 9:53 AM EST / 6:33 AM - 6:53 AM PST / 2:33 PM - 2:53 PM UTC / 3:33 PM - 3:53 PM CET / 10:33 PM - 10:53 PM +08 -# Powering-up Special Blocks -Sunday, Nov 29 2020, 9:33 AM - 9:53 AM EST / 6:33 AM - 6:53 AM PST / 2:33 PM - 2:53 PM UTC / 3:33 PM - 3:53 PM CET / 10:33 PM - 10:53 PM +08 -Musa Al-hassy - -Users will generally only make use of a few predefined \`special -blocks', such as \`example, centre, quote', and will not bother with -the effort required to make new ones. When new encapsulating notions -are required, users will either fallback on HTML or LaTeX specific -solutions, usually littered with \`#+ATTR' clauses to pass around -configurations or parameters. - -Efforts have been exerted to mitigate the trouble of producing new -special blocks. However, the issue of passing parameters is still -handled in a clumsy fashion; e.g., by having parameters be expressed -in a special block's content using specific keywords. - -We present a novel approach to making special blocks in a familiar -fashion and their use also in a familiar fashion. We achieve the -former by presenting \`\`defblock'', an anaphoric macro exceedingly -similar to \`\`defun'', and for the latter we mimic the usual -\`\`src''-block syntax for argument passing to support special blocks. - -For instance, here is a sample declaration. - - (defblock stutter () (reps 2) - "Output the CONTENTS of the block REPS many times" - (org-parse (s-repeat reps contents))) - -Here is an invocation that passes an *optional* argument; which -defaults to 2 when not given. - -
-

-Emacs for the win ⌣̈ -

- -
- -Upon export, to HTML or LaTeX for instance, the contents of this block -are repeated (\`stuttered') 5 times. The use of \`\`src''-like -invocation may lead to a decrease in \`#+ATTR' clauses. - -In the presentation, we aim to show a few \`practical' special blocks -that users may want: A block that … - -- translates *some selected* text —useful for multilingual blogs -- hides *some selected* text —useful for learning, quizzes -- folds/boxes text —useful in blogs for folding away details - -In particular, all of these examples will be around ~5 lines long! - -We also have a larger collection of more useful block types, already -implemented. - -The notable features of the system are as follows. - -- Familiar \`\`defun'' syntax for making block —\`\`defblock'' -- Familiar \`\`src'' syntax for passing arguments —e.g., \`\`:key - value'' -- Fine-grained control over export translation phases —c.f., - \`\`org-parse'' above -- **Modular**: New blocks can be made out of existing blocks really - quickly using \`\`blockcall'' —similar to Lisp's \`\`funcall''. We - will show how to fuse two blocks to make a new one, also within ~5 - lines. - -It is hoped that the ease of creating custom special blocks will be a -gateway for many Emacs users to start using Lisp. - - - - +[[!inline pages="../info/22" raw="yes"]] Back to the [[schedule]] Previous: Emacs development update -- cgit v1.2.3