Skip to content
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

in emacs, input seems to become readonly sometimes #14

Open
mikestillman opened this issue Jul 28, 2020 · 7 comments
Open

in emacs, input seems to become readonly sometimes #14

mikestillman opened this issue Jul 28, 2020 · 7 comments

Comments

@mikestillman
Copy link
Member

Try the following (in M2 1.16) in emacs:

   f = () -> (
       << "hi there\n\nhi there 2\n" << flush;
       sleep 100
       )
   f()

And then try typing anything into the emacs M2 buffer, including trying to CNTRL-C it... It responds with Text is read-only. Once the prompt comes back, one can access the buffer again.

@mahrud , @DanGrayson Is this related to a recent change?

@DanGrayson
Copy link
Member

This is #3, presumably. I have a fix.

A work-around is to use 1.15's setupEmacs.

@mahrud
Copy link
Member

mahrud commented Jul 28, 2020

This doesn't happen to me. I'm using 1.16's M2.el on Emacs 26.3. What version did you try it on?

@mikestillman
Copy link
Member Author

I'm using 1.16 M2.el on emacs 26.3 too. I do have lots of stuff in my .emacs file. I suppose that something else could be interacting poorly. But it does work with 1.15, I'm pretty sure.

@mahrud
Copy link
Member

mahrud commented Jul 29, 2020

Ah, I think it's because I'm using an uncommitted version of M2-symbols.el.in, since I was in the middle of fixing some issues in M2-mode, and one of the changes was to the regexp used for the prompt:

(defconst M2-comint-prompt-regexp "^\\([ \t]*\\(i*[1-9][0-9]* :\\|o*[1-9][0-9]* =\\) \\)?"

The outer (...)? makes this match the empty line. I'll fix it soon.

@mikestillman
Copy link
Member Author

mikestillman commented Jul 29, 2020

Additionally, typing CTRL-D in the *M2* buffer ends the M2 process, and I get in the minibuffer the phrase: error in process sentinel: Text is read-only (it does stop the process too, without any notice to that effect).

@mikestillman
Copy link
Member Author

The same issue, I think: If I am in a shell buffer, and type CTRL-C on a blank line, it also won't interrupt.

@DanGrayson
Copy link
Member

I've just pushed the fix to the development branch, and it involves the M2-emacs submodule, so do git submodule update to get the latests. (Doing git status will inform you of the need.)

Test it out and let me know.

@mahrud mahrud transferred this issue from Macaulay2/M2 Jan 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants