Open epa opened 2 months ago
I added this to shx.el
(define-key keymap (kbd "M-RET") #'shx-send-input-or-copy-line)
Then I can move up to the earlier line and hit M-RET
(on my PC keyboard, Alt-Enter) to copy. But it ends up copying the whole line, including the shell prompt, not just the text that was entered. Would you like me to file a separate issue for that?
Thank you so much - I've had issues with different terminals as well, but hadn't gotten a chance to test with PuTTY.
No need to open a separate issue regarding copying the whole line; I'll use this issue to track that too. I've been having issues with it as well in certain situations (e.g. inferior python mode) so it's definitely itching me too.
Hi, I am trying out shx (cloned from gitlab today) with emacs 28.2. If I move point to an earlier command and press
C-RET
, I expected the text of that command to be copied to the current prompt. But instead I get "Find file or URL: ~/" in the minibuffer. To reproduce% emacs -q
In the*scratch*
buffer runThen
M-x shx
to start a new shell buffer. Wait for the prompt to appear and enterecho hello
followed byRET
. The command runs. ThenC-p
a couple of times to move up to the previous prompt, andC-RET
. But instead of copying theecho hello
text to the current prompt to run again, it thinks I want to open a file.The buffer does have shx active, as shown by
(Shell:run shx)
at the bottom.I thought maybe it was the prompt printed by the shell that wasn't being recognized, so I tried setting the
PS1
environment variable to a plain%
, but that didn't help. The shell buffer is fontifying the prompt text differently to the commands I entered and the output of those commands.You know, I think I may have found the problem. But I'll post this bug report just in case, as a helper for anyone else hitting the same issue. If I do
C-h k
to describe the key sequence, then pressC-RET
, it tells meRET runs the command shx-send-input-or-open-thing
That's
RET
, notC-RET
, so somehow the Ctrl key is not getting through. This connecting to a Linux box from a Windows desktop with PuTTY.