-
Notifications
You must be signed in to change notification settings - Fork 145
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
Can't type on sly-mrepl #1
Comments
I can't reproduce, though I've seen that error during development
The ensuing mREPL has no problems, though the fact that you cannot type on the prompt is a feature. Can you perhaps reproduce with a recipe as simple as this? You may need to set |
I'll try with this very latest sbcl, but I doubt it's related to that. There must be something in your configuration. |
I just tried with the emacs -Q -L ... and it works perfectly (although I can't use C-x C-v w to copy presentation to kill ring :'() So it is definetly related to my config. I've ensured that I'm not loading slime and besides the require I only set the inferior-lisp-program variable. I've also disabled my theme just in case. I am at loss as to what conflict can be the cause of the error. Any ideas as to where to start looking? This is the least of minor modes that are active in my config that are not active when loading emacs with the -Q flag. (Undo-Tree Smartparens-Global Smartparens Show-Paren Popwin Ido-Vertical Ido-Everywhere Global-Undo-Tree Global-Fixmee Global-Auto-Revert Global-Auto-Complete Delete-Selection Column-Number) |
@PuercoPop no idea, but now at least we have a starting point. First you can Now for the anti-news: presentations as in |
The error I mentioned was pressing enter twice brought the sly-sldb, so toggle-debug-on-error won't help there. I've tried setting For a more clear picture of what I mean when I press enter twice in the sly loaded with -Q the sly-events-for-sbcl shows the following (twice) (:emacs-channel-send 1
(:process ""))
(:channel-send 1
(:write-values nil))
(:channel-send 1
(:prompt "COMMON-LISP-USER" "CL-USER" 0)) In the othercase you can see that my prompt is being sent as input the second time I press enter. (:emacs-channel-send 1
(:process ""))
(:channel-send 1
(:write-values nil))
(:channel-send 1
(:prompt "COMMON-LISP-USER" "CL-USER" 0))
(:emacs-channel-send 1
(:process "CL-USER> "))
(:channel-send 1
(:prompt "COMMON-LISP-USER" "CL-USER" 1 "#<UNBOUND-VARIABLE CL-USER> {10067A1613}>"))
(:debug 1 1 I'll read up on comint mode and try to find the cause of this issue next weekend. Swank presentations are not a deal breaker but a nice to have. I use them once every often but the Copy to REPL is almost good enough. Keep up the good work. |
When you do |
I'm sorry I didn't read the first sentence of your last reply well enough. I understand that the Common Lisp debugger (sldb) comes up, but I still believe that the |
No, I don't get an elisp backtrace. I have toggle-debug-on-error by default. The problem I encounter is that when I try to type in the REPL I get a |
Ok, trying to inspect the properties of the prompt text or if there was a hidden char I measured the length of the last line using (with-current-buffer "*sly-mrepl for sbcl*"
(end-of-buffer)
(beginning-of-line)
(- (point-max) (point))) I found surprisingly that running the snippet on the functioning sly emacs it returned 0. Which led me to realize that C-a goes to the begining of the prompt where on the malfunctioning sly it goes all the way to the beginning of the line. |
The think about the messages in the echo area is that they are actually errors that are being caught. Tey must be getting caught by a Now, another thing. In the "malfunctioning" sly, is the pressing of "enter" on the prompt that gives you the sldb error?? That shouldn't happen at all as well, so it's very strange. Can you tell me the output for |
@PuercoPop, I have a hunch that I caught your error, and submitted a tentative fix. Can you check if it's working? |
Oi, just checke. it hasn't fixed the issue. The messages buffer is not more informative:
The command self-insert-command is implemented in C so AFAIK I can't use edebug to trace is execution either. Because smartparens advice self-insert-command I tried without smartparens again to no avail.
And C-a is bound to move-start-of-line-or-prev-line whose code is as following (defun move-start-of-line-or-prev-line ()
(interactive)
(if (and (bolp)
(eq last-command 'move-start-of-line-or-prev-line))
(move-beginning-of-line 0)
(move-beginning-of-line nil)) My config is here, just updatated it. Sorry it is a mess. Finally, yes on the malfunctioning sly pressing enter twice prompts sly-sdlb because the prompt *CL-USER> * is sent as the code to eval. |
Pity :-( because when I globally do |
It is nil
|
And when you do |
Yeah still at the first visual column. Very weird as the prompt seems to be properly fontified, as shown below, and the (with-current-buffer "*sly-mrepl for sbcl*"
(end-of-buffer)
(beginning-of-line)
(text-properties-at (point)))
(font-lock-face comint-highlight-prompt read-only t inhibit-line-move-field-capture t field output front-sticky (read-only) fontified t sly-mrepl-break-output t sly-mrepl--prompt "common-lisp-user") |
I've just tried out your complete config (!)on Emacs 24.3.92 (the pretest) and I can't reproduce the error. Trying again with Emacs 24.3... You sure do have a lot of packages... It's still compiling :-) |
Aha! I reproduced it, now for the debugging... |
@PuercoPop, please check now. In your complex configuration, there appears to be something preventing (let ((inhibit-read-only t))
(add-text-properties (line-beginning-position -1) (point) '(rear-nonsticky t blablabla yeah))) And it is removed instantly. This is, in itself, strange, as I can turn on This fixed the read-only-ness, but the sldb strange is also strange. It was fixed with a simple |
It works, perfectly! Thanks! |
Nice, be sure to open more issues if you find new problems. Rather "when" you find new problems. |
This issue has resurfaced as of the latest commit. |
Using git bisect I've pinpointed the regression to the 7cb2473 commit |
Dammit, so the problem happens in emacs 24.4 as well (well, in your config at least). Well can you check if:
Before loading or starting sly fixes it for you? |
Yes, it fixes it! Thanks! |
Now, should I make that the default or not? On the one hand it only happens to you, on the other hand it's pretty serious. And probably doesn't happen only to you.... I'll leave it off for a few days... |
I can live with one more line in emacs.d. It could be left off to see if another user experiences the same problem. |
Yes, throw it in with the other million you've already got in there... Hehe, I'm kidding, I better not piss you off as you're my main source of bug reports :D
Yes, that's what I'm thinking too. |
* sly-mrepl.el (sly-mrepl-mode-hook): Always use `sly-mrepl--ensure-no-font-lock'.
`font-lock-mode' used to be forcibly disconnected when entering sly-mrepl-mode. Now it's not and defaults to `comint's choice of setting `font-lock-mode' to t. This change is experimental during the beta period. * sly-mrepl.el (sly-mrepl-mode-hook): Remove hack. (sly-mrepl--ensure-no-font-lock): Remove it.
SBCL at least, seems to choke with gibberish package names such as "#1#". * sly.el (sly-net-send): Bind print-circle and print-quoted to nil.
Hi,
After doing M-x sly I try to type on the REPL it errors with the mesage
Text is read-only
. AFAICT the swank backed is working because I can do C-x C-e just fine. Also if I press enter I get first a; No values
message and then an error with the messageThe variable CL-USER> is unbound
So it appears the error is related to prompt detection.I'm using sbcl 1.2.3 and emacs 24.3.1
The text was updated successfully, but these errors were encountered: