emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/dslide 6015821eda 20/21: half-hot fix for action duplicati


From: ELPA Syncer
Subject: [nongnu] elpa/dslide 6015821eda 20/21: half-hot fix for action duplication
Date: Tue, 17 Dec 2024 13:00:56 -0500 (EST)

branch: elpa/dslide
commit 6015821eda2d376c6203472bd97f49186a81d5e2
Author: Psionik K <73710933+psionic-k@users.noreply.github.com>
Commit: Psionik K <73710933+psionic-k@users.noreply.github.com>

    half-hot fix for action duplication
    
    Will be very glad when this code goes away in the road to 1.0
    
    It's only just slightly correct and very much still wrong if anyone got 
plist
    default actions working
---
 NEWS.org  |  1 +
 dslide.el | 12 ++++++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/NEWS.org b/NEWS.org
index 8e81f334e7..e990d07b7e 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -65,6 +65,7 @@ The propertize action is the closest one to working like they 
will in 0.7.0.  
 - Window scroll when opening the contents was unreliable.  The call to 
~recenter~ was replaced with a ~scroll-down~ to pull the header into view.  
*Let me know if this doesn't work for you*.  *Stop just suffering in silence.*
 - ~dslide-deck-stop~ when called in the contents will leave the contents and 
return to the presentation.  It seemd unintuitive to quite from the contents 
view.
 - 🚧 ~dslide-deck-develop~ is a bit smarter. It may also be dumber.  There's a 
lot of states it can be called in.  The happy path seems okay.
+- 🚧 ~dslide-default-actions~ could result in duplicate actions.  This caused 
issues with images when going in reverse if they were both configured and 
present in the default actions list.  This entire behavior will go away in 
0.7.0.
 * v0.5.6 Let There Be News 🗞️
 - ⛔ The concept of default actions has been marked for deprecation.  This is 
preparation for instantiating actions on-demand rather than per slide.  The 
action system may undergo some overhaul internally.
   + Markup will be reduced, not changed
diff --git a/dslide.el b/dslide.el
index 80481fcc94..01256fdfbd 100644
--- a/dslide.el
+++ b/dslide.el
@@ -1177,10 +1177,14 @@ Many optional ARGS.  See code."
            ;; in an inline child versus an independent slide, even by looking 
at
            ;; the restriction.
            (section-action-classes
-            (append (dslide--parse-classes-with-args
-                     (or (org-element-property :DSLIDE_ACTIONS heading)
-                         (cdr (assoc-string "DSLIDE_ACTIONS" keywords))))
-                    dslide-default-actions))
+            (let* ((provided (dslide--parse-classes-with-args
+                              (or (org-element-property :DSLIDE_ACTIONS 
heading)
+                                  (cdr (assoc-string "DSLIDE_ACTIONS"
+                                                     keywords)))))
+                   (cars (mapcar (lambda     (s) (if (symbolp s) s (car s))) 
provided)))
+              (append provided (seq-difference
+                                dslide-default-actions
+                                cars))))
            (section-actions
             (mapcar
              (lambda (c) (and c (apply (if (consp c) (car c) c)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]