Hi Max,
Max Nikulin <maniku...@gmail.com> writes: > On 17/11/2023 22:47, Bruno Barbier wrote: >> FWIW, M-x shell differs from what a plain terminal is doing (xterm, in >> my case), but, I do prefer 'M-x shell' behavior: it allows me to copy >> multiple lines, getting the same results as when I type them manually, >> or copy them line by line. My xterm doesn't seem to allow me to do that. > > I am unsure what do you expect from xterm, but perhaps it is not > responsibility of a terminal application. It has been said in this thread that 'M-x shell' should be fixed to match the behavior that we see in a plain terminal, when we copy multiple lines. I just wanted to point out that I do prefer the way 'M-x shell' handles the copy of multiple lines. > Multiple lines can be copied to regular BASH prompt (bracketed paste is > enabled by default nowadays), however it may be inconvenient to edit. > You may use edit-and-execute-command (C-x C-e) (BASH, not Emacs key > binding) to start an editor and to paste multiple commands there. > See also "fc" BASH built-in for editing and re-executing last commands. Thanks Max! I didn't know that. I should definitely start using this when I'm stuck in a console, to safely copy/edit my commands using Emacs. Thanks, Bruno