From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Bob Newell Newsgroups: gmane.emacs.help Subject: Re: How to really clear eshell buffer? Date: Fri, 8 Jun 2018 07:50:39 -1000 Message-ID: References: <39643308-1912-7c8c-88b8-e777f1b5230c@xgm.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1528481736 9662 195.159.176.226 (8 Jun 2018 18:15:36 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 8 Jun 2018 18:15:36 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 08 20:15:32 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fRLv9-0002PZ-Sf for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Jun 2018 20:15:32 +0200 Original-Received: from localhost ([::1]:37504 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRLxG-0000Zj-L4 for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Jun 2018 14:17:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48669) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRLXR-0004yB-Mh for help-gnu-emacs@gnu.org; Fri, 08 Jun 2018 13:51:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRLXQ-0002pd-Qs for help-gnu-emacs@gnu.org; Fri, 08 Jun 2018 13:51:01 -0400 Original-Received: from mail-yw0-x234.google.com ([2607:f8b0:4002:c05::234]:46294) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fRLXQ-0002pT-K6 for help-gnu-emacs@gnu.org; Fri, 08 Jun 2018 13:51:00 -0400 Original-Received: by mail-yw0-x234.google.com with SMTP id v197-v6so4378887ywc.13 for ; Fri, 08 Jun 2018 10:51:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bobnewell-net.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:cc; bh=wFv3ueIxzZC2buMP4sjb/1EohDutDBjw0KtcpPvYsSU=; b=rnLzXNOZPUFWOFhNPX0acn5dQhxZQwHrmJ+ItnF2u8uhr4DUAEQqAY8fAJpYPrvlj4 zUF7k6vvbR5JbmvILVKqsZQ3LV/gDQUDxxqGVtebbRcdeboN3cIVvfbRR9ul5dPpP0Dt 2hShMzGg4TK/ewCYOG7lJjbRIToHlSszvG7va0I+nDfCGlpYKVf3h5weqG7bAtqPDPsU tkqbBvZHtZTF23MOopsp39PoSpFtVwbjRpru4fgOcr8vv9s32q8ITxq8fFlJoo++U8Pg 3dSdGuNrwyTyQDyQRug8lKA7dHvHrWjraCloXsN8RZOFJ4+t2eD8VenUtyUT1b0TTxq4 msOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:cc; bh=wFv3ueIxzZC2buMP4sjb/1EohDutDBjw0KtcpPvYsSU=; b=mBENKfKVJMSA6IOG6n6kajIClEnbifdBFTDIibNX7+q/lYReq3WmDBS3w22t53gTGt x3D8nIi3uLacrwMo+1oVLEm8umjPDBx5hwBPLaSs3R618tPXdXdqTICt1mwvSNnH+Zp+ CNJFbrW8QaxAsAENbgGEQnsZukK0pIAKLKdCG/BQP+UG1GVBqeVG5dD0TZyrXLN0vKZ1 drZwVVtq0eG38nLJagJ6z2RcU+vODKVa9cB/TLNJ+D1hqRdGos1xbr86OF0wqoQnOoP+ j1T27hnNM/3oQl9AkFKg2Hv+a3ih8Qet+yYBMKhxL/PvurUCeTSPXJEL/p9MtA+iIng1 2seQ== X-Gm-Message-State: APt69E2BY6L4pH2jog8QnqypxpQC+Z1WWF8/m+JQQp3XkvPGF6gCQ4x8 Dwui2PUjBHxTJNfVLr7gEeDKfBlJE7jeAhW09nUVbA== X-Google-Smtp-Source: ADUXVKI+dFyFDTHRq5kmDZ3kodEh1rZ3oBTNlWnJVBEzMyaVgmy9J+zyiAJFIaH/7Vcf3AAy2O1PrE/an5iAbx3xPt8= X-Received: by 2002:a0d:e6d4:: with SMTP id p203-v6mr4312849ywe.381.1528480259596; Fri, 08 Jun 2018 10:50:59 -0700 (PDT) Original-Received: by 2002:a25:250e:0:0:0:0:0 with HTTP; Fri, 8 Jun 2018 10:50:39 -0700 (PDT) In-Reply-To: <39643308-1912-7c8c-88b8-e777f1b5230c@xgm.de> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4002:c05::234 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:117056 Archived-At: > I want to really clear an eshell buffer, which means that all former output is deleted, not just scrolled away. (defun clear-eshell () (interactive) (setq inhibit-read-only t) (kill-region (point-min) (point-max))) I don't see any real need to switch back to read-only mode. Tie to a key if you wish and run while in the eshell buffer. -- Bob Newell Honolulu, Hawai`i Sent via Linux Mint 17.