From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: bug#11774: bug#11774: bug#11774: org-mode causes undo boundaries to be lost Date: Wed, 01 Aug 2012 16:26:23 +0200 Message-ID: <87y5lyn0xc.fsf@gnu.org> References: <20120703095729.GA6651@c3po> <4FF30D50.8010009@os.inf.tu-dresden.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:41582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwZsl-0002wN-F9 for emacs-orgmode@gnu.org; Wed, 01 Aug 2012 10:26:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwZsj-0003cS-Tp for emacs-orgmode@gnu.org; Wed, 01 Aug 2012 10:26:39 -0400 Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-Message-ID: In-Reply-To: (Stefan Monnier's message of "Wed, 18 Jul 2012 09:21:42 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: 11774@debbugs.gnu.org Cc: monnier@IRO.UMontreal.CA Stefan Monnier writes: >>>> self-insert-command. Even just turning that magic 20 number into a >>>> variable would help. >>> Providing it as a variable would be very easy, indeed. >> Maybe the user should be able to set undo boundaries and >> have them work after self-insert-command? Dunno, I'm >> not familiar with internals enough to opine. > > I installed the patch below which makes self-insert-command more careful > to only remove undo boundaries that were auto-added. > So (add-hook 'post-self-insert-hook #'undo-boundary 'append) should give you > pretty much the behavior you were looking for. On Org's side, `org-self-insert-cluster-for-undo' now defaults to nil for Emacs >=24.1, t otherwise. Thanks, -- Bastien