From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 6KUODlXZ4mH87wAAgWs5BA (envelope-from ) for ; Sat, 15 Jan 2022 15:25:25 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id AFPdBlXZ4mFCbAAAG6o9tA (envelope-from ) for ; Sat, 15 Jan 2022 15:25:25 +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 97B912A9CC for ; Sat, 15 Jan 2022 15:25:24 +0100 (CET) Received: from localhost ([::1]:60528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n8jzf-0005qU-Mg for larch@yhetil.org; Sat, 15 Jan 2022 09:25:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8jzL-0005qK-0d for guix-patches@gnu.org; Sat, 15 Jan 2022 09:25:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:46671) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n8jzK-0006Ig-MX for guix-patches@gnu.org; Sat, 15 Jan 2022 09:25:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n8jzK-0002mt-JA for guix-patches@gnu.org; Sat, 15 Jan 2022 09:25:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 15 Jan 2022 14:25:02 +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: Florian , 53257@debbugs.gnu.org Received: via spool by 53257-submit@debbugs.gnu.org id=B53257.164225667710668 (code B ref 53257); Sat, 15 Jan 2022 14:25:02 +0000 Received: (at 53257) by debbugs.gnu.org; 15 Jan 2022 14:24:37 +0000 Received: from localhost ([127.0.0.1]:39574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8jyv-0002m0-1P for submit@debbugs.gnu.org; Sat, 15 Jan 2022 09:24:37 -0500 Received: from andre.telenet-ops.be ([195.130.132.53]:33636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8jys-0002lq-6U for 53257@debbugs.gnu.org; Sat, 15 Jan 2022 09:24:35 -0500 Received: from [172.20.10.5] ([188.188.185.222]) by andre.telenet-ops.be with bizsmtp id j2QX260084oKcDo012QXcZ; Sat, 15 Jan 2022 15:24:32 +0100 Message-ID: <9b79749f1902ca64bc0a544a697b4109920592f5.camel@telenet.be> From: Maxime Devos Date: Sat, 15 Jan 2022 15:24:26 +0100 In-Reply-To: <87sftqlykz.fsf@tp-x230-guix.mail-host-address-is-not-set> References: <811cc55626870dbf37af3418e8effe191948541a.1642168254.git.florhizome@posteo.net> <070637a9bb8fc9a51bd39b0a2666ede537bdc949.camel@telenet.be> <87sftqlykz.fsf@tp-x230-guix.mail-host-address-is-not-set> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-IOERiflEZGcVWcziBuLi" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1642256672; bh=E89B5jaBP4UgHSDGc4x3Ofi5yzqoQIeH65o9k3rssaY=; h=Subject:From:To:Date:In-Reply-To:References; b=IwbN7UnKuaKvKw1N0df1AbPXkdXYjZfcn9G8UMdVkH2ergsNSrrSxqnWiYlpUK78Q TOzbrS+liwVvpnWMbMivms1Eulkv+PvTl2T5IhYI+iXKtOKNGwI8+W/mK/O04RrgY2 WyLgXzO3KmcFX3Kj4qSO5KYwLWwqLp9tVLM/dEbjelBk9RYe+2EFN7R+PkhMgvv0bj NqJqpvMyN6vgawzeqyE3WroUv+H8UYaHWDjfSjXWzI/IEchp06lHVRzglVs8LQmR/O PHZL+x6PRmBipS7cruAnuEMD33aUkScvPTz9f5lLkMbdC1yHgWk7MkvMbCqzkWAyGI 204ikVoryvLQQ== 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=1642256724; 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: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=E89B5jaBP4UgHSDGc4x3Ofi5yzqoQIeH65o9k3rssaY=; b=IMPoydND/jD11Lk5aefNg2gWNf2jJfOswDhI5tTKEo1IllcczE1b0nazRgGnT9oAYMkpDe C41GtC1NZoVErY5QW8WV7hrsMRYs4gymlTaE7Q7kVYgvkUamlquGLb1xAZ7X+RsdPfKKqM O8LlYBLKJfkY55+X5YhZDXG7RtxSEGSnSq0Ca3/dxBAtq7ZhXkpX+1XEiUM/KJczVI0Wqn +SLL10HVMBofnyXiDkTC7D9LWqPkfGFDYaVS3ZMGqhVtczRNpuh3exPG8g4IqyYqSqoVYk JtKy/M2UqSmj+GoQMM23Ssib58SKtIQoTgOSJTPrn9DoZ8WGeNGEH1KFhJJQsw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642256724; a=rsa-sha256; cv=none; b=RlbtX1cs+k9hdhSi4UqNl4ZN1vtHhEBjcBJlZHuMem+3SQazo0GtG3/TR+XsMSL76mydpm xkBFVfg9Lf0gv27KBPzM7oVcu+Xv6V6tWRApqZK6mj/R49b4YPb3/GyJ7NYdKydaZ0oohk BCiH8b19/Qug3vfh0275ugjZi7j1uwJdH4yy7eex07YZLgkZJXhGBZDOIY8+4kJvbmKK7O Z6Xny3CQNelnM/0vmdBYkjgiSzu+/fuOphM8rmVJI+rSZ0EfBvxKNZhSKUOba5I7RO7ZV5 yk5DpvFGz4oamrPziwK20XFLyMhU457uR6rMVOZVmWwVLVgGNrmOuu/qd1dSRA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=IwbN7UnK; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (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: -5.03 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=IwbN7UnK; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (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: 97B912A9CC X-Spam-Score: -5.03 X-Migadu-Scanner: scn0.migadu.com X-TUID: spCRsjCPLqMJ --=-IOERiflEZGcVWcziBuLi Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Florian schreef op vr 14-01-2022 om 22:52 [+0000]: > [...] I think the basic idea here is that the following should work: $ guix shell --pure some-terminal-emulator -- some-terminal-emulator # e.g., kitty # from inside the terminal: (e.g. nano) $ ~/.config/guix/current/bin/guix shell some-terminal-app -- some-terminal-= app # Variation: run under sudo This works for kitty+nano, as you note, because kitty sets TERMINFO. It also works for kitty+'emacs -nw'. However, in some combinations things = won't work: An example you noted is kitty+sudo+'emacs -nw'. This doesn't work for me e= ither. This seems to be caused by 'sudo' clearing too much. As I understand it, t= his is only an illustrative counter-example, and not something that setting 'native-search-paths' could fix? This patch is about 'foot', so I tried running foot+nano, but that failed b= ecause I don't use wayland. Anyway, there are a few options here: 1. patch the source code of 'foot' to set "TERMINFO_DIRS" or "TERMINFO" appropriately (I'm not sure about the exact difference) (or use wrap-pr= ogram in 'foot'). The benefit of this above adding search paths, is that running 'foot' directly from the store could work (somewhat niche though). It would need to be investigated whether this works for your use case o= f setting 'foot-direct' instead of 'foot-xterm'. 2. modify 'nano', 'emacs', ... to add a "TERMINFO_DIRS" search path. A benefit of this approach above adding it to terminal emulators, is that this how search paths are supposed to be used AFAIK (adding an INFOPATH, LIBRARY_PATH, CROSS_LIBRARY_PATH, CPATH, ... search path to every C library that has 'info' documentation is rather cumbersome, instead INFOPATH =E2=80=98belongs=E2=80=99 to info r= eaders, LIBRARY_PATH etc. to compilers, ...). A downside is that setting it here can be =E2=80=98too late=E2=80=99. E.g., in the "guix shell terminal" then "guix shell editor" example, the editor and terminal application are in separate profiles so guix doesn't set TERMINFO_DIRS 3. Like (2), but add it to the terminal apps instead. My order of preference: (1) > (3) > (2). Here, (3) would be a lot easier than (1) but almost as good, so maybe we could do (3) first and leave (1) for later? AFAICT It's not only 'foot' that is affected, should we do (3) for all term= inal emulators that don't do (1) like kitty? Greetings, Maxime --=-IOERiflEZGcVWcziBuLi Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYeLZGhccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7rf7AP9rWn8cu9kuB/9HRSly/yuJBGvz dvxHhoASBz+XC8dRHwD/a/a2M90tI688afFkL2cUxqBCPlPqUDhkqNmVJ/mJewM= =gZZJ -----END PGP SIGNATURE----- --=-IOERiflEZGcVWcziBuLi--