[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dslide a82ef64c7c: Only abort playback on C-g. WIP
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dslide a82ef64c7c: Only abort playback on C-g. WIP |
Date: |
Sun, 29 Dec 2024 09:59:42 -0500 (EST) |
branch: elpa/dslide
commit a82ef64c7c9fcef2cfda4d4bd2903a145ade525b
Author: Psionik K <73710933+psionic-k@users.noreply.github.com>
Commit: Psionik K <73710933+psionic-k@users.noreply.github.com>
Only abort playback on C-g. WIP
During recording, I noticed certain last-input-events such as:
(file-notify ((30 . 0) (modify) "2024-12-29 21-00-31.mkv" 0)
file-notify--callback-inotify
These are not so helpful, but since I don't immediately know the range of
other
such inputs, it was better to relax the checks.
C-g is supported. Most users should know it and it will stop errant macros
from
proceeding to destroy the system.
The comprehensive solution is to prevent fat-finger inputs in the first
place.
It would be better to also support having the macro just dump remaining
events
into unread-command-events whenever direction keys are called during
playback.
I might still want to bind in the special map to block unwanted fat
fingers. It
is the only way to ensure that they don't corrupt the recorded sequence.
---
NEWS.org | 1 +
dslide.el | 7 ++-----
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/NEWS.org b/NEWS.org
index 07de37b1f3..11422f6898 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -29,6 +29,7 @@ Fixing bugs and filling some gaps in new features.
- ~dslide-deck-forward~ no longer no-ops in some circumstances
- kmacro action properly skips over non-matching directions when both forward
and backward elements are present in a slide
- 🚧 kmacro playback of =M-<return>= and =M-<backspace>= and others is now
correct. There are likely more events that don't round trip nicely from
~last-kbd-macro~ through ~key-description~ and back through ~read-kbd-macro~.
*File issues*.
+- 🚧 kmacro playback no longer aborts when inputs from file-notify etc occur.
It can be quit with =C-g=. A more comprehensive solution is being developed.
* v0.6.0 Fighting Spam 💌
- There is less markup (especially for babel)
- Old actions are easier to use
diff --git a/dslide.el b/dslide.el
index 5363f3ba04..e68e969356 100644
--- a/dslide.el
+++ b/dslide.el
@@ -2079,9 +2079,8 @@ some other input event and quit."
(let ((frequency (plist-get args :frequency))
(jitter (plist-get args :jitter))
(events (plist-get args :events))
- (last-input (plist-get args :last-input))
(index (plist-get args :index)))
- (if (eq last-input last-input-event)
+ (if (not (eq last-input-event 7))
(if (length> events index)
(let ((k (aref events index)))
(setq unread-command-events (if unread-command-events
@@ -2092,14 +2091,12 @@ some other input event and quit."
(run-with-timer
(dslide--laplace-jitter frequency jitter)
nil #'dslide--kmacro-reanimate
- :last-input k
:events events :index (1+ index)
:frequency frequency :jitter jitter)))
(setq dslide--kmacro-timer nil))
;; TODO attempt to block unwanted input. Test other implementations.
(setq dslide--kmacro-timer nil)
- (message "Out-of-band input detected: %s" last-input-event)
- (message "Aborting playback."))))
+ (message "Playback quit."))))
(defun dslide--laplace-jitter (freq jitter)
"Mutate FREQ by JITTER shape parameter.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/dslide a82ef64c7c: Only abort playback on C-g. WIP,
ELPA Syncer <=