all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* replacement for shell mode comint-kill-output
@ 2021-09-15  0:55 huey
  2021-09-15  6:20 ` tomas
  2021-09-15  6:29 ` Eli Zaretskii
  0 siblings, 2 replies; 4+ messages in thread
From: huey @ 2021-09-15  0:55 UTC (permalink / raw)
  To: help-gnu-emacs

back in the version 19.30 days I could bring up a shell in emacs and
enter shell commands.  After executing a command, C-c C-o
(comint-kill-output) would remove the output from the shell buffer and
place it in the kill ring, where I could do a simple yank and place
that output in another  buffer.

Today, using version 27.1, the comint-kill-output command is no
longer, and C-c C-o provides the similar function
comint-delete-output.  However, said output is not placed in the kill
ring, and cannot be yanked back.

Is there a different/simple way to achieve the previous behavior?

Thanks!



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: replacement for shell mode comint-kill-output
  2021-09-15  0:55 replacement for shell mode comint-kill-output huey
@ 2021-09-15  6:20 ` tomas
  2021-09-15  6:34   ` Eli Zaretskii
  2021-09-15  6:29 ` Eli Zaretskii
  1 sibling, 1 reply; 4+ messages in thread
From: tomas @ 2021-09-15  6:20 UTC (permalink / raw)
  To: help-gnu-emacs

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

On Tue, Sep 14, 2021 at 05:55:30PM -0700, huey wrote:
> back in the version 19.30 days I could bring up a shell in emacs and
> enter shell commands.  After executing a command, C-c C-o
> (comint-kill-output) would remove the output from the shell buffer and
> place it in the kill ring, where I could do a simple yank and place
> that output in another  buffer.
> 
> Today, using version 27.1, the comint-kill-output command is no
> longer, and C-c C-o provides the similar function
> comint-delete-output.  However, said output is not placed in the kill
> ring, and cannot be yanked back.
> 
> Is there a different/simple way to achieve the previous behavior?

The function documentation (i.e. C-h f comint-delete-output) says:

  comint-delete-output is an interactive compiled Lisp function in
  ‘comint.el’.
  
  (comint-delete-output &optional KILL)
  
  Delete all output from interpreter since last input.
  If KILL (interactively, the prefix), save the killed text in the
  kill ring.
  
  This command does not delete the prompt.
  
    Probably introduced at or before Emacs version 21.1.

So typing `C-u' before `C-c C-o' might do the trick. No idea why/when
`comint-kill-output' took the way out. In theory, of course, you could
make yourself one, along the lines

  (defun my-comint-kill-output ()
    (interactive)
    (comint-delete-output t))

and bind it so something.

Cheers
 - t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: replacement for shell mode comint-kill-output
  2021-09-15  0:55 replacement for shell mode comint-kill-output huey
  2021-09-15  6:20 ` tomas
@ 2021-09-15  6:29 ` Eli Zaretskii
  1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2021-09-15  6:29 UTC (permalink / raw)
  To: help-gnu-emacs

> From: huey <hueypokerbrainz@gmail.com>
> Date: Tue, 14 Sep 2021 17:55:30 -0700
> 
> back in the version 19.30 days I could bring up a shell in emacs and
> enter shell commands.  After executing a command, C-c C-o
> (comint-kill-output) would remove the output from the shell buffer and
> place it in the kill ring, where I could do a simple yank and place
> that output in another  buffer.

According to the VC history, that command stopped putting text on the
kill-ring in Apr 1994, i.e. in Emacs 19.23.

> Today, using version 27.1, the comint-kill-output command is no
> longer, and C-c C-o provides the similar function
> comint-delete-output.  However, said output is not placed in the kill
> ring, and cannot be yanked back.
> 
> Is there a different/simple way to achieve the previous behavior?

In Emacs 28, "C-u C-c C-o" would kill the text instead of deleting it.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: replacement for shell mode comint-kill-output
  2021-09-15  6:20 ` tomas
@ 2021-09-15  6:34   ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2021-09-15  6:34 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Wed, 15 Sep 2021 08:20:49 +0200
> From: <tomas@tuxteam.de>
> 
>   If KILL (interactively, the prefix), save the killed text in the
>   kill ring.

This part is Emacs 28 only, though.  The OP uses Emacs 27.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-15  6:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-15  0:55 replacement for shell mode comint-kill-output huey
2021-09-15  6:20 ` tomas
2021-09-15  6:34   ` Eli Zaretskii
2021-09-15  6:29 ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.