Ludovic Courtès writes: >> - Leave colors when INSIDE_EMACS is set. > > Like Ricardo wrote before, this is not desirable for shell-mode. Also, > all or most GNU command-line tools behave that way. There might be a misunderstanding because M-x shell supports ANSI terminal colors explicitly. Why disable them then? Many command line tools print colors properly in M-x shell. I think it's a misfeature to disable them in Emacs; I don't see any benefits. >> - Disable pager hint and display all search results when INSIDE_EMACS is set. > > I have a preference for something that doesn’t fill the screen, > especially since the last answers (those that remain visible without > scrolling) are the least relevant. Emacs makes it easier to scroll up > and search, but still. > > Thoughts? I find that printing just 1 result to be of little use in general. So between printing all results and just 1, I have a preference for printing all results. But there are other solutions, see below. Note that `less` does not work well neither in Eshell nor in M-x shell. Which is what started this discussion ;) Another option for M-x shell is to do --8<---------------cut here---------------start------------->8--- guix search foo | cat --8<---------------cut here---------------end--------------->8--- which gives us the same result as the patch I've sent, with more typing :( Eshell has a "smart-scrolling" mode (the point stays at the first prompt until validated). For M-x shell, going to the first result is just one keypress away. Another option would be to reverse the order of the result: print the most relevant result last, so that neither Eshell nor M-x shell have to scroll back. Thoughts? -- Pierre Neidhardt https://ambrevar.xyz/