Skip to content

Commit

Permalink
Properties standardized to MS_ prefix
Browse files Browse the repository at this point in the history
According to Yantar / Ihor, this is the way.  It looks consistent to the user,
so I concur.  In a crazily complex presentation, the MS_ propertiess should
cluster together.

Signed-off-by: Psionik K <[email protected]>
  • Loading branch information
psionic-k committed May 8, 2024
1 parent f130bed commit 199bb5b
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 36 deletions.
6 changes: 3 additions & 3 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ The out-of-the-box experience can be a bit messy due to property drawers, keywor
** Heading Properties
Headings are treated as slides. Slides have actions. Actions are configured in the property drawer.

- =SLIDE_ACTION=: Usually narrows to the slide. Lifecycle encloses the section.
- =SLIDE_SECTION_ACTIONS:= Most commonly customized. You can list multiple actions. Each one will step through its forward and backward steps.
- =SLIDE_CHILD_ACTION=: Used to customize if and how child headings become slides
- =MS_SLIDE_ACTION=: Usually narrows to the slide. Lifecycle encloses the section.
- =MS_SECTION_ACTIONS:= Most commonly customized. You can list multiple actions. Each one will step through its forward and backward steps.
- =MS_CHILD_ACTION=: Used to customize if and how child headings become slides

Some actions must be fully enclosed by the lifecycle of a surrounding action, such as narrowing to the headline and section before displaying a contained list item-by-item.

Expand Down
48 changes: 24 additions & 24 deletions macro-slides.el
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,8 @@ contain any elements they act on. You can add classes to this
list in order to have default behaviors for some org elements.
You can configure this per-heading by setting the
SLIDE_SECTION_ACTIONS keyword. You can configure it for the
document default by adding an SLIDE_SECTION_ACTIONS keyword."
MS_SECTION_ACTIONS keyword. You can configure it for the
document default by adding an MS_SECTION_ACTIONS keyword."
:type '(list function)
:group 'macro-slides)

Expand All @@ -315,8 +315,8 @@ Value is an action class, usually extending
the child headings, which come after the section element.
You can configure this per-heading by setting the
SLIDE_CHILD_ACTION keyword. You can configure it for the
document default by adding an SLIDE_CHILD_ACTION keyword."
MS_CHILD_ACTION keyword. You can configure it for the
document default by adding an MS_CHILD_ACTION keyword."
:type 'function
:group 'macro-slides)

Expand All @@ -326,9 +326,9 @@ Value should be a custom class extending `ms'. You
can override methods if the built-in implementation is
insufficient. Consider upstreaming changes.
You can configure this per heading by setting the SLIDE_CLASS
You can configure this per heading by setting the MS_CLASS
property. You can configure it for the document default by
adding an SLIDE_CLASS keyword."
adding an MS_CLASS keyword."
:type 'symbol
:group 'macro-slides)

Expand All @@ -337,7 +337,7 @@ adding an SLIDE_CLASS keyword."
Value should be a custom class extending `ms-deck'.
Use this to modify the root-level behaviors, including switching
to children and finding siblings. You can configure this for the
document by adding the SLIDE_ROOT_CLASS keyword."
document by adding the MS_ROOT_CLASS keyword."
:type 'symbol
:group 'macro-slides)

Expand All @@ -348,9 +348,9 @@ The function used as actions should accept an org element, a
`headline' type element and return it if it is a valid heading or
return nil if it should be skipped.
You can configure this per heading by setting the SLIDE_FILTER
You can configure this per heading by setting the MS_FILTER
keyword. You can configure it for the document default by adding
an SLIDE_FILTER keyword."
an MS_FILTER keyword."
:type 'function
:group 'macro-slides)

Expand Down Expand Up @@ -1085,11 +1085,11 @@ Many optional ARGS. See code."
;; Hydrate the slide's configuration as classes and arguments and then
;; instantiate them all.
(let* ((keywords (org-collect-keywords
'("SLIDE_ACTION"
"SLIDE_SECTION_ACTIONS"
"SLIDE_CHILD_ACTION"
"SLIDE_FILTER"
"SLIDE_CLASS")))
'("MS_SLIDE_ACTION"
"MS_SECTION_ACTIONS"
"MS_CHILD_ACTION"
"MS_FILTER"
"MS_CLASS")))

(args `(:inline ,inline))

