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 07:38:12 -0500 Message-ID: <20489.20788.573738.502819@lukas.physics.niu.edu> References: <87pq7s6b8q.fsf@gnu.org> <20488.31825.986146.195944@gargle.gargle.HOWL> <20489.13911.18062.669102@lukas.physics.niu.edu> 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 1342787939 15690 80.91.229.3 (20 Jul 2012 12:38:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 20 Jul 2012 12:38:59 +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 14:38:57 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 1SsCTw-0002VT-3g for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Jul 2012 14:38:56 +0200 Original-Received: from localhost ([::1]:45839 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SsCTv-0007iL-Fw for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Jul 2012 08:38:55 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SsCTn-0007h8-HE for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2012 08:38:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SsCTl-00060J-B9 for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2012 08:38:47 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42514) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SsCTl-000609-76 for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2012 08:38:45 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SsCZp-0004xC-Qe for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2012 08:45:01 -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 12:45:01 +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.134278827318996 (code B ref 11983); Fri, 20 Jul 2012 12:45:01 +0000 Original-Received: (at 11983) by debbugs.gnu.org; 20 Jul 2012 12:44:33 +0000 Original-Received: from localhost ([127.0.0.1]:52060 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SsCZN-0004wL-0Y for submit@debbugs.gnu.org; Fri, 20 Jul 2012 08:44:33 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:49549) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SsCZK-0004wE-Tx for 11983@debbugs.gnu.org; Fri, 20 Jul 2012 08:44:31 -0400 Original-Received: from lukas.physics.niu.edu ([131.156.85.221]:53328) by fencepost.gnu.org with esmtpa (Exim 4.71) (envelope-from ) id 1SsCTF-0000Po-LN; Fri, 20 Jul 2012 08:38:13 -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:62188 Archived-At: On Fri Jul 20 2012 Stefan Monnier wrote: > > 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? > > (unwind-protect > (recursive-edit) > (cleanup-form)) Ah, thanks, that's indeed not more complicated either. > The issue is not that the buffer is not reset when you return from > electric-buffer-list, but that during electric-buffer-list if you select > some other window you do not exit electric-buffer-list and the keys end > up behaving weird (e.g. typing "c" in a normal buffer will insert "c" > and then move to EOB or something like that). Once you exit from > electric-buffer-list, things are back to normal. In BBDB this issue has been address by making relevant commands electric: any command that is intended to quit the electric command loop (in the context of electric-buffer-list this could mean: you select another buffer to work with) will throw 'return-tag. Then you can continue normally. Of course, this means: the code needs to provide electric versions of all relevant commands. If the user still decides to do something else, the result is undefined. > What I'm saying is that it's tricky to use Electric-command-loop without > introducing bugs because Electric-command-loop presumes that all > operations will stay within the current buffer, but it does not (help > to) try to enforce it. So it's a poor API. I do not disagree here. I got into all this business because the Electric-command-loop has been present in old versions of BBDB. But I would not miss it, if it disappeared. (I do not even know whether any other BBDB user would miss it. I'll ask on the BBDB mailing list.) Roland