[GRASS-dev] [GRASS GIS] #3849: Do we need to clear the screen when entering/exiting GRASS?

#3849: Do we need to clear the screen when entering/exiting GRASS?
-------------------------+-------------------------
Reporter: pmav99 | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Startup | Version: svn-trunk
Keywords: | CPU: Unspecified
Platform: Unspecified |
-------------------------+-------------------------
Clearing the screen can often be problematic. More specifically, depending
on the SHELL/terminal emulator you use you might lose the ability to
scroll back which can be very annoying. Are there any objections in
removing it?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3849&gt;
GRASS GIS <https://grass.osgeo.org>

#3849: Do we need to clear the screen when entering/exiting GRASS?
--------------------------+-------------------------
  Reporter: pmav99 | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone:
Component: Startup | Version: svn-trunk
Resolution: | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by wenzeslaus):

No objections from me. It does not seem that other interpreters or
environments are doing it (Python, R, Octave, Bash) even if they show a
significant startup message by default (R, Octave). Although this ticket
is about interactive use from command line, same is also needed to solve
most if not all of #2639 which is about behaving as expected when stdin is
provided (`grass --tmp-location XY --text < script.sh`). I continue with a
modification of my comment from https://github.com/OSGeo/grass/pull/4:

I see at least 3 different things happening:

1. Clear happens at the beginning and at the end. (in "interactive mode",
without `--exec`)
2. Banner is displayed. (in "interactive mode", without `--exec`)
3. Bunch of messages is printed (//Starting GRASS GIS...// etc.). (even
with `--exec`)

Here we focus on the clearing only.

In #2639 I compared behavior to Python and R in case when standard input
is provided. As for interactive use, Python (`python`), R (`R`), and
Octave (`octave --no-gui`) display banners (of different lengths), but
none of them clears the terminal (at the beginning or the end). That
suggests that `grass` should not do that either.

Copy-pasted command line when R, Octave, Python, and Bash are started and
ended follows (newlines preserved, no clearing involved):

{{{
$ previous-command
$ R

R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

   Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> q()
Save workspace image? [y/n/c]: n
$ octave --no-gui
GNU Octave, version 4.0.0
Copyright (C) 2015 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. For details, type 'warranty'.

Octave was configured for "x86_64-pc-linux-gnu".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/get-involved.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.

>> exit

$ python
Python 2.7.12 (default, Nov 12 2018, 14:36:49)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
$ bash
$ exit
exit
$ following-command
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3849#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#3849: Do we need to clear the screen when entering/exiting GRASS?
--------------------------+-------------------------
  Reporter: pmav99 | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone:
Component: Startup | Version: svn-trunk
Resolution: | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by pmav99):

I closed [https://github.com/OSGeo/grass/pull/4 PR4] since it does more
than one thing and it might need to be further discussed.
[https://github.com/OSGeo/grass/pull/12 PR12] is a new one that only
removes the clear screen stuff.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3849#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#3849: Do we need to clear the screen when entering/exiting GRASS?
--------------------------+-------------------------
  Reporter: pmav99 | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone:
Component: Startup | Version: svn-trunk
Resolution: | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by wenzeslaus):

Can somebody second the removal from user perspective? Is terminal
clearing important to you in some way or will you welcome not clearing?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3849#comment:3&gt;
GRASS GIS <https://grass.osgeo.org>

#3849: Do we need to clear the screen when entering/exiting GRASS?
--------------------------+-------------------------
  Reporter: pmav99 | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone:
Component: Startup | Version: svn-trunk
Resolution: | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by sbl):

Like Panos, I also feel that clearing the screen is rather unhelpful.
Thus, I would vote for removing it as well.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3849#comment:4&gt;
GRASS GIS <https://grass.osgeo.org>

#3849: Do we need to clear the screen when entering/exiting GRASS?
--------------------------+-------------------------
  Reporter: pmav99 | Owner: grass-dev@…
      Type: enhancement | Status: closed
  Priority: normal | Milestone: 7.8.0
Component: Startup | Version: svn-trunk
Resolution: fixed | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------
Changes (by neteler):

* status: new => closed
* resolution: => fixed
* milestone: => 7.8.0

Comment:

[https://github.com/OSGeo/grass/pull/12 PR12] has been merged, closing.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3849#comment:5&gt;
GRASS GIS <https://grass.osgeo.org>