[GRASS-dev] RE: [bug #4726] (grass) g.mapset: MAPSET parameter should default to PERMANENT

Maciek:

IMHO this is *not* a good idea. Why should we assume most users will want

to

switch most times to PERMANENT and not to any other mapset? I never do, so
having a default target mapset will only be a problem for me, not help.

Even so, you're doing no more work this way. You would still have had to
type in a new mapset for the mapset parameter. Ok, you are doing slightly
more work in that you have to delete the default entry an type over it, but
for users who are headed to PERMANENT anyway, there's no more typing to be
done. Where before everyone had to type in the mapset parameter, now at
least some people won't have to.

Maciek:

Besides, switching mapsets should be done in full concious, as you never

can

say what mapset you are in just at a glance, and this might lead to

undesired

data manipulation when you have layers of the same name in different

mapsets

and you switched not to the mapset you meant.

Hm, true. I always just put an alias for g.gisenv in my .grass.bashrc (like
'ev') so I can check quickly on the CLI where I am. Maybe a good idea for
gis.m map displays would be to include the name of the current mapset in the
tcltk canvas titlebar to aid in mapset identification? Michael, what do you
think?

~ Eric.

I agree with Maciek. This is not a good place to assume what the user wants to do.

And I, and I'm sure many others, never put data into PERMANENT (and there are probably many others who do, it's the user's preference), it's not a very descriptive name for a mapset and it's difficult to type (in my opinion). I wouldn't want to accidentally start importing data into a mapset I hadn't conciously selected.

If you want it to default to a mapset it would be quite simple to write a shell script, say g.mapset.default, to do this. It would then only need to take location and gisdbase params and pass them on. At least 'default' is easier to type than 'PERMANENT', or you can pick something shorter.

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

"Those people who most want to rule people are, ipso-facto, those least suited to do it."

- A rule of the universe, from the HitchHiker's Guide to the Galaxy