From: <tomas@tuxteam.de>
To: help-gnu-emacs@gnu.org
Subject: Re: replacement for shell mode comint-kill-output
Date: Wed, 15 Sep 2021 08:20:49 +0200 [thread overview]
Message-ID: <20210915062049.GB27643@tuxteam.de> (raw)
In-Reply-To: <CAHD1uAhthgwqERwmefGhEK6XGurwxS53p4f5yhYsV3zn-U1RyQ@mail.gmail.com>
[-- 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 --]
next prev parent reply other threads:[~2021-09-15 6:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-15 0:55 replacement for shell mode comint-kill-output huey
2021-09-15 6:20 ` tomas [this message]
2021-09-15 6:34 ` Eli Zaretskii
2021-09-15 6:29 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210915062049.GB27643@tuxteam.de \
--to=tomas@tuxteam.de \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).