From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2BrLFCsa4mHHtwAAgWs5BA (envelope-from ) for ; Sat, 15 Jan 2022 01:49:47 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id eEUXEisa4mEcVAAA9RJhRA (envelope-from ) for ; Sat, 15 Jan 2022 01:49:47 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A3DC1E27C for ; Sat, 15 Jan 2022 01:49:46 +0100 (CET) Received: from localhost ([::1]:45930 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n8XGL-00064f-IH for larch@yhetil.org; Fri, 14 Jan 2022 19:49:45 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60942) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8XFd-00063d-V9 for guix-patches@gnu.org; Fri, 14 Jan 2022 19:49:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45687) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n8XFd-0003h7-KH for guix-patches@gnu.org; Fri, 14 Jan 2022 19:49:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n8XFd-0005SE-JY for guix-patches@gnu.org; Fri, 14 Jan 2022 19:49:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths Resent-From: Florian Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 15 Jan 2022 00:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53257 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53257@debbugs.gnu.org Received: via spool by 53257-submit@debbugs.gnu.org id=B53257.164220770820913 (code B ref 53257); Sat, 15 Jan 2022 00:49:01 +0000 Received: (at 53257) by debbugs.gnu.org; 15 Jan 2022 00:48:28 +0000 Received: from localhost ([127.0.0.1]:38590 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8XF5-0005RE-Gd for submit@debbugs.gnu.org; Fri, 14 Jan 2022 19:48:28 -0500 Received: from mout01.posteo.de ([185.67.36.65]:52127) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8VT4-0002Fb-Bn for 53257@debbugs.gnu.org; Fri, 14 Jan 2022 17:54:50 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id C4E96240026 for <53257@debbugs.gnu.org>; Fri, 14 Jan 2022 23:54:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1642200879; bh=pZsX/sX18E8eNS8vQCbSyjPEs00HqZF9XjDEPlZp+VI=; h=From:To:Subject:Date:From; b=rhVYvjNpxgcbP3tu19mX3FKeaOrzwobZXc/+wztUFoBnbKYFnkOiJF5nZOqVCFkZD MoYygjxQRVwaYlAJxGRNqLJDYC0eaV9u6TMLnNRGSB5qFgDg5NDGq4+arBwtjcZ5Bp HVNPF1Junurbw/9lyQGqOMJ/pFHUj9NPUho7iy1aCR32ArQ5Skf4CAlFETevOzl64V jX7mTtVCuk4kWeD50e/81awkl6XVKrqGEhGoBB6p5rfkq/xas8UlfQOT037pXGUzmJ w3zQdFJlOsDadnfrwnULh+GoTb4pArt1zq5T27+2rO+6GLA62gSze5lyOWDQoFol0O DTfYXMODnD9WA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4JbGp70MKLz6tn9 for <53257@debbugs.gnu.org>; Fri, 14 Jan 2022 23:54:38 +0100 (CET) From: Florian In-Reply-To: <070637a9bb8fc9a51bd39b0a2666ede537bdc949.camel@telenet.be> References: <811cc55626870dbf37af3418e8effe191948541a.1642168254.git.florhizome@posteo.net> <070637a9bb8fc9a51bd39b0a2666ede537bdc949.camel@telenet.be> Date: Fri, 14 Jan 2022 22:52:28 +0000 Message-ID: <87sftqlykz.fsf@tp-x230-guix.mail-host-address-is-not-set> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Fri, 14 Jan 2022 19:48:26 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1642207786; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=JnnsZNJuZVNlbFwt1Bwu069itFShka6SU2DtBmoxZJE=; b=XGKZrmwHfFgdqdjprLwZ775e6RvEZ6f08iRT6YSuAqLmQ030L19TrMi91vVe41Lf876+pk np+1+1x1lAT5I+PseyDoEHhp8ks9qrkztDAT1V21XsXjs2EAa2FqK4gdnfuR6ayR9Tn1/G BX+6uJjMyQ9Eg2hvPuaowsqZHxP8O8sRLEGF1aQytStWyRG1eeFuvZ2bx996Qi5p10eOnM eaKVQF/BsmeO9tMnE7hxEF9Uk2VIczE3hMjgXMBGkQ6dy5tn7rLPwEKQObSM5WHtRjJ4nP WCQdcc8LFqGOf30M2RtJXbAc1dkb4qVLXLYIBNwLv8NZty5LouSV+XfA8AYgeg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642207786; a=rsa-sha256; cv=none; b=fwQNuRy6xo6ZlnSIoDWGhChtJTliGAoJSfkN9ALLNjF9PgD98NvH6yuYZyeer2ZmYHT6Rb EowWQAUgOVPx4o1WyMVFaTgEekgZQvSEkKtetBSM0nliDFv2byRiIZMg6CfEWYl7msG+Wa XPchRXQHKhASEAlC5w91z8AEHjbHyQLNa5UNuMCTnrFvnn6+uzeMo4+9aPBhZyqbhTb4XQ 3vVYjhC1DlRqzWEau7KevFGVj+1vUgSzvcYq1GKRXN7fEUrCXD7rrJ1RYk7e4xZ3rPlkrB iNSRYC+FW1FEm9EU+OFF5ZgURh123eq2KFbfgUCCjqdcOLamIepN16ksWZqk1g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=rhVYvjNp; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.53 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=rhVYvjNp; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: A3DC1E27C X-Spam-Score: -2.53 X-Migadu-Scanner: scn0.migadu.com X-TUID: RCOSvDYjoXTa Hi Maxime, I understand this kinda differently so far: We want to expose the path where foot installs it's terminfo via TERMINFO_DIRS, so that every program running in that Terminal can look it up. foot without the patch emits the following env vars inside it's process: ~ $ env | grep TERM COLORTERM=3Dtruecolor TERM=3Dfoot-direct (i configured it to use foot-direct, and not foot-xterm, which is the other terminfo it installs, bc that should give me more colors in emacs) now what happens is that neither foot nor programs running from it seem to know what foot-direct is. As I tried to describe, foot renders problematic stuff, whenever the text it displays reaches it's borders, simply a long line does it, but also looking up manpages (i would get a WARNING: terminal is not fully functional Press RETRUN to continue when typing "git send-email --help" f.e. Comparing to kitty: Running in kitty: COLORTERM=3Dtruecolor TERMINFO=3D/gnu/store/zhmzdniycjykb6igrx4avs9vsn4ngk5q-kitty-0.20.3/lib/kit= ty/terminfo TERM=3Dxterm-kitty So, kitty exposes the exact path to it's terminfo files within it's process. so, we are fine, most of the time. But when i try to edit a file with elevated right's, emacs complains: ~ $ sudo emacs -nw .config/guix/home.scm=20 Passwort:=20 emacs: Terminal type xterm-kitty is not defined. If that is not the actual type of terminal you have, use the Bourne shell command 'TERM=3D...; export TERM' (C-shell: 'setenv TERM ...') to specify the correct type. It may be necessary to do 'unset TERMINFO' (C-shell: 'unsetenv TERMINFO') as well. an interesting example with guix shell and nano: ~ $ guix shell nano -- nano ./.config/guix/home.scm Folgende Ableitung wird erstellt: /gnu/store/azcaj49div66k43afiiiq6njsjk8s5iv-profile.drv Zertifikatsb=C3=BCndel der Zertifikatsautorit=C3=A4ten wird erstellt =E2=80= =A6 Liste der Emacs-Unterverzeichnisse wird erzeugt =E2=80=A6 Schriftartenverzeichnis wird erstellt =E2=80=A6 Verzeichnis von Info-Handb=C3=BCchern wird erstellt =E2=80=A6 Profil mit 1 Paket wird erstellt =E2=80=A6 ~ $ guix shell nano --pure -- nano ./.config/guix/home.scm Error opening terminal: xterm-kitty. (so, the first one worked, the second not.) kitty works as long as i "preserve context" i would say, without understanding in depth what happens. So, to me it seems setting search-paths should make sense whenever you want to expose a path in the store directory of a certain package, but you cannot be sure to which package (otherwise, a wrapper would make sense, and that's where your definiton of producer and consumer applies better i think as it would be a much directer and clearer definition. ). In= gnu guix we would want to take advantage of that rather more then less i think, but it's poorly documented. By my understanding, if emacs installs a terminfo file, yes, we could set it's search-path field similar to alacritty. But it most definitely makes sense for any terminal emulator that defines an own TERMINFO variable and ships a terminfo file with that (and so a TERMINFO_DIR that we want to expose to the environment).=20 Now what i don't understand is when I would set search-paths, but not native-search-paths --- as i said, in this example search-paths would make more sense to me, if I understood the two fields right.=20 Greetings, Florian. Maxime Devos writes: > florhizome schreef op vr 14-01-2022 om 14:02 [+0000]: >> Hi all, >> I noticed foot did not behave normally whenever content would overflow i= t's current dimensions. >> when I installed alacritty in the same profile, this was fixed. Turned o= ut, alacritty's >> declaration has a native-search-path field entry that fixed foot! Why no= t just search-paths, >> I can't tell. This might apply to further terminal emulators (kitty had = problems starting emacs >> in some contexts for me but I would need to test that more), but for now= , just foot!=20 >>=20 > > Canonically, search path are set in =E2=80=98consumers=E2=80=99, not =E2= =80=98producers=E2=80=99 > (though setting it in =E2=80=98producers=E2=80=99 sometimes works). Here, > =E2=80=98consumer=E2=80=99 =3D ncurses, maybe screen (why doesn't screen = have a native- > search-paths? An oversight?), and =E2=80=98producer=E2=80=99 =3D some te= rminal emulator. > > What application were you running in foot that leaded to an overrun? > Maybe we should add TERMINFO_DIRS to the native-search-paths of the > application. Basically all applications using ncurses need it, I > think? > > The following seems relevant: > > though personally that doesn't seem a bug to me. > > Were you running emacs in the terminal? If so, maybe TERMINFO_DIRS > need to be added to 'emacs'? > > Greetings, > Maxime.