Expand All @@ -1099,8 +1099,8 @@ Many optional ARGS. See code."
(slide-action-class
(or slide-action-class
(if-let ((declared
(or (org-element-property :SLIDE_ACTION heading)
(cdr (assoc-string "SLIDE_ACTION"
(or (org-element-property :MS_SLIDE_ACTION heading)
(cdr (assoc-string "MS_SLIDE_ACTION"
keywords)))))
(ms--parse-class-with-args declared)
ms-default-slide-action)))
Expand All @@ -1125,8 +1125,8 @@ Many optional ARGS. See code."
;; the restriction.
(section-action-classes
(or (ms--parse-classes-with-args
(or (org-element-property :SLIDE_SECTION_ACTIONS heading)
(cdr (assoc-string "SLIDE_SECTION_ACTIONS" keywords))))
(or (org-element-property :MS_SECTION_ACTIONS heading)
(cdr (assoc-string "MS_SECTION_ACTIONS" keywords))))
ms-default-section-actions))
(section-actions
(mapcar
Expand All @@ -1141,8 +1141,8 @@ Many optional ARGS. See code."
(child-action-class
(or child-action-class
(if-let ((declared
(or (org-element-property :SLIDE_CHILD_ACTION heading)
(cdr (assoc-string "SLIDE_CHILD_ACTION"
(or (org-element-property :MS_CHILD_ACTION heading)
(cdr (assoc-string "MS_CHILD_ACTION"
keywords)))))
(ms--parse-class-with-args declared)
ms-default-child-action)))
Expand All @@ -1163,13 +1163,13 @@ Many optional ARGS. See code."

(filter
(or (ms--filter
(or (org-element-property :SLIDE_FILTER heading)
(cdr (assoc-string "SLIDE_FILTER" keywords))))
(or (org-element-property :MS_FILTER heading)
(cdr (assoc-string "MS_FILTER" keywords))))
ms-default-filter))
(class
(or (ms--parse-class-with-args
(or (org-element-property :SLIDE_CLASS heading)
(cdr (assoc-string "SLIDE_CLASS"
(or (org-element-property :MS_CLASS heading)
(cdr (assoc-string "MS_CLASS"
keywords))))
ms-default-class)))

Expand Down
18 changes: 9 additions & 9 deletions test/demo.org
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Wow, these breadcrumbs are very high-carb
How many levels of headings could there be?
* Inline Children
:PROPERTIES:
:SLIDE_CHILD_ACTION: ms-child-action-inline
:MS_CHILD_ACTION: ms-child-action-inline
:END:
- You won't believe these animations
- This is the world's greatest presentation software
Expand All @@ -29,7 +29,7 @@ This is a reason to be alive
[[https://www.youtube.com/watch?v=Ct6BUPvE2sM][In case you live under a rock]]
* Reveal Items
:PROPERTIES:
:SLIDE_SECTION_ACTIONS: ms-action-item-reveal
:MS_SECTION_ACTIONS: ms-action-item-reveal
:END:
Positron is deeply committed to bringing you the finest in:
- Pen 🖊️
Expand All @@ -38,8 +38,8 @@ Positron is deeply committed to bringing you the finest in:
- Pen 🖊️
* Flat Slide
:PROPERTIES:
:SLIDE_ACTION: ms-action-narrow :with-children t
:SLIDE_CHILD_ACTION: nil
:MS_SLIDE_ACTION: ms-action-narrow :with-children t
:MS_CHILD_ACTION: nil
:END:
This slide shows its child headings inline.
- The slide action shows the entire contents, not just the section
Expand All @@ -56,8 +56,8 @@ This slide has a child, but it will not be displayed. It will only run the babe
Can has display?
** No Display! Only Execute!
:PROPERTIES:
:SLIDE_ACTION: nil
:SLIDE_SECTION_ACTIONS: ms-action-babel
:MS_SLIDE_ACTION: nil
:MS_SECTION_ACTIONS: ms-action-babel
:END:
These three org blocks will not be displayed since this slide has no slide action. They will however execute when navigating forward and backward. Note these features:

Expand Down Expand Up @@ -99,7 +99,7 @@ Our cleanup is always run
#+end_src
* Babel Slide Integration
:PROPERTIES:
:SLIDE_SECTION_ACTIONS: ms-action-babel
:MS_SECTION_ACTIONS: ms-action-babel
:END:

Both backwards and forward are supported on this slide.
Expand Down Expand Up @@ -142,7 +142,7 @@ Both backwards and forward are supported on this slide.

* Image Slides
:PROPERTIES:
:SLIDE_SECTION_ACTIONS: ms-action-image
:MS_SECTION_ACTIONS: ms-action-image
:END:
This is an image slide. You can view the images inline using ~org-toggle-inline-images~. Each image will be opened in a full-screen buffer, which is configured to act as a slide, so it still responds to the keybindings.

Expand All @@ -152,7 +152,7 @@ This is an image slide. You can view the images inline using ~org-toggle-inline
[[./images/before-google3.jpeg]] [[./images/all-software-is-the-same-with-tang.jpeg]]
* Package Integration
:PROPERTIES:
:SLIDE_SECTION_ACTIONS: ms-action-babel
:MS_SECTION_ACTIONS: ms-action-babel
:END:
- Let arbitrary buffers be shown while still completing steps within the slide-show
- Run babel against other buffers 😈
Expand Down

0 comments on commit 199bb5b

Please sign in to comment.