From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nicolas Richard Newsgroups: gmane.emacs.help Subject: Re: eshell clear Date: Fri, 03 Jul 2015 13:54:08 +0200 Message-ID: <878uaxe9sv.fsf@members.fsf.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1435924479 32524 80.91.229.3 (3 Jul 2015 11:54:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 3 Jul 2015 11:54:39 +0000 (UTC) Cc: help-gnu-emacs To: Luca Ferrari Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 03 13:54:30 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZAzY4-0006jF-Mh for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Jul 2015 13:54:28 +0200 Original-Received: from localhost ([::1]:40634 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAzY4-00039m-5p for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Jul 2015 07:54:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60982) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAzXt-00039d-3o for help-gnu-emacs@gnu.org; Fri, 03 Jul 2015 07:54:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAzXn-000475-Iu for help-gnu-emacs@gnu.org; Fri, 03 Jul 2015 07:54:17 -0400 Original-Received: from mxin.ulb.ac.be ([164.15.128.112]:57580) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAzXn-00046u-Cb for help-gnu-emacs@gnu.org; Fri, 03 Jul 2015 07:54:11 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Au4EALd2llWkD4Xx/2dsb2JhbABbhEWrBgEBAQEBAQaaHIIFAQEBAQEBgQuEJAEBAwF5BQsIAw4TJQ8BBEMGE4gaAwoIyCkQhV0shh2FLoUGhDIFlBWUEpAnJoN8PDGCSwEBAQ Original-Received: from mathsrv4.ulb.ac.be (HELO localhost) ([164.15.133.241]) by smtp.ulb.ac.be with ESMTP; 03 Jul 2015 13:54:10 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 164.15.128.112 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105386 Archived-At: Luca Ferrari writes: > Hi, > this should be trivial, but how can I clear an eshell buffer > (something similar to 'clear' command in many shells)? C-c C-t will truncate the buffer to leave just eshell-buffer-maximum-lines lines. Based on that, you can do : (defun luca/eshell-clear-buffer () (interactive) (let ((eshell-buffer-maximum-lines 0)) (eshell-truncate-buffer))) -- Nico.