From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!not-for-mail
From: vibhavp@gmail.com
Newsgroups: gmane.emacs.devel
Subject: Re: [PATCH] Add function eshell/clear to clear current eshell buffer
Date: Mon, 09 Mar 2015 00:58:12 +0530
Message-ID: <87y4n7e1bn.fsf@gmail.com>
References: <874mpwhxml.fsf@gmail.com> <83lhj7lcgn.fsf@gnu.org>
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: ger.gmane.org 1425842912 23958 80.91.229.3 (8 Mar 2015 19:28:32 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sun, 8 Mar 2015 19:28:32 +0000 (UTC)
Cc: emacs-devel@gnu.org
To: Eli Zaretskii <eliz@gnu.org>
Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 08 20:28:31 2015
Return-path: <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>
Envelope-to: ged-emacs-devel@m.gmane.org
Original-Received: from lists.gnu.org ([208.118.235.17])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>)
	id 1YUgsJ-0005fE-4V
	for ged-emacs-devel@m.gmane.org; Sun, 08 Mar 2015 20:28:31 +0100
Original-Received: from localhost ([::1]:40300 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>)
	id 1YUgsI-0007kn-Fa
	for ged-emacs-devel@m.gmane.org; Sun, 08 Mar 2015 15:28:30 -0400
Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33893)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vibhavp@gmail.com>) id 1YUgrx-0007jo-T2
	for emacs-devel@gnu.org; Sun, 08 Mar 2015 15:28:14 -0400
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vibhavp@gmail.com>) id 1YUgrt-0002Gj-Sd
	for emacs-devel@gnu.org; Sun, 08 Mar 2015 15:28:09 -0400
Original-Received: from mail-pd0-x22f.google.com ([2607:f8b0:400e:c02::22f]:34244)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vibhavp@gmail.com>)
	id 1YUgrt-0002Gd-LC; Sun, 08 Mar 2015 15:28:05 -0400
Original-Received: by pdno5 with SMTP id o5so15534496pdn.1;
	Sun, 08 Mar 2015 12:28:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:references:date:in-reply-to:message-id
	:user-agent:mime-version:content-type;
	bh=Pr6tKRAu2BuYbWBB889xRMFzYYAeAMEFRBysuwLnqic=;
	b=VmZJIogMZ9IJBbbf12Xh++mdDPKrYX9qhJe4P1zmPF58AVtyubJZzciut3agnsUdpQ
	huXVinqtRZJLB6TwNubhkB8pb2DORUBMM0yFSCH/gcC7hGnm2WDRmfMamV4VHJH/veGB
	2ez1By4eWAaa4Ijk5m0UIwwg7b7AEk11y34qqzew5E1cevVY/GYKVKSwhZ7yG+Wl9I4W
	sSIl5T0L0XIcLjYjYpSRukDm2C/khEKCu1kVrAM04eU2gwHK0qECyTK4oIuLgNxB0oew
	NJyxf+JuszsECVBL5haz2WSySrh4Ab47haRKHWtJZ32D1lcgxbVV3TaZyZaoxtdtrf18
	LR+w==
X-Received: by 10.70.53.40 with SMTP id y8mr14316523pdo.61.1425842884606;
	Sun, 08 Mar 2015 12:28:04 -0700 (PDT)
Original-Received: from lenovog410 ([117.201.82.9]) by mx.google.com with ESMTPSA id
	c17sm15435304pdl.79.2015.03.08.12.28.01
	(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
	Sun, 08 Mar 2015 12:28:03 -0700 (PDT)
In-Reply-To: <83lhj7lcgn.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 08 Mar
	2015 17:45:44 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
	(bad octet value).
X-Received-From: 2607:f8b0:400e:c02::22f
X-BeenThere: emacs-devel@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Emacs development discussions." <emacs-devel.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-devel>,
	<mailto:emacs-devel-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/emacs-devel>
List-Post: <mailto:emacs-devel@gnu.org>
List-Help: <mailto:emacs-devel-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-devel>,
	<mailto:emacs-devel-request@gnu.org?subject=subscribe>
Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org
Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org
Xref: news.gmane.org gmane.emacs.devel:183733
Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/183733>

Eli Zaretskii <eliz@gnu.org> writes:

> As someone who was more than once in a situation where I would give
> half of my kingdom for an opportunity to look again at the contents of
> the screen I just "clear"ed

Most shells do something list this, and moves the prompt the top of the
window. Elisp has something similar with (recenter-top-bottom), but
eshell overrides this by going to the window's bottom again.

> how about filling the window with blank
> lines instead, so that the old contents are out of sight, but still
> reachable?  Would that make sense?

Unfortunately, I don't know how to do that :(. Although, I think that
can be done with getting the number of lines between (point-max) and the
top of the window, and then inserting these many newlines.

-- 
Vibhav Pant
vibhavp@gmail.com