From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Neidhardt Subject: Re: Guix search, colors and INSIDE_EMACS Date: Mon, 24 Feb 2020 17:44:30 +0100 Message-ID: <875zfwc4up.fsf@ambrevar.xyz> References: <87blqeml4w.fsf@ambrevar.xyz> <87tv46qqlf.fsf@elephly.net> <87d0aul354.fsf@ambrevar.xyz> <87pneuqhyo.fsf@elephly.net> <871rr8hwmv.fsf@ambrevar.xyz> <877e0pvdrs.fsf@ambrevar.xyz> <871rqxvdkd.fsf@ambrevar.xyz> <87d0adtzwg.fsf@ambrevar.xyz> <871rqkj6pw.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:43751) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6GqU-0000S3-Ga for guix-devel@gnu.org; Mon, 24 Feb 2020 11:44:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6GqS-0003bn-TY for guix-devel@gnu.org; Mon, 24 Feb 2020 11:44:38 -0500 In-Reply-To: <871rqkj6pw.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: Guix Devel --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s 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=E2=80=99t 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 =2D-8<---------------cut here---------------start------------->8--- guix search foo | cat =2D-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? =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl5T/W4ACgkQm9z0l6S7 zH8g5wf/e83FQ/Tc6qNHKXcBRi+/0f8Ol2aGZwLCcQ00eJGqd53mx/+voZBZQura N7fYBFn9ETnHMeUr9EyTNyXfUhrQSFI+/v8f7kDsFyXUWQ9jY2f/kIVo5bTOIcUE 3iy4/IQHzz6WCdSHSUH45idNiiQJ+Kv8GwiCMiCT6c+uribd1dqYIHeePHzmEIvl Yny5X33FctCOX5ZTsT3WBm8dQIC52gjxPwbsUBnucvdr+YaPiYhCoai95MIYcQ5G AoQ4sCbOFkunGtk99h02wt1Yd/Hk7MxHzma5UFUra3t5WTx+UZ7tD4qTMjncltff yzB18t+ebdz28ZBM4oaWf9CtYuXhww== =+iry -----END PGP SIGNATURE----- --=-=-=--