From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block Date: Wed, 01 Jun 2016 09:15:37 -0400 Message-ID: References: <87lh2vo7s6.fsf@gmail.com> <87shx23830.fsf@gmail.com> <87wpmcwn13.fsf@russet.org.uk> <87wpm9q4z7.fsf@russet.org.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1464787120 19528 80.91.229.3 (1 Jun 2016 13:18:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 1 Jun 2016 13:18:40 +0000 (UTC) Cc: Chong Yidong , 23632@debbugs.gnu.org To: phillip.lord@russet.org.uk (Phillip Lord) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 01 15:18:28 2016 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 1b862N-0002Oa-TM for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Jun 2016 15:18:20 +0200 Original-Received: from localhost ([::1]:42153 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b862N-0007Vw-4V for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Jun 2016 09:18:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b860F-00069Z-RV for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2016 09:16:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b860A-0002Zl-PT for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2016 09:16:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36849) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b860A-0002Zb-Lz for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2016 09:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b860A-0003UB-7Q for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2016 09:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Jun 2016 13:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23632 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 23632-submit@debbugs.gnu.org id=B23632.146478694513374 (code B ref 23632); Wed, 01 Jun 2016 13:16:02 +0000 Original-Received: (at 23632) by debbugs.gnu.org; 1 Jun 2016 13:15:45 +0000 Original-Received: from localhost ([127.0.0.1]:49186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b85zt-0003Te-BF for submit@debbugs.gnu.org; Wed, 01 Jun 2016 09:15:45 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:18069) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b85zr-0003TR-EJ for 23632@debbugs.gnu.org; Wed, 01 Jun 2016 09:15:43 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AvEwA731xV/+/DSC1cgxCEAoVVuzcJhH6CTQQCAoE8ORQBAQEBAQEBgQpBBYNdAQEDAVYjBQsLNBIUGA2IWwjPIwEBAQEBAQQBAQEBHos6hQUHhC0FnxeSFINZI4FmJByBbiKCeAEBAQ X-IPAS-Result: A0AvEwA731xV/+/DSC1cgxCEAoVVuzcJhH6CTQQCAoE8ORQBAQEBAQEBgQpBBYNdAQEDAVYjBQsLNBIUGA2IWwjPIwEBAQEBAQQBAQEBHos6hQUHhC0FnxeSFINZI4FmJByBbiKCeAEBAQ X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="240151029" Original-Received: from 45-72-195-239.cpe.teksavvy.com (HELO pastel.home) ([45.72.195.239]) by ironport2-out.teksavvy.com with ESMTP; 01 Jun 2016 09:15:37 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 36E8063FDB; Wed, 1 Jun 2016 09:15:37 -0400 (EDT) In-Reply-To: <87wpm9q4z7.fsf@russet.org.uk> (Phillip Lord's message of "Tue, 31 May 2016 22:42:36 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:118929 Archived-At: > What worries me is that it just deals with the minibuffer. I wonder > whether there are other circumstances where a recursive edit is going to > break things. I guess we could introduce a new var (call it `undo-auto-current-buffer-only' or `undo-auto-ignore-other-buffers' or what have you) which packages could let-bind around recursive edits. We could also change the minibuf.c code to bind this var, so you could check the var instead of hard-coding (minibufferp) in your patch. The main use-case I can think of would be debug/edebug. This said, if the changes in other buffers are due to process-filters, then they still should get an undo-boundary during minibuffer/recursive edits. So maybe instead of "only push undo-boundaries in current-buffer", we should have a variable holding a list of buffers where we shouldn't push undo-boundaries (unless they're the current-buffer). Or an alternative would be to do what Viper does (well, did): keep pushing boundaries as before, but when we return from the minibuffer, remove any boundaries that were inserted into the current-buffer's undo-list during the recursive edit. > Incidentally, this is a nightmare to debug. Emacs needs to be able to > write to standard out, so I could log without changing any buffers! What I do is to push to a variable, and then observe the var from M-x ielm or some such. Stefan