From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Roland Winkler" Newsgroups: gmane.emacs.bugs Subject: bug#11983: 24.1; Electric-command-loop broken? Date: Fri, 20 Jul 2012 05:43:35 -0500 Message-ID: <20489.13911.18062.669102@lukas.physics.niu.edu> References: <87pq7s6b8q.fsf@gnu.org> <20488.31825.986146.195944@gargle.gargle.HOWL> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1342781043 22738 80.91.229.3 (20 Jul 2012 10:44:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 20 Jul 2012 10:44:03 +0000 (UTC) Cc: 11983@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 20 12:44:02 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SsAgj-0002Zb-Kw for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Jul 2012 12:44:01 +0200 Original-Received: from localhost ([::1]:56016 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SsAgi-0004Am-Qt for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Jul 2012 06:44:00 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53226) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SsAga-000497-UV for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2012 06:43:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SsAgV-0007ME-1w for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2012 06:43:52 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42329) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SsAgU-0007MA-Uo for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2012 06:43:46 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SsAmY-0001XO-M9 for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2012 06:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Roland Winkler" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Jul 2012 10:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11983 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11983-submit@debbugs.gnu.org id=B11983.13427813985895 (code B ref 11983); Fri, 20 Jul 2012 10:50:02 +0000 Original-Received: (at 11983) by debbugs.gnu.org; 20 Jul 2012 10:49:58 +0000 Original-Received: from localhost ([127.0.0.1]:51875 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SsAmT-0001X2-SX for submit@debbugs.gnu.org; Fri, 20 Jul 2012 06:49:58 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:47535) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SsAmO-0001Ws-KO for 11983@debbugs.gnu.org; Fri, 20 Jul 2012 06:49:53 -0400 Original-Received: from lukas.physics.niu.edu ([131.156.85.221]:53276) by fencepost.gnu.org with esmtpa (Exim 4.71) (envelope-from ) id 1SsAgJ-0002qd-MD; Fri, 20 Jul 2012 06:43:35 -0400 In-Reply-To: X-Mailer: VM 8.2 trial under 24.1.1 (x86_64-unknown-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:62183 Archived-At: On Fri Jul 20 2012 Stefan Monnier wrote: > > (unwind-protect > > (catch 'return-tag > > (Electric-command-loop 'return-tag)) > > (cleanup-form)) > > But in which way is this different from `recursive-edit'? I do not know much about recursive-edit. How would you use it as a replacement for the above to be sure that after leaving recursive-edit cleanup-form is always executed? > It seems that it requires a fair bit of extra surrounding code to > use it right. E.g. electric-buffer-list is buggy because it lacks > this extra code: after popping up the electric-buffer-list, you > can select some other window and work there, but the behavior is > then all messed up. The amount of protection provided by an Electric-command-loop depends on the surrounding code (save-excursion, save-window-excursion, etc.) I believe that the intended usage pattern of Electric-command-loop does not include too wild things such as selecting other windows. Or phrased differently: of course, you can always do whatever you like. But only cleanup-form is definitely evaluated at the end. Roland