help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie question: How to disable pager in "guix search"?


From: Wojtek Kosior
Subject: Re: Newbie question: How to disable pager in "guix search"?
Date: Sun, 5 Mar 2023 23:21:55 +0100

Hi Rodrigo

> I asked the same question in <irc://irc.libera.chat/#guix> and someone
> recommended me setting PAGER to an empty value I did by executing the
> following command
> 
> ,----
> | export PAGER=
> `----

That's cool, I didn't know about this solution. Nevertheless, I'd like
to share the ones I've been using so far.

1. It's possible to just pipe the command throught `cat`, e.g.

    guix search python | cat

2. A fully functional terminal can be opened inside emacs with
   `M-x ansi-term`. It has a drawback that it killing and yanking
   requires swithing the buffer to line mode (`C-x C-j`) and then back
   to char mode (`C-c C-k`). But it's otherwise perfect for invoking
   programs that expect a smart terminal :)

Wojtek

-- (sig_start)
website: https://koszko.org/koszko.html
PGP: https://koszko.org/key.gpg
fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A

♥ R29kIGlzIHRoZXJlIGFuZCBsb3ZlcyBtZQ== | ÷ c2luIHNlcGFyYXRlZCBtZSBmcm9tIEhpbQ==
✝ YnV0IEplc3VzIGRpZWQgdG8gc2F2ZSBtZQ== | ? U2hhbGwgSSBiZWNvbWUgSGlzIGZyaWVuZD8=
-- (sig_end)


On Sun, 5 Mar 2023 14:50:29 -0500
Rodrigo Morales <moralesrodrigo1100@gmail.com> wrote:

> I asked the same question in <irc://irc.libera.chat/#guix> and someone
> recommended me setting PAGER to an empty value I did by executing the
> following command
> 
> ,----
> | export PAGER=
> `----
> 
> This solved the issue. Someone also recommended me setting the `PAGER'
> environmental variable in my Emacs configuration and shared his personal
> configuration which contained the following statements
> 
> ,----
> | (setenv "EDITOR"         "emacsclient")
> | (setenv "GIT_EDITOR"     "emacsclient")
> | (setenv "MANPATH"        (getenv "MANPATH"))
> | (setenv "PAGER"          "cat")
> | (setenv "PATH"           (getenv "PATH"))
> | (setenv "PROMPT_COMMAND" "")
> | (setenv "SHELL"          (getenv "SHELL"))
> | (setenv "TERM"           (getenv "TERM"))
> `----
> 
> On Sun, Mar 5, 2023 at 2:36 PM Rodrigo Morales <moralesrodrigo1100@gmail.com>
> wrote:
> 
> > Table of Contents
> > _________________
> >
> > 1. The problem
> > 2. The question
> >
> > 1 The problem
> > =============
> >
> >   Most of the times, I use shell-mode in Emacs and execute "guix"
> >   commands. When I execute "guix search", the following warning is shown
> >
> >   ,----
> >   | guix search emacs
> >   `----
> >
> >   ,----
> >   | WARNING: terminal is not functional
> >   | Press RETURN to continue
> >   `----
> >
> >   I think the reason why this happens is that the command tries to use a
> >   pager which is not possible in shell-mode.
> >
> >   I need to press C-c C-c to exit the command which is time-consuming
> >   and doesn't allow me to normally search a buffer as I would normally
> >   do it in Emacs.
> >
> >   I'd rather guix did not use a pager and instead show all the results
> >   in raw text since that way I can scroll up and search within Emacs.
> >
> >
> > 2 The question
> > ==============
> >
> >   How could I disable the pager in "guix search" and make it display the
> >   output in raw text?
> >  


Attachment: pgpvrbbvWLfTC.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]