-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace evil -- first pass #118
Open
devcarbon-com
wants to merge
117
commits into
drym-org:2.0-integration
Choose a base branch
from
devcarbon-com:refactor/remove-dependency-on-evil
base: 2.0-integration
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
117 commits
Select commit
Hold shift + click to select a range
b71c30c
Fix links to point to current repo home at drym-org
countvajhula 2588a52
Deprecate the Hydra modal provider
countvajhula 88a016f
remove a leftover reference to `symex-modal-backend`
countvajhula 7c10bc9
make a sentence a bit more clear
countvajhula caac021
note todo re: `symex-define-command`
countvajhula ecc9cfa
Add a basic `symex-define-command` macro
countvajhula b9d7921
abstract "tidy" operation over lisp and ts
countvajhula 79ae4c5
define "clear" using `symex-define-command`
countvajhula 73e5858
move/rename some interfaces to better reflect abstraction level
countvajhula 313aca6
define "replace" as a proper primitive operation
countvajhula 6490b64
Add `symex-define-insertion-command` macro
countvajhula cfaa4b6
define "open after" as an insertion command
countvajhula 518697c
define "open before" as an insertion command
countvajhula 3e3b164
note some todos
countvajhula e33e649
extract ts tidying and selection since it's in the wrapping command m…
countvajhula 3f716ea
define deletion using the command macro
countvajhula 00558f4
define more insertion commands using the macro
countvajhula e9f88ad
avoid startup issue with macro being undefined
countvajhula 4f41375
reuse deletion code in `change`
countvajhula 529190d
undo `change` with single undo, and follow this for all commands
countvajhula f3b51c9
declare emacs indent style for command macros
countvajhula d57b3a2
declare most transformations formally as symex commands
countvajhula eeff17d
fix symex-replace so undo works in one step
countvajhula f909f67
fix a selection issue affecting most commands wrt indented symexes
countvajhula bed2cf3
Improve primitive Lisp parsers
countvajhula d80a89d
improve primitive "up" motion to ensure valid posterior selection
countvajhula 5ede7bb
Improve Lisp paste primitives
countvajhula 051d05b
Simplify lisp tidy feature
countvajhula 1b8053f
fix paste-after to select the pasted expression
countvajhula 45bb156
a "hack" to enter strings
countvajhula acc34c3
don't stray from line on visual line motions
countvajhula f9009d5
fix hanging whitespace in append-newline
countvajhula ee470d5
fix infinite loop in shifting forward "the most" at the top level
countvajhula 02557fc
fix join joining to previous on last expression (do nothing instead)
countvajhula 2dc61c9
fix some calls to symex-tidy
countvajhula e948219
fix eval-print which was printing the next expression
countvajhula 8ca5d31
simplify join-lines implementation
countvajhula cf3184d
tidy all affected symexes after joining lines
countvajhula 67d0195
fix infinite loop in tidy-affected when on last symex
countvajhula 6b1e09c
improve tidy-affected implementation, don't mutate point
countvajhula f052466
tidy affected symexes in appending newlines too
countvajhula 119ca59
commit low-level utility that was left out
countvajhula 0c996b7
improve lisp deletion primitive to handle a case better
countvajhula b6b763d
fix trailing whitespace in tidying
countvajhula 55f7ebf
better handle another case in deletion
countvajhula a288ff4
fix open line below in the presence of an inline comment
countvajhula 1bf6856
remove unused function
countvajhula 2fe0076
rename functions to reflect toplevel private/public correctly
countvajhula f779d28
fix name
countvajhula fdd0945
handle a corner case in lisp primitive forward motion
countvajhula 5a618cf
improve tidy-affected implementation, esp fix initial behavior
countvajhula c036020
improve paste implementation, handle some edge cases better
countvajhula 973e673
add an extra newline in pasting at the toplevel for "island" symexes
countvajhula 1e9599e
refine condition for adding newline padding while pasting
countvajhula dda2909
further refine toplevel newline padding criteria during paste
countvajhula d464a96
fix handling of some edge cases in paste
countvajhula 4e8c05f
docs: some tips on debugging with macros present
countvajhula 5d9503d
handle a case more naturally in lisp primitive deletion
countvajhula 7dfa83e
Handle an edge case in adjusting point, at ( | abc ...)
countvajhula 959b1b3
simplify "clear" implementation, handle more cases
countvajhula 0dcc055
improve replace, fix some existing cases and handle more cases
countvajhula 055c833
fix an edge case in join-lines at eol
countvajhula 60ea788
handle more cases in symex-replace
countvajhula f54bec4
fix: nothing needs to be done in clear if already empty
countvajhula 95726d6
fix some cases involving the use of quantifiers in paste-before
countvajhula 6472a16
shed evil-cleverparens dependency
countvajhula a3f08ed
shed lispy dependency
countvajhula f189d13
update some docs
countvajhula 4b95c1e
fix capture backwards when on first symex
countvajhula 9e29994
fix a bug in paste-after that was causing an infinite loop
countvajhula c55260d
a couple of comments
countvajhula 2ae554b
restore proper handling of deletion at eol
countvajhula e824c9d
fix handling of strings in deleting the last element in a multi-line …
countvajhula 6482e0f
fix handling of empty forms in nearest selection
countvajhula 926b325
fix selection after tidy-remaining
countvajhula 6f0e4aa
improve another case in paste-after
countvajhula 0ffbab0
make a note about behavior in an edge case
countvajhula 89d191f
handle eob better in paste-after
countvajhula 824be59
use forward-line instead of next-line (as advised by docs)
countvajhula 6312375
fix delete putting an empty line in the kill ring
countvajhula 07ea112
refactor paste to keep lisp code contained in the primitive layer
countvajhula c2b64cb
improve paste behavior in more corner cases
countvajhula ced5cde
handle a corner case better in adjusting point for emacs/vim
countvajhula 051e197
use forward-line instead of previous-line (as suggested by docs)
countvajhula e6b650c
Merge pull request #107 from countvajhula/more-gardening-2
countvajhula d951d4f
organize emit code for lisp/ts
countvajhula c29e5e1
minor refactor in evaluator
countvajhula 6a143a9
add delete and paste transformations to the DSL
countvajhula 4d0058c
simplify an example in the docs
countvajhula f8a2b6b
fix: incorporate delete/paste result into the traversal computation
countvajhula 3a7b65b
try returning success / failure in delete
countvajhula 11647f4
use forward-line instead of next-line/previous-line
countvajhula 56f331e
implement emit-forward as a Symex traversal with transformation
countvajhula 6467052
count 0 executions as success when looping indefinitely in circuit
countvajhula b01909b
execute arbitrary operations in the DSL
countvajhula f59c782
Implement basic movements as traversals
countvajhula 158c948
change delete syntax to specify "what" rather than a count
countvajhula 64cbf28
Implement emit-forward using the DSL
countvajhula 5d5ac53
handle a low level exception in tidy
countvajhula 20eec1a
make symex-right-p behavior consistent with symex-left-p
countvajhula fe17390
don't change level in nearest selection
countvajhula 30258ab
At the DSL level, paste does not move point
countvajhula 097a8cf
be more explicit about structural recursion in traversal evaluation
countvajhula 304aee1
at the DSL level, don't move point on paste before
countvajhula c8eb739
implement emit backward using the DSL
countvajhula 263e73e
implement capture-backward in the DSL
countvajhula 1a486c2
improve lisp deletion to return a status value
countvajhula 25041ae
handle some low-level exceptions in determining paste padding
countvajhula 4ddaebf
enter an empty form in low level "up" motion for consistency
countvajhula 8aeb068
Improve command macro to preserve underlying return value
countvajhula 533c7c6
handle a corner case in multiline emit/capture backward
countvajhula eceb2ba
Merge pull request #104 from countvajhula/dsl-transformations
countvajhula 1b1bec7
more docs on debugging
countvajhula 242392f
Replace evil -- first pass
devcarbon-com 833f2bd
Fix change delimiter adding extra padding with \"
devcarbon-com 793cb71
Expose user defined mode changes. Stub out evil states.
devcarbon-com ae5eb15
Enter symex mode when evil is available, not just when enabled.
devcarbon-com File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,9 +35,12 @@ | |
(defvar chimera-symex-mode) | ||
(defvar rigpa-mode) | ||
|
||
;; stub out evil-state in case evil is not installed. | ||
(when (not (boundp 'evil-state)) | ||
(setq evil-state nil)) | ||
;; temporary stubbing non-evil modal users | ||
(when (not (boundp 'evil)) | ||
(setq evil-state nil) | ||
(defun evil-emacslike-state ()) | ||
(defun evil-normallike-state ()) | ||
(defun evil-nil-state ())) | ||
|
||
;; misc bindings defined elsewhere | ||
(declare-function rigpa-enter-higher-level "ext:ignore") | ||
|
@@ -89,7 +92,9 @@ right symex when we enter Symex mode." | |
((symex--evil-enabled-p) | ||
(evil-normal-state)) | ||
((symex--evil-installed-p) | ||
(evil-emacs-state)))) | ||
(evil-emacs-state)) | ||
((fboundp 'symex-user-defined-higher-mode) | ||
(symex-user-defined-higher-mode)))) | ||
|
||
(defun symex-enter-lower () | ||
"Exit symex mode via an 'enter'." | ||
|
@@ -99,7 +104,9 @@ right symex when we enter Symex mode." | |
((symex--evil-enabled-p) | ||
(evil-insert-state)) | ||
((symex--evil-installed-p) | ||
(evil-emacs-state)))) | ||
(evil-emacs-state)) | ||
((fboundp 'symex-user-defined-lower-mode) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, we don't need these. When the |
||
(symex-user-defined-lower-mode)))) | ||
|
||
(defun symex-enter-lowest () | ||
"Enter the lowest (manual) editing level." | ||
|
@@ -109,7 +116,9 @@ right symex when we enter Symex mode." | |
((symex--evil-enabled-p) | ||
(evil-insert-state)) | ||
((symex--evil-installed-p) | ||
(evil-emacs-state)))) | ||
(evil-emacs-state)) | ||
((fboundp 'symex-user-defined-lowest-mode) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as others. |
||
(symex-user-defined-lowest-mode)))) | ||
|
||
(defun symex--set-scroll-margin () | ||
"Set a convenient scroll margin for symex mode, after storing the original value." | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@countvajhula I'm not sure if there a is a better way or a standard way of exposing user functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can just use
symex-meow
here rather than expose it to an arbitrary user customization.