How to use kitty to "edit" the output of the last command in $EDITOR or copy it to the clipboard:
map kitty_mod+a>e launch --type=overlay --stdin-source=@last_cmd_output zsh -ic 'nvim -R </dev/stdin'
map kitty_mod+a>v launch --type=overlay --stdin-source=@last_cmd_output zsh -ic 'wl-copy/pbcopy </dev/stdin'
(kitty_mod mean Control+Shift)
this is for vim/neovim but use emacsclient -nw for emacs or whatever else rock your boat