From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: view-mode exit hook? Date: Mon, 4 Aug 2008 08:03:10 -0700 Message-ID: <000001c8f643$35f59db0$0200a8c0@us.oracle.com> References: <000c01c883aa$27cceec0$0600a8c0@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1217862321 25150 80.91.229.12 (4 Aug 2008 15:05:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Aug 2008 15:05:21 +0000 (UTC) To: "'Emacs-Devel'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 04 17:06:12 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KQ1cu-0003MG-LT for ged-emacs-devel@m.gmane.org; Mon, 04 Aug 2008 17:05:50 +0200 Original-Received: from localhost ([127.0.0.1]:50613 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQ1by-0005BP-OP for ged-emacs-devel@m.gmane.org; Mon, 04 Aug 2008 11:04:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KQ1as-00047E-Ce for emacs-devel@gnu.org; Mon, 04 Aug 2008 11:03:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KQ1ar-00045P-5P for emacs-devel@gnu.org; Mon, 04 Aug 2008 11:03:29 -0400 Original-Received: from [199.232.76.173] (port=39210 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQ1aq-000450-Rj for emacs-devel@gnu.org; Mon, 04 Aug 2008 11:03:28 -0400 Original-Received: from rgminet01.oracle.com ([148.87.113.118]:15341) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KQ1an-0004r5-Mz for emacs-devel@gnu.org; Mon, 04 Aug 2008 11:03:28 -0400 Original-Received: from agmgw2.us.oracle.com (agmgw2.us.oracle.com [152.68.180.213]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id m74F30Vs022236 for ; Mon, 4 Aug 2008 09:03:00 -0600 Original-Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by agmgw2.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m74CK9qX031420 for ; Mon, 4 Aug 2008 09:02:59 -0600 Original-Received: from inet-141-146-46-1.oracle.com by acsmt353.oracle.com with ESMTP id 11217551031217862160; Mon, 04 Aug 2008 08:02:40 -0700 Original-Received: from dradamslap1 (/141.144.67.148) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 04 Aug 2008 08:02:40 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <000c01c883aa$27cceec0$0600a8c0@us.oracle.com> Thread-Index: AchsFsoznKpVRLmZQIiY26UzeCf2pQXk0DggHKZBpCA= X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:102039 Archived-At: Resending. > From: Drew Adams Sent: Tuesday, March 11, 2008 12:00 PM > Resending. > > Any arguments against adding such a hook? > Argument for adding it is below. > > ---------- > From: Drew Adams Sent: Saturday, January 05, 2008 4:33 PM > > > > > 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. > > > > `view-exit-action' is not currently a no-op, AFAICT. So > adding the feature > > of fitting the frame would not simply be a matter of > setting or binding > > `view-exit-action' to a `fit-frame' function. It would instead > > mean _adding_ frame fitting to whatever `view-exit-action' might > > already be doing. And that "whatever" is different, IIUC, depending > > on how view-mode is exited, and even, I think, depending on how > > view-mode was entered. (Again, I don't master that code, > nor do I want > > to.) > > > > `view-exit-action' is not simply a hook; it is more complex > (and perhaps > > more fragile). As I said, I can imagine tacking `fit-frame' > onto whatever > > `view-exit-action' does already, but I'd sooner advise > > `view-mode-exit'. And neither of those prospects looks particularly > > appealing (clean) to me. > > > > From what I've heard so far, there seems to be no recommended way > > to handle this kind of thing. In that case, I ask again, shouldn't > > there be a `view-mode-exit-hook'? > > How about such a hook?