Comments (10)
Additionally, for the quoted list stuff I mentioned above, it does the same thing for function literal syntax using #
in Clojure. Its probably for any character in front of a form, not just quotes.
Edit -- actually, the behavior is slightly different for Clojure.
from lispy.
lispy-delete-backwards isn't working properly with braces {}. To reproduce, try lispy-delete-backwards from inside {-|-}. Throws Variable binding depth exceeds max-specpdl-size. If the braces are inside a list, e.g. (1 2 3 {-|-}), lispy-delete-backwards will actually blow away the entire containing list, too. It seems to be working properly for brackets and parens.
I'm guessing you're getting this error in Elisp, not in Clojure.
This is because Elisp has a different syntax for {}
than for ()
.
You can test this by calling backward-list
from:
(1 2 3 {}|)
So this bug will only surface in the case of {}
in Elisp code, which
should not actually contain them. A way to overcome this is to
override the Elisp syntax table, but I don't know if a minor mode
should do this.
I'll look into fixing the other thing shortly.
from lispy.
Yes, you are right. It throws that for Elisp, not Clojure. I ran into it because I accidentally inserted a brace into Elisp and trying to delete it made me notice the issues above. Since this should be pretty rare, it should be ok as is.
from lispy.
For the quote behavior in Clojure, backward deletion does this --
(def quot-list '(|1 2 3))
--> (def quot-list ')|
from lispy.
This should happen now:
(def quot-list (1 2 3) '(|1 2 3))
->
(def quot-list (1 2 3)|)
from lispy.
I like this deletion behavior mostly for:
(progn
(asdf)
(|))
->
(progn
(asdf)|)
This is the case when I wanted to write one more statement and
realized that it's not necessary. After this I'll probably want to be
in special, since I've finished writing something.
from lispy.
Cool, looks great. That behavior looks good to me.
from lispy.
If you have the time and the will, please
have a look at https://github.com/abo-abo/lispy/tree/deletion.
It re-defines deletion for many cases.
I plan to merge it into master after testing it for a few days. Suggestions and corrections are welcome.
from lispy.
I took a look at the code on the deletion
branch, mostly at the test cases demonstrating the changes in behavior.
I think the behavior you're aiming for with your altered deletion logic is a step in the right direction and I think it makes much more intuitive sense.
I haven't tested the code, but I think you're going the right way with those changes. 👍
from lispy.
Most of the things discussed in this thread should be fixed now. If
new problems with deletions arise, just start a new issue to make
things less cluttered.
from lispy.
Related Issues (20)
- `make test` fails
- Repeat self-insert-command does not. HOT 4
- Package specifier is interpreted as start of new symbol in Common lisp. HOT 6
- EOL comment makes ";" comment one more s-exp
- `(#:a->b)` is formatted as `(#:(ly-raw symbol "a->b"))` HOT 2
- lispy unexpectedly expands shorthands in elisp HOT 1
- lispy-toggle-thread-last fails with comments HOT 1
- Consider importing gnureadline instead of readline when necessary
- Consider making native completion optional or consistent with "python-shell-completion-native-enable"
- Feature request: possibility to enable just some of the keybindings.
- `lispy-tab` doesn't respect `indent-tabs-mode`
- Add support for treesit mode
- Add support for Fennel and/or Lua HOT 1
- conflicting key mapping in evilcp theme?
- Error with Clojure evaluation HOT 7
- Port to R?
- Numbered anonymous function arguments are being incorrectly auto-formatted
- Fix warning on Emacs 30 related to deprecated (defadvice) macro
- jedi should not be imported into the active (lispy--python-proc) HOT 2
- org-elements "cannot be used in non-org buffer"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lispy.