From: Florian <florhizome@posteo.net>
To: 53257@debbugs.gnu.org
Subject: [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths
Date: Fri, 14 Jan 2022 22:52:28 +0000 [thread overview]
Message-ID: <87sftqlykz.fsf@tp-x230-guix.mail-host-address-is-not-set> (raw)
In-Reply-To: <070637a9bb8fc9a51bd39b0a2666ede537bdc949.camel@telenet.be>
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=truecolor
TERM=foot-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=truecolor
TERMINFO=/gnu/store/zhmzdniycjykb6igrx4avs9vsn4ngk5q-kitty-0.20.3/lib/kitty/terminfo
TERM=xterm-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
Passwort:
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=...; 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ündel der Zertifikatsautoritäten wird erstellt …
Liste der Emacs-Unterverzeichnisse wird erzeugt …
Schriftartenverzeichnis wird erstellt …
Verzeichnis von Info-Handbüchern wird erstellt …
Profil mit 1 Paket wird erstellt …
~ $ 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).
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.
Greetings,
Florian.
Maxime Devos <maximedevos@telenet.be> 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 it's current dimensions.
>> when I installed alacritty in the same profile, this was fixed. Turned out, alacritty's
>> declaration has a native-search-path field entry that fixed foot! Why not 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!
>>
>
> Canonically, search path are set in ‘consumers’, not ‘producers’
> (though setting it in ‘producers’ sometimes works). Here,
> ‘consumer’ = ncurses, maybe screen (why doesn't screen have a native-
> search-paths? An oversight?), and ‘producer’ = some terminal 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:
> <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22138>
> 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.
next prev parent reply other threads:[~2022-01-15 0:49 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-14 14:02 [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths florhizome
2022-01-14 19:02 ` Maxime Devos
2022-01-14 22:52 ` Florian [this message]
2022-01-15 11:45 ` Maxime Devos
2022-01-15 11:48 ` Maxime Devos
2022-01-15 12:30 ` Maxime Devos
2022-01-15 15:19 ` Florian
2022-01-15 15:38 ` Maxime Devos
2022-01-15 18:46 ` Florian
2022-01-23 21:26 ` Maxime Devos
2022-01-15 15:46 ` Maxime Devos
2022-01-15 15:46 ` Maxime Devos
2022-01-15 14:24 ` Maxime Devos
2022-01-28 22:34 ` Ludovic Courtès
2022-02-08 12:46 ` Maxime Devos
2022-02-10 20:30 ` Ludovic Courtès
2022-02-10 21:45 ` Maxime Devos
2022-02-12 21:49 ` Ludovic Courtès
2022-02-27 18:34 ` [bug#53257] [PATCH] gnu: foot: Wrap the program to expose TERMINFO_DIRS Kevin Boulain
2022-02-27 18:41 ` Kevin Boulain
2022-02-27 19:22 ` Maxime Devos
2022-02-28 20:29 ` Kevin Boulain
2022-03-01 19:34 ` Kevin Boulain
2022-03-01 19:28 ` Kevin Boulain
2022-06-19 5:27 ` Tom Fitzhenry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sftqlykz.fsf@tp-x230-guix.mail-host-address-is-not-set \
--to=florhizome@posteo.net \
--cc=53257@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).