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

Reply via email to