[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Add function eshell/clear to clear current eshell buffer
From: |
Eli Zaretskii |
Subject: |
Re: Add function eshell/clear to clear current eshell buffer |
Date: |
Sat, 18 Apr 2015 16:43:16 +0300 |
> From: Ted Zlatanov <address@hidden>
> Date: Sat, 18 Apr 2015 09:31:35 -0400
>
> >> But eshell is not a terminal emulator. It's a shell. Emacs provides
> >> the text UI around it.
>
> EZ> I don't see the significance of this observation for the issue at
> EZ> hand. Eshell is an implementation of a shell in Emacs Lisp, and as
> EZ> such, Emacs is part of it. Therefore, we should compare what Eshell's
> EZ> command do with what shells+emulators do.
>
> I think Emacs' concepts of windows and buffers should override the
> typical terminal emulators' concepts of window and scrollback buffer.
Not when we are talking about a shell.
> Since Emacs typically doesn't clear just the window in normal usage,
> it's strange to do it here (especially by inserting blank lines).
It's a command; if you don't like it, don't use it.
But people who do want to start with a "clean slate" should be able
to.
> >> I would rename `eshell/clear' to `eshell/clear-view' and also provide
> >> `eshell/clear-buffer', if that's OK with Vibhav and everyone else?
>
> EZ> Eshell should have commands named like corresponding shell commands.
> EZ> Having commands with no namesakes in popular shells makes very little
> EZ> sense to me.
>
> >From the man page:
>
> clear clears your screen if this is possible, including its
> scrollback buffer (if the extended "E3" capability is defined).
> clear looks in the environment for the terminal type and then in
> the terminfo database to determine how to clear the screen.
>
> So, unless we come up with some E3 equivalent, I think it should be two
> commands or in some other way apparent that there's two operation modes
> to the `clear' eshell command.
The idea was that cleaning the scrollback buffer make little sense in
Emacs, because you gain nothing, but lose a chance to change your mind
later. So I think inventing the equivalent of E3 would be wasted
effort.
> For simplicity, how about `eshell/clear' for the window and
> `eshell/clear-scrollback' for the whole buffer (also invoked with
> universal-prefix on `eshell/clear')? The scrollback clear should IMO
> also make sure undo is enabled, but the text is not in any registers.
I'm not necessarily object, but again: what would be the purpose of
removing the scrollback? what will that give you?
- Re: Add function eshell/clear to clear current eshell buffer, Ted Zlatanov, 2015/04/18
- Re: Add function eshell/clear to clear current eshell buffer, Eli Zaretskii, 2015/04/18
- Re: Add function eshell/clear to clear current eshell buffer, Ted Zlatanov, 2015/04/18
- Re: Add function eshell/clear to clear current eshell buffer,
Eli Zaretskii <=
- Re: Add function eshell/clear to clear current eshell buffer, Ted Zlatanov, 2015/04/18
- Re: Add function eshell/clear to clear current eshell buffer, vibhavp, 2015/04/18
- Re: Add function eshell/clear to clear current eshell buffer, Eli Zaretskii, 2015/04/18
- Re: Add function eshell/clear to clear current eshell buffer, chad, 2015/04/18
- Re: Add function eshell/clear to clear current eshell buffer, Eli Zaretskii, 2015/04/18
- Re: Add function eshell/clear to clear current eshell buffer, vibhavp, 2015/04/18
- Re: Add function eshell/clear to clear current eshell buffer, Ted Zlatanov, 2015/04/18
- Re: Add function eshell/clear to clear current eshell buffer, vibhavp, 2015/04/19
- Re: Add function eshell/clear to clear current eshell buffer, Eli Zaretskii, 2015/04/19
- Re: Add function eshell/clear to clear current eshell buffer, vibhavp, 2015/04/19