unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Wojtek Kosior via <help-guix@gnu.org>
To: Rodrigo Morales <moralesrodrigo1100@gmail.com>
Cc: help-guix@gnu.org
Subject: Re: Newbie question: How to disable pager in "guix search"?
Date: Sun, 5 Mar 2023 23:21:55 +0100	[thread overview]
Message-ID: <20230305232155.10c59f0a.koszko@koszko.org> (raw)
In-Reply-To: <CAGxMbPbeqy8a3JU9KPFXBBj4a-ZJqBwBAHeCfp_rR67Nx5g+Rg@mail.gmail.com>

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

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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      parent reply	other threads:[~2023-03-05 22:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-05 19:36 Newbie question: How to disable pager in "guix search"? Rodrigo Morales
2023-03-05 19:50 ` Rodrigo Morales
2023-03-05 19:58   ` Felix Lechner via
2023-03-05 22:21   ` Wojtek Kosior via [this message]

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=20230305232155.10c59f0a.koszko@koszko.org \
    --to=help-guix@gnu.org \
    --cc=koszko@koszko.org \
    --cc=moralesrodrigo1100@gmail.com \
    /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.
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).