From: martin rudalics <rudalics@gmx.at>
To: Drew Adams <drew.adams@oracle.com>
Cc: Emacs-Devel <emacs-devel@gnu.org>
Subject: Re: view-mode exit hook?
Date: Wed, 19 Dec 2007 07:39:11 +0100 [thread overview]
Message-ID: <4768BC8F.90308@gmx.at> (raw)
In-Reply-To: <BNELLINCGFJLDJIKDGACGEODCFAA.drew.adams@oracle.com>
> I wasn't suggesting to use `view-mode-hook'. As I noted, that is run only
> upon entering the mode. I don't know whether view-mode manages to keep track
> of window configs - I thought it did, but that's beside the point here. What
> would be needed in this case would be restoring the frame config, not a
> window config. _If_ that were feasible.
If you want to restore the frame configuration you have to save it first.
Where do you want to do that? All I said was that `view-mode-hook' might
be the wrong place.
> If the frame cannot be restored, I'm happy to deal with this by fitting the
> frame again upon view-mode exit, even though that is less desirable for a
> user than putting back the frame parameters s?he had before view-mode.
>
> I don't want to go near `view-exit-action', if I can avoid it. That code is
> far too complicated for a mortal such as I. I did think that I could
> recuperate the current value of `view-exit-action' and then tack my function
> call onto it, but that seems quite ugly. I'd sooner advise `view-mode-exit',
> I think (and I don't like to use advice either).
>
> I was looking for a simple and clean way to go, such as a hook.
>
> Does it make sense for Emacs to have a `view-mode-exit-hook'?
You can always think of `view-exit-action' as doing that. For example,
there's no harm setting `view-exit-action' to a function that restores
a frame configuration saved earlier. The question remains _which_ frame
configuration you want to restore.
next prev parent reply other threads:[~2007-12-19 6:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-18 19:03 view-mode exit hook? Drew Adams
2007-12-18 21:52 ` martin rudalics
2007-12-18 22:47 ` Drew Adams
2007-12-19 6:39 ` martin rudalics [this message]
2007-12-19 7:24 ` Drew Adams
2008-01-06 0:33 ` Drew Adams
-- strict thread matches above, loose matches on Subject: below --
2008-03-11 19:00 FW: " Drew Adams
2008-08-04 15:03 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4768BC8F.90308@gmx.at \
--to=rudalics@gmx.at \
--cc=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.