session management
Pavel Roskin
proski at gnu.org
Sun Oct 26 02:03:32 UTC 2003
On Sat, 25 Oct 2003, Oswald Buddenhagen wrote:
> moin,
>
> first off, i think the file viewer should save the position (along with
> other options, like hex, raw, etc.) per file, just like the editor does.
> anyway, now for the real topic ...
I agree with it and it's not hard to do. I've added it to the TODO list
for "after 4.6.1".
> in a "heavily x-windowed environment" you want session management. for
> mc, that consists mostly of:
> - the locations of both panels, including the the cursor position (yes,
> i demand a lot :) (1)
In fact, mc already saves too much for my liking if "auto save setup" is
enabled. If I run new mc I don't want it to go where I left the previous
instance. I know, other people have different preferences, so ideally the
"auto save" option should be split into several options, such as whether
to save which panel is current or whether to save the last directories.
> - an open viewer/editor, including state (position, options) specific to
> that particular instance (2)
I'm afraid I don't understand this. Currently, file positions are saved
in one file, which is shared between all processes. If you are you saying
that it's the session manages that should run mc and tell it what to do, I
think it's insane.
> - that unsaved changes in an editor are not lost. i.e., a nice
> yes/no/cancel dialog at shutdown time (3)
Maybe it's a good idea, although I have never lost anything valuable by
closing terminal with mc.
> mc is an x client, so theoretically xsmp can be used to do real session
> management.
Could you please post a link that would explain why session management is
considered a good idea? Do you use session management for yourself?
> in fact, (3) can be done perfectly, i think; even raising the correct
> window for the dialog can be done, as all sane terminal emulators export
> WINDOWID. getting notified about a shutdown and the ability to interrupt
> it are part of xsmp.
I'm not very good at X programming. What mc do with the xterm window when
a file is modified? How can it intercept closing its window?
> saving and restoring the status to implement (1) & (2) is quite simple
> as well, it just requires some work. :)
I believe that are more important things than that. For example, proper
support for UTF-8. And they also seem to be simple at the first glance.
--
Regards,
Pavel Roskin
More information about the mc-devel
mailing list