all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths
@ 2022-01-14 14:02 florhizome
  2022-01-14 19:02 ` Maxime Devos
  0 siblings, 1 reply; 12+ messages in thread
From: florhizome @ 2022-01-14 14:02 UTC (permalink / raw)
  To: 53257

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! 

* gnu/packages/terminals.scm (foot) [native-search-paths]: Add
search-path-specification for terminfo dirs
---
 gnu/packages/terminals.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index a4fe97776d..1eb54dac80 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -849,6 +849,10 @@ (define-public foot
            pkg-config scdoc wayland-protocols))
     (inputs
      (list fcft libxkbcommon wayland))
+    (native-search-paths 
+     (list (search-path-specification
+            (variable "TERMINFO_DIRS")
+            (files '("share/terminfo")))))
     (synopsis "Wayland-native terminal emulator")
     (description
      "@command{foot} is a terminal emulator for systems using the Wayland
-- 
2.34.0





^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths
  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
  0 siblings, 1 reply; 12+ messages in thread
From: Maxime Devos @ 2022-01-14 19:02 UTC (permalink / raw)
  To: florhizome, 53257

[-- Attachment #1: Type: text/plain, Size: 1316 bytes --]

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.


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths
  2022-01-14 19:02 ` Maxime Devos
@ 2022-01-14 22:52   ` Florian
  2022-01-15 11:45     ` Maxime Devos
                       ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Florian @ 2022-01-14 22:52 UTC (permalink / raw)
  To: 53257

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.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths
  2022-01-14 22:52   ` Florian
@ 2022-01-15 11:45     ` Maxime Devos
  2022-01-15 11:48     ` Maxime Devos
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 12+ messages in thread
From: Maxime Devos @ 2022-01-15 11:45 UTC (permalink / raw)
  To: Florian, 53257

[-- Attachment #1: Type: text/plain, Size: 1123 bytes --]

Florian schreef op vr 14-01-2022 om 22:52 [+0000]:
> 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. 

I don't see what this has to do with your example, since you aren't
cross-compiling.  There's only a difference between 'search-paths' and
'native-search-paths' when cross-compiling:

When a cross-compiler 'cross-gcc' and a native compiler 'gcc' are in
the native-inputs of some package, a C library 'x' is in the
native-inputs and a C library 'y' is in the (non-native) inputs, then:

 * The native-search-path LIBRARY_PATH of 'gcc' is set to:

       /gnu/store/[...]-x/include

   (the cross-compiled 'y' library is ignored!)

 * The (non-native) search-path CROSS_LIBRARY_PATH of 'cross-gcc' is
   set to:

      /gnu/store/[...]-y/include


   (the native (not cross-compiled) 'x' library is ignored!)

Packages that don't cross-compile anything usually only have
native-search-paths and AFAIK this works.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths
  2022-01-14 22:52   ` Florian
  2022-01-15 11:45     ` Maxime Devos
@ 2022-01-15 11:48     ` Maxime Devos
  2022-01-15 12:30     ` Maxime Devos
  2022-01-15 14:24     ` Maxime Devos
  3 siblings, 0 replies; 12+ messages in thread
From: Maxime Devos @ 2022-01-15 11:48 UTC (permalink / raw)
  To: Florian, 53257

[-- Attachment #1: Type: text/plain, Size: 503 bytes --]

Florian schreef op vr 14-01-2022 om 22:52 [+0000]:
> By my understanding, if emacs installs a terminfo file, yes, we could
> set it's search-path field similar to alacritty.

What I suggested, is that emacs would have a search-path because it can
be used _inside_ a terminal as a terminal application,and hence might
be a ‘consumer’ of TERMINFO_DIR.

That said, from your examples it seems a good idea to (also?) include
TERMINFO_DIR in the producer -- I'll send a separate mail for that.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths
  2022-01-14 22:52   ` Florian
  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 14:24     ` Maxime Devos
  3 siblings, 1 reply; 12+ messages in thread
From: Maxime Devos @ 2022-01-15 12:30 UTC (permalink / raw)
  To: Florian, 53257

[-- Attachment #1: Type: text/plain, Size: 2475 bytes --]

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 either.
This seems to be caused by 'sudo' clearing too much.  As I understand it, this 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 because
I don't use wayland.  Anyway, there seem to be 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-program
    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 of
    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 ‘belongs’ to info readers,
    LIBRARY_PATH etc. to compilers, ...).

    A downside is that setting it here can be ‘too late’.
    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 terminal
emulators that don't do (1) like kitty?

Greetings,
Maxime

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths
  2022-01-14 22:52   ` Florian
                       ` (2 preceding siblings ...)
  2022-01-15 12:30     ` Maxime Devos
@ 2022-01-15 14:24     ` Maxime Devos
  3 siblings, 0 replies; 12+ messages in thread
From: Maxime Devos @ 2022-01-15 14:24 UTC (permalink / raw)
  To: Florian, 53257

[-- Attachment #1: Type: text/plain, Size: 2470 bytes --]

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 either.
This seems to be caused by 'sudo' clearing too much.  As I understand it, this 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 because
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-program
    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 of
    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 ‘belongs’ to info readers,
    LIBRARY_PATH etc. to compilers, ...).

    A downside is that setting it here can be ‘too late’.
    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 terminal
emulators that don't do (1) like kitty?

Greetings,
Maxime


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths
  2022-01-15 12:30     ` Maxime Devos
@ 2022-01-15 15:19       ` Florian
  2022-01-15 15:38         ` Maxime Devos
                           ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Florian @ 2022-01-15 15:19 UTC (permalink / raw)
  To: Maxime Devos, 53257

Hey Maxime,

the comment about native-search-paths vs search-paths was just for
better understanding.I thought they work like native inputs vs inputs,
but it seems like it's quite the opposite.

If my understanding holds, setting TERMINFO_DIRS with
native-search-paths could help all terminals that have a non-generic
terminfo (not each would). But i couldn't tell you which ones those are.
As I see major problems f.e. with QT applications, that seem related to
not setting search paths, a proposal of mine for the future would be to improve/ actually introduce good documentation to the search-patch
variables (and their relationship to profiles and propagated inputs) but
maybe simplify setting a search-path correspanding to a more distinct
group of programs. I could imagine this as something like a search-path
"type", working out like this:
(package
...
(native-search-paths
(list
(search-path-specification
(type terminal-emulator))
...)
)

at first this would just be the same as the code added to foot, but it
could be refined (people might be able to  see overlaps, and integrate
some filtering or other optimization for a specific group. Also you could maybe eventually say "install a
package but without these search-paths"). For groups like qt plugins,
it could maybe be included in the qt-wrap functionalities to look for
the paths where plugins are installed and add the corresponding search paths automatically.

Have you tried to add a search path to emacs or nano?
I kinda doubt this would do much; neither nano or emacs ship a terminfo
for kitty, or for foot. What I think could work is wrapping nano and
emacs and every terminal application that has problems to add a path
derived from generically set env vars to point to the places where
terminfo files might be installed a la
TERMINFO_DIRS=$TERMINFO_DIRS:$XDG_DATA_DIRS/
this could actually be helpful on foreign distros, but i don't know if
 apps don't already trythis by themselves.

So, to get more specific on what to do: Of your suggestions I would say
why not do 3 for foot immediately like my patch suggests, it fixes the
most immediate problems in a comprehensible and by that easily revertible way. I don't
think 2 helps much, maybe still misunderstanding things.
For 1) I don't know if I could do this, and I'm not really
motivated. It also doesn't really clash with 3. There also might be
usecases like  programs
that need info about installed terminfos without being run from the
respective terminal emulator, where having the env var in the shell
could come handy, esp for usecases like guix on a foreign distro. but
i'm not sure if these exist here.   
I also remember reading, when researching the problem with kitty sudo
emacs, possibilites for preserving chosen environment variables when switching
between different contexts, which should help.

oh, and i just set foot-direct recently, when i was investigating
this. the problems have stuck with me.

Maxime Devos <maximedevos@telenet.be> writes:

> 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 either.
> This seems to be caused by 'sudo' clearing too much.  As I understand it, this 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 because
> I don't use wayland.  Anyway, there seem to be 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-program
>     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 of
>     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 ‘belongs’ to info readers,
>     LIBRARY_PATH etc. to compilers, ...).
>
>     A downside is that setting it here can be ‘too late’.
>     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 terminal
> emulators that don't do (1) like kitty?
>
> Greetings,
> Maxime




^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths
  2022-01-15 15:19       ` Florian
@ 2022-01-15 15:38         ` Maxime Devos
  2022-01-15 18:46           ` Florian
  2022-01-15 15:46         ` Maxime Devos
  2022-01-15 15:46         ` Maxime Devos
  2 siblings, 1 reply; 12+ messages in thread
From: Maxime Devos @ 2022-01-15 15:38 UTC (permalink / raw)
  To: Florian, 53257

[-- Attachment #1: Type: text/plain, Size: 1189 bytes --]

Florian schreef op za 15-01-2022 om 15:19 [+0000]:
> Have you tried to add a search path to emacs or nano?

I don't, but I presume it would work -- at least 'ncurses' has a
TERMINFO_DIRS native-search-path, 'info-reader' and 'emacs' have an
INFOPATH ...
 
> I kinda doubt this would do much; neither nano or emacs ship a terminfo
> for kitty, or for foot. What I think could work is wrapping nano and
> emacs and every terminal application that has problems to add a path
> derived from generically set env vars to point to the places where

It doesn't matter that nano and emacs don't ship terminfo files --
if a package in the profile (or build environment) has some search
path, then the search path is set with corresponding directories from
_every_ package (*), irrespective of whether they have that search
path.

So as long as 'nano/emacs/vi/...' and 'kitty/foot/gnome-terminal-
emulator/...' are in the _same_ profile, the environment variable
of the search path is set.

They aren't always in the same profile though, 

(*) with some restrictions w.r.t. cross-compilation, native-search-
path/search-path, native-inputs/inputs ...

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths
  2022-01-15 15:19       ` Florian
  2022-01-15 15:38         ` Maxime Devos
@ 2022-01-15 15:46         ` Maxime Devos
  2022-01-15 15:46         ` Maxime Devos
  2 siblings, 0 replies; 12+ messages in thread
From: Maxime Devos @ 2022-01-15 15:46 UTC (permalink / raw)
  To: Florian, 53257

[-- Attachment #1: Type: text/plain, Size: 1532 bytes --]

Florian schreef op za 15-01-2022 om 15:19 [+0000]:
> [...]
> As I see major problems f.e. with QT applications, that seem related to
> not setting search paths, a proposal of mine for the future would be to improve/
> actually introduce good documentation to the search-patch
> variables (and their relationship to profiles and propagated inputs)

About documentation, you might be interested in
<https://issues.guix.gnu.org/22138#8>.

>  but
> maybe simplify setting a search-path correspanding to a more distinct
> group of programs. I could imagine this as something like a search-path
> "type", working out like this:
> (package
> ...
> (native-search-paths
> (list
> (search-path-specification
> (type terminal-emulator))
> ...)
> )
> at first this would just be the same as the code added to foot, but it
> could be refined (people might be able to  see overlaps, and integrate
> some filtering or other optimization for a specific group. Also you could maybe eventually say "install a
> package but without these search-paths"). For groups like qt plugins,
> it could maybe be included in the qt-wrap functionalities to look for
> the paths where plugins are installed and add the corresponding search paths automatically.

Not sure what you mean here, when building a package it is unknown
what plug-ins will be used in advance.  The point of search paths is
having some kind of extensibility, setting the search path environment
variables in qt-wrap would undo that.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths
  2022-01-15 15:19       ` Florian
  2022-01-15 15:38         ` Maxime Devos
  2022-01-15 15:46         ` Maxime Devos
@ 2022-01-15 15:46         ` Maxime Devos
  2 siblings, 0 replies; 12+ messages in thread
From: Maxime Devos @ 2022-01-15 15:46 UTC (permalink / raw)
  To: Florian, 53257

[-- Attachment #1: Type: text/plain, Size: 1532 bytes --]

Florian schreef op za 15-01-2022 om 15:19 [+0000]:
> [...]
> As I see major problems f.e. with QT applications, that seem related to
> not setting search paths, a proposal of mine for the future would be to improve/
> actually introduce good documentation to the search-patch
> variables (and their relationship to profiles and propagated inputs)

About documentation, you might be interested in
<https://issues.guix.gnu.org/22138#8>.

>  but
> maybe simplify setting a search-path correspanding to a more distinct
> group of programs. I could imagine this as something like a search-path
> "type", working out like this:
> (package
> ...
> (native-search-paths
> (list
> (search-path-specification
> (type terminal-emulator))
> ...)
> )
> at first this would just be the same as the code added to foot, but it
> could be refined (people might be able to  see overlaps, and integrate
> some filtering or other optimization for a specific group. Also you could maybe eventually say "install a
> package but without these search-paths"). For groups like qt plugins,
> it could maybe be included in the qt-wrap functionalities to look for
> the paths where plugins are installed and add the corresponding search paths automatically.

Not sure what you mean here, when building a package it is unknown
what plug-ins will be used in advance.  The point of search paths is
having some kind of extensibility, setting the search path environment
variables in qt-wrap would undo that.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths
  2022-01-15 15:38         ` Maxime Devos
@ 2022-01-15 18:46           ` Florian
  0 siblings, 0 replies; 12+ messages in thread
From: Florian @ 2022-01-15 18:46 UTC (permalink / raw)
  To: Maxime Devos, 53257


Hello Maxime,
to me, the functionality of search-paths seemed exactly communicating
paths *beyond* a single profile. It would make more sense to set
them with the package that installs the decisive files to me, at least
as a thumb-of-rule. Your examples don't really counter that, though, i
think ;)
In other words, what next?

> So as long as 'nano/emacs/vi/...' and 'kitty/foot/gnome-terminal-
> emulator/...' are in the _same_ profile, the environment variable
> of the search path is set.


Maxime Devos <maximedevos@telenet.be> writes:

> Florian schreef op za 15-01-2022 om 15:19 [+0000]:
>> Have you tried to add a search path to emacs or nano?
>
> I don't, but I presume it would work -- at least 'ncurses' has a
> TERMINFO_DIRS native-search-path, 'info-reader' and 'emacs' have an
> INFOPATH ...
>  
>> I kinda doubt this would do much; neither nano or emacs ship a terminfo
>> for kitty, or for foot. What I think could work is wrapping nano and
>> emacs and every terminal application that has problems to add a path
>> derived from generically set env vars to point to the places where
>
> It doesn't matter that nano and emacs don't ship terminfo files --
> if a package in the profile (or build environment) has some search
> path, then the search path is set with corresponding directories from
> _every_ package (*), irrespective of whether they have that search
> path.
>
> So as long as 'nano/emacs/vi/...' and 'kitty/foot/gnome-terminal-
> emulator/...' are in the _same_ profile, the environment variable
> of the search path is set.
>
> They aren't always in the same profile though, 
>
> (*) with some restrictions w.r.t. cross-compilation, native-search-
> path/search-path, native-inputs/inputs ...
>
> Greetings,
> Maxime.




^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-01-15 18:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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-15 15:46         ` Maxime Devos
2022-01-15 15:46         ` Maxime Devos
2022-01-15 14:24     ` Maxime Devos

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.