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

shx does not seem to work in ielm buffers #25

Open
jave opened this issue Nov 14, 2020 · 6 comments
Open

shx does not seem to work in ielm buffers #25

jave opened this issue Nov 14, 2020 · 6 comments

Comments

@jave
Copy link

jave commented Nov 14, 2020

I used m-x shx-global-mode, which interferes with m-x ielm.

ielm will behave very oddly, outputing streams of hex rather than doing anything useful.

Is there a way to inhibit shx-global-mode in ielm buffers?

@riscy
Copy link
Owner

riscy commented Nov 15, 2020

Thanks, this is great to know. I've quickly tried shx with ielm and I see the problem happening. I'll add a change to at least inhibit shx-global-mode in ielm buffers this weekend -- it will amount to redefining shx--global-on as:

(defun shx--global-on ()
  "Call the function `shx-mode' if appropriate for the buffer."
  (when (and (derived-mode-p 'comint-mode)
             (not (eq major-mode 'inferior-emacs-lisp-mode)))
             (shx-mode +1)))

@BooAA
Copy link

BooAA commented Nov 15, 2020

Similar issue happened for sly, which was a fork of slime and use comint-mode to redesign their repl.

screenshot:
Screenshot from 2020-11-15 15-31-59

@riscy
Copy link
Owner

riscy commented Nov 15, 2020

Thanks! There might be a way to get shx to cooperate with these modes, but for now I'll add sly to the exceptions too.

@BooAA
Copy link

BooAA commented Nov 16, 2020

for c20495c, I think it should be sly-mrepl-mode.

@riscy
Copy link
Owner

riscy commented Nov 21, 2020

I wasn't able to locate the definition of sly-mrepl-mode to confirm, but I think the root cause was that shx shadows the RET binding which these modes (and probably others) require.

@BooAA
Copy link

BooAA commented Nov 22, 2020

You can find out definition of sly-mrepl-mode here, the keymap it uses is sly-mrepl-mode-map, which RET is bind to sly-mrepl-return

root cause was that shx shadows the RET binding which these modes (and probably others) require.

Sounds reasonable. Now shx works for sly now, thanks.

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