* Newbie question: How to disable pager in "guix search"?
@ 2023-03-05 19:36 Rodrigo Morales
2023-03-05 19:50 ` Rodrigo Morales
0 siblings, 1 reply; 4+ messages in thread
From: Rodrigo Morales @ 2023-03-05 19:36 UTC (permalink / raw)
To: help-guix
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?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Newbie question: How to disable pager in "guix search"?
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
0 siblings, 2 replies; 4+ messages in thread
From: Rodrigo Morales @ 2023-03-05 19:50 UTC (permalink / raw)
To: help-guix
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?
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Newbie question: How to disable pager in "guix search"?
2023-03-05 19:50 ` Rodrigo Morales
@ 2023-03-05 19:58 ` Felix Lechner via
2023-03-05 22:21 ` Wojtek Kosior via
1 sibling, 0 replies; 4+ messages in thread
From: Felix Lechner via @ 2023-03-05 19:58 UTC (permalink / raw)
To: Rodrigo Morales; +Cc: help-guix
Hi Rodrigo,
On Sun, Mar 5, 2023 at 11:53 AM Rodrigo Morales
<moralesrodrigo1100@gmail.com> wrote:
>
> | (setenv "EDITOR" "emacsclient")
I keep the small Guile script below in ~/.config/editor/always-emacs
and set EDITOR to that (in init.el).
Kind regards
Felix Lechner
* * *
#!/usr/bin/env guile
!#
(let* ((arguments (cdr (command-line)))
(inside-emacs (getenv "INSIDE_EMACS"))
(emacs-command (if (string-contains (or inside-emacs "") "comint")
(append '("emacsclient") arguments)
(append '("emacsclient" "--create-frame") arguments))))
(apply execlp emacs-command))
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Newbie question: How to disable pager in "guix search"?
2023-03-05 19:50 ` Rodrigo Morales
2023-03-05 19:58 ` Felix Lechner via
@ 2023-03-05 22:21 ` Wojtek Kosior via
1 sibling, 0 replies; 4+ messages in thread
From: Wojtek Kosior via @ 2023-03-05 22:21 UTC (permalink / raw)
To: Rodrigo Morales; +Cc: help-guix
[-- 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 --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-03-05 22:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).