Skip to content

Commit 0f123e3

Browse files
committed
Rename DSLIDE_SECTION_ACTIONS -> DSLIDE_ACTIONS
A followup to the removal of the child action. There is less need to be distinct, and this simplifies the configuration API just a bit more. While `section-actions' is still used internally in some places, and its meaning should be well understood by org hackers. Signed-off-by: Psionik K <73710933+psionic-k@users.noreply.github.com>
1 parent 32547db commit 0f123e3

File tree

3 files changed

+30
-28
lines changed

3 files changed

+30
-28
lines changed

README.org

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,12 @@ If you display the slideshow in one window or frame, you can configure the point
6464
- *Deck*: an object that is used to relate the display and base buffer and is the root of all sequences. It's another word for "presentation" or PT.
6565
- *Slide*: an object that interprets an org heading to hydrate its actions
6666
- *Action*: an object that responds to ~dslide-deck-forward~ and ~dslide-deck-backward~ calls and implements lifecycle methods to initialize and clean up state
67+
+ *Slide Action*: an action subclass that handles initial display of the slide and creation of child slides from sub-headings.
68+
+ *Section Actions*: actions that typically control the display and behavior of a heading's section, the region between the headline and child headings.
6769
- *Step*: a single call to ~dslide-deck-foward~ or ~dslide-deck-backward~, usually delegated down to ~dslide-forward~ and ~dslide-backward~ methods
68-
- *Contents*: use org folding to create a view of folded headings to quickly navigate slides
70+
- *Contents*: A view of the folded root headings that is used for quickly navigating between headings during a presentation.
6971
- *Slide Buffer*: the slides are shown in an indirect buffer that is cloned from your org document buffer. The source is called the *base buffer*. Check for the =deck: my-presentation.org= buffer name.
70-
+ Inderect buffer and =slide-buffer= are used interchangeably
72+
+ Indirect buffer and =slide-buffer= are used interchangeably
7173
+ Base buffer or =base-buffer= is used pretty exclusively
7274
* Configuring
7375
Be sure to check =M-x= ~customize-group~ =dslide= to see all declared custom variables. All of the variables are configured to recommended defaults except hooks, which would depend on other packages usually.
@@ -120,7 +122,7 @@ The out-of-the-box experience can be a bit messy due to property drawers, keywor
120122
Headings are treated as slides. Slides have actions. Actions are configured in the property drawer.
121123

122124
- =DSLIDE_SLIDE_ACTION=: Usually narrows to the slide and creates children from child headings. Lifecycle encloses the section.
123-
- =DSLIDE_SECTION_ACTIONS:= Most commonly customized. You can list multiple actions. Each one will step through its forward and backward steps.
125+
- =DSLIDE_ACTIONS:= Most commonly customized. You can list multiple actions. Each one will step through its forward and backward steps.
124126

125127
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.
126128

@@ -141,14 +143,14 @@ Many actions understand arguments, allowing tuning of similar behaviors from the
141143
Configuring the slot is done by adding plist-style properties after the class name:
142144
#+begin_src org
143145
:PROPERTIES:
144-
:DSLIDE_SECTION_ACTIONS: dslide-action-item-reveal :inline t
146+
:DSLIDE_ACTIONS: dslide-action-item-reveal :inline t
145147
:END:
146148
#+end_src
147149
You can also use "property+" syntax to add to a property, and these accept plist arguments too:
148150
#+begin_src org
149151
:PROPERTIES:
150-
:DSLIDE_SECTION_ACTIONS: dslide-action-babel
151-
:DSLIDE_SECTION_ACTIONS+: dslide-action-images :fullscreen t
152+
:DSLIDE_ACTIONS: dslide-action-babel
153+
:DSLIDE_ACTIONS+: dslide-action-images :fullscreen t
152154
:END:
153155
#+end_src
154156
* Customizing
@@ -310,7 +312,7 @@ A consequence of this is that there are usually multiple actions alive at once.
310312
** Work In Progress 🚧
311313
Open issues and give feedback on feature requests. Contributions welcome.
312314
*** Secondary Commands
313-
See the section about bindings for context. Video play or other situations where the presentation might branch should be supported by overloading the behavior of ~dslide-deck-start~
315+
See the section about bindings for context. Video play or other situations where the presentation might branch should be supported by overloading the behavior of ~dslide-deck-start~. I think this command will turn into ~dslide-deck-secondary~ in the ~dslide-mode-map~.
314316
*** ~dslide-goto~, starting from point
315317
Since not many actions currently have implemented this very accurately, playing from point is likely not that accurate. Progress updating in the base buffer is also currently only at the slide level of granularity.
316318
*** Affiliated Buffers

dslide.el

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ again. `dslide-deck-stop' is another good choice."
295295
"Action class with lifecycle around the section actions.
296296
When stepping forward or backward, it is called before any
297297
section action. It's normal purpose is to update the buffer
298-
restriction before section-actions are run.
298+
restriction before section actions are run.
299299
300300
You can configure this per-heading by setting the
301301
SLIDE_ACTION keyword. You can configure it for
@@ -305,7 +305,7 @@ keyword."
305305
:group 'dslide)
306306

307307
;; TODO test the use of plist args
308-
(defcustom dslide-default-section-actions '()
308+
(defcustom dslide-default-actions '()
309309
"Actions that run within the section display action lifecycle.
310310
It's value is a list of symbol `dslide-action' sub-classes or (CLASS . ARGS)
311311
forms where ARGS is a plist. Each subclass will be instantiated
@@ -316,9 +316,9 @@ Many section actions are no-op whenever the content doesn't
316316
contain any elements they act on. You can add classes to this
317317
list in order to have default behaviors for some org elements.
318318
319-
You can configure this per-heading by setting the
320-
DSLIDE_SECTION_ACTIONS keyword. You can configure it for the
321-
document default by adding an DSLIDE_SECTION_ACTIONS keyword."
319+
You can configure this per-heading by setting the DSLIDE_ACTIONS
320+
keyword. You can configure it for the document default by adding
321+
an DSLIDE_ACTIONS keyword."
322322
:type '(list function)
323323
:group 'dslide)
324324

@@ -883,7 +883,7 @@ created. See `dslide-default-slide-action'.")
883883
:initform nil :initarg :section-actions
884884
:documentation "Typical actions that work on the section.
885885
Live within slide action lifecycle. See
886-
`dslide-default-section-actions'.")
886+
`dslide-default-actions'.")
887887
(begin
888888
:initform nil :initarg :begin
889889
:documentation "Marker for retrieving this heading's org element."))
@@ -971,7 +971,7 @@ may be refactored out."
971971
;; instantiate them all.
972972
(let* ((keywords (org-collect-keywords
973973
'("DSLIDE_SLIDE_ACTION"
974-
"DSLIDE_SECTION_ACTIONS"
974+
"DSLIDE_ACTIONS"
975975
"DSLIDE_FILTER"
976976
"DSLIDE_CLASS")))
977977

@@ -1012,9 +1012,9 @@ may be refactored out."
10121012
;; the restriction.
10131013
(section-action-classes
10141014
(or (dslide--parse-classes-with-args
1015-
(or (org-element-property :DSLIDE_SECTION_ACTIONS heading)
1016-
(cdr (assoc-string "DSLIDE_SECTION_ACTIONS" keywords))))
1017-
dslide-default-section-actions))
1015+
(or (org-element-property :DSLIDE_ACTIONS heading)
1016+
(cdr (assoc-string "DSLIDE_ACTIONS" keywords))))
1017+
dslide-default-actions))
10181018
(section-actions
10191019
(mapcar
10201020
(lambda (c) (when c

test/demo.org

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
2. Press the right arrow key ➡️
88
** Controls
99
:PROPERTIES:
10-
:DSLIDE_SECTION_ACTIONS: dslide-action-item-reveal
10+
:DSLIDE_ACTIONS: dslide-action-item-reveal
1111
:END:
1212
See the ~dslide-mode-map~ but basically, arrow keys.
1313
- right arrow ➡️ ~dslide-deck-forward~
@@ -16,7 +16,7 @@ See the ~dslide-mode-map~ but basically, arrow keys.
1616
- down arrow ⬇️ ~dslide-deck-stop~
1717
*** Contents View
1818
:PROPERTIES:
19-
:DSLIDE_SECTION_ACTIONS: dslide-action-item-reveal
19+
:DSLIDE_ACTIONS: dslide-action-item-reveal
2020
:END:
2121
After a presentation is started, up arrow ⬆️ goes to the contents view.
2222

@@ -79,7 +79,7 @@ This slide shows its child headings inline.
7979
- Failure is an option
8080
* Reveal Items
8181
:PROPERTIES:
82-
:DSLIDE_SECTION_ACTIONS: dslide-action-item-reveal
82+
:DSLIDE_ACTIONS: dslide-action-item-reveal
8383
:END:
8484
Positron is deeply committed to bringing you the finest in:
8585
- Pen 🖊️
@@ -88,7 +88,7 @@ Positron is deeply committed to bringing you the finest in:
8888
- Pen 🖊️
8989
* Image Slides
9090
:PROPERTIES:
91-
:DSLIDE_SECTION_ACTIONS: dslide-action-image
91+
:DSLIDE_ACTIONS: dslide-action-image
9292
:END:
9393
- The action will automatically turn on inline images so you don't have to remember to run ~org-toggle-inline-images~.
9494
- The image buffer is configured to act as a slide, so it still responds to the keybindings.
@@ -99,7 +99,7 @@ Positron is deeply committed to bringing you the finest in:
9999
[[./images/before-google3.jpeg]] [[./images/all-software-is-the-same-with-tang.jpeg]]
100100
* No Header Slide
101101
:PROPERTIES:
102-
:DSLIDE_SLIDE_ACTION: dslide-action-narrow :header nil
102+
:DSLIDE_ACTION: dslide-action-narrow :header nil
103103
:END:
104104
- The content and heading are still displayed
105105
- The slide-in effect still works
@@ -108,7 +108,7 @@ Positron is deeply committed to bringing you the finest in:
108108
=M-x describe-symbol dslide-action-narrow=
109109
* Babel Slide Integration
110110
:PROPERTIES:
111-
:DSLIDE_SECTION_ACTIONS: dslide-action-babel
111+
:DSLIDE_ACTIONS: dslide-action-babel
112112
:END:
113113
Go 2-3 steps forwards and then backwards. This slide also supports starting at the end. Just go to the next slide and back up.
114114
#+attr_dslide: begin end
@@ -153,7 +153,7 @@ Can has display?
153153
** No Display! Only Execute!
154154
:PROPERTIES:
155155
:DSLIDE_SLIDE_ACTION: nil
156-
:DSLIDE_SECTION_ACTIONS: dslide-action-babel
156+
:DSLIDE_ACTIONS: dslide-action-babel
157157
:END:
158158
These four 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:
159159

@@ -195,7 +195,7 @@ Our cleanup is always run, after everything
195195
#+end_src
196196
* Package Integration
197197
:PROPERTIES:
198-
:DSLIDE_SECTION_ACTIONS: dslide-action-babel
198+
:DSLIDE_ACTIONS: dslide-action-babel
199199
:END:
200200
- You need the ~master-of-ceremonies~ package installed to complete this slide.
201201
- Let arbitrary buffers be shown while still completing steps within the slide-show.
@@ -229,7 +229,7 @@ Our cleanup is always run, after everything
229229
#+end_src
230230
* Babel is every Feature
231231
:PROPERTIES:
232-
:DSLIDE_SECTION_ACTIONS: dslide-action-babel
232+
:DSLIDE_ACTIONS: dslide-action-babel
233233
:END:
234234
If a feature seems like it's missing, it can probably be added. There is a babel block below this paragraph, but if you are viewing this presentation, you won't see it because it has hidden itself with an overlay. File an issue, but don't be held back. A quick hunk of [[info:elisp#Top][elisp]] can solve every problem.
235235
#+attr_dslide: begin end
@@ -262,7 +262,7 @@ Positron is cheating and also apply custom line-spacing and line-height. While
262262
Bind the command ~dslide-deck-start~ in the ~org-mode-map~. Any key will do.
263263
** Custom Actions
264264
:PROPERTIES:
265-
:DSLIDE_SECTION_ACTIONS: dslide-action-babel
265+
:DSLIDE_ACTIONS: dslide-action-babel
266266
:END:
267267
The babel block below is a custom action supporting both forward, each step making a paragraph red when going forward or removing the red when going backward. Key methods you want to use in your custom actions:
268268
- ~dslide-section-next~
@@ -306,7 +306,7 @@ The babel block below is a custom action supporting both forward, each step maki
306306
#+end_src
307307
*** Custom Action Demo
308308
:PROPERTIES:
309-
:DSLIDE_SECTION_ACTIONS: dslide-action-red-paragraphs
309+
:DSLIDE_ACTIONS: dslide-action-red-paragraphs
310310
:END:
311311
Massachusetts, in particular, has always been one of the laboratories of democracy. It's where people try things before they're popular. It's where we experiment.
312312

0 commit comments

Comments
 (0)