help-guix
[Top][All Lists]
Advanced

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

Re: simple question about copying in the terminal


From: gfp
Subject: Re: simple question about copying in the terminal
Date: Fri, 7 Feb 2025 21:23:08 +0000

Hi Felix,

thanks to all for your pieces of advice
and to Felix for your detailed explanation,
I will try it in Emacs
because I am learning Emacs anyway.
even though tmux from ArnoudĀ“s mail is an interesting proposal.


thanks

Gottfried



Am 07.02.25 um 16:31 schrieb Felix Lechner:
Hi Gottfried,

On Fri, Feb 07 2025, gfp wrote:

You can read it with `guix package --search-paths -p
"/home/gfp/.guix-profile"'.

I think you want to redirect the output and edit it:

    guix package --search-paths -p "/home/gfp/.guix-profile" > /tmp/whatever

Then you can use vim to edit /tmp/whatever.  I personally recommend mg,
however, because it more like Emacs.  I used Emacs for ten years and
only knew these three key combinations:

    C-c C-x  to quit
    C-c C-s  to save
    C-c C-f  to open a file

When you are in your editor you will probably want to copy that line to
another script, which then executes the variable assignment.  You can
later run that file in Bash with

   $ . /tmp/whatever

Yes, that's a dot.  Bash also offers the more readable 'source' to load
files, but that may not work in other POSIX shells.

In summary, it's not possible to copy the line to a Bash command line
without a mouse---unless you are using Emacs.  It's one reason why many
of us do.

In Emacs, every window is an editor.  You can hit

    M-x shell

and copy/paste between output and the command line any way you like.

The marking commands in Emacs are:

    1. move point to beginning of copy area (with arrows or mouse)
    2. hit C-Space to set mark
    3. move point to end of copy area (which is now highlighted)
    4. hit C-w for copy (or M-w for cut)
    5. move point to destination
    6. hit C-y to retrieve saved text (or M-y to select from recent saves)

In Emacs, the 'mark' and the 'point' are two different things.

Kind regards
Felix

Attachment: OpenPGP_0xD9E413C6C4BB32CE.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

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