From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.help Subject: Re: replacement for shell mode comint-kill-output Date: Wed, 15 Sep 2021 08:20:49 +0200 Message-ID: <20210915062049.GB27643@tuxteam.de> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QTprm0S8XgL7H0Dt" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11894"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/1.5.21 (2010-09-15) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 15 08:21:15 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mQOIF-0002u9-SV for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 15 Sep 2021 08:21:15 +0200 Original-Received: from localhost ([::1]:56058 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQOIE-0001vi-O3 for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 15 Sep 2021 02:21:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43564) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQOHt-0001va-Dq for help-gnu-emacs@gnu.org; Wed, 15 Sep 2021 02:20:53 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:45503) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.90_1) (envelope-from ) id 1mQOHr-0000Kc-EB for help-gnu-emacs@gnu.org; Wed, 15 Sep 2021 02:20:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To:Date; bh=yNw4g55z1/CvWhijIUIohF9oHosSb2odkVDPpp+M9qM=; b=OuTt3TeQP/MdEPO1rUVv/MnrSdEowM/hEwbU7rNw6DNRG6PJiQhnpPexS1Lt2EduWNb23AImxnm0jKZ+rwJNWIhOKKoTJK1sLD6hIL08lwvrxMSwFLzqrcC80XDI6NDf4jtLgLZq/fDqUI1i2foU3R6srevvUsIBq6yv0J9LKKbWc/uJMq9oStK+FmbaFpsD3bHFiASq7Cd4O31qvLCHe1SVPDs8nyc76jmVrEqaPGGJs0aJTgQNDasFABaf68bhOh5ekERltv2Joqx2b07/Y2tIrL5fZ6sxxnjQlglEVIPxh+RgAezJ+96+yf+7Xl7FJkPEoa+Dlu/i0aghE+e/GA==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1mQOHp-0007Rn-1l for help-gnu-emacs@gnu.org; Wed, 15 Sep 2021 08:20:49 +0200 Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:133055 Archived-At: --QTprm0S8XgL7H0Dt Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. >=20 > 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 =E2=80=98comint.el=E2=80=99. =20 (comint-delete-output &optional KILL) =20 Delete all output from interpreter since last input. If KILL (interactively, the prefix), save the killed text in the kill ring. =20 This command does not delete the prompt. =20 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 --QTprm0S8XgL7H0Dt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAmFBkMEACgkQBcgs9XrR2kb5qwCeN0vn+5ahl2Yoiq47ywcV0omw HI0An3zbEsYU7QBjHirV9TsSO5aKdjRh =wHmj -----END PGP SIGNATURE----- --QTprm0S8XgL7H0Dt--