unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#11774: org-mode causes undo boundaries to be lost
@ 2012-06-24 21:27 Toby Cubitt
  2012-06-24 21:39 ` Bastien
  0 siblings, 1 reply; 17+ messages in thread
From: Toby Cubitt @ 2012-06-24 21:27 UTC (permalink / raw)
  To: 11774

Steps to reproduce, starting from "emacs -Q":
1. C-x C-f test.org
2. M-x org-mode
3. M-: (add-hook 'post-command-hook
        (lambda () (message "%s" buffer-undo-list)) nil t)
4. type "a"
5. C-<SPC> C-<SPC>
6. type "bc"

Expected behaviour:
contents of `buffer-undo-list' after step 6. should be
((2 . 4) nil (1 . 2) (t . -1))

Actual behaviour:
contents of `buffer-undo-list' after step 6. are
((2 . 4) (1 . 2) (t . -1))


For some unknown reason, org-mode is causing the undo boundary between
the (2 . 4) and (1 . 2) entries to be removed from `buffer-undo-list'.

If we try the same thing under another major mode (e.g. replace
step 2 with "M-x text-mode"), then `buffer-undo-list' does contain the
undo boundary, as expected.

Step 3 is there to monitor what's going on. The same results are obtained
if that step is omitted. However, with the post-command-hook enabled, you
can see that the undo boundary is still there after typing "b" in
step 6, but gets deleted after typing "c".

This might look like a minor bug, but it can have severe
consequences. E.g. when using undo-tree-mode in org-mode, the corrupted
`buffer-undo-list' contents cause undo-tree-mode to discard the entire
undo history.

Toby



In GNU Emacs 24.1.50.2 (i686-pc-linux-gnu, GTK+ Version 2.24.10)
 of 2012-06-20 on c3po
Windowing system distributor `The X.Org Foundation', version 11.0.11104000
Configured using:
 `configure '--prefix=/usr' '--host=i686-pc-linux-gnu'
 '--mandir=/usr/share/man' '--infodir=/usr/share/info'
 '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib'
 '--disable-dependency-tracking' '--program-suffix=-emacs-24-vcs'
 '--infodir=/usr/share/info/emacs-24-vcs'
 '--enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp'
 '--with-crt-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.5.3/../../../../lib'
 '--with-gameuser=games' '--without-compress-info' '--without-hesiod'
 '--without-kerberos' '--without-kerberos5' '--with-gpm' '--with-dbus'
 '--without-gnutls' '--without-xml2' '--without-selinux'
 '--without-wide-int' '--without-sound' '--with-x' '--without-ns'
 '--without-gconf' '--without-gsettings' '--with-toolkit-scroll-bars'
 '--without-gif' '--without-jpeg' '--with-png' '--with-rsvg'
 '--without-tiff' '--with-xpm' '--without-imagemagick' '--with-xft'
 '--without-libotf' '--without-m17n-flt' '--with-x-toolkit=gtk'
 'EBZR_BRANCH=trunk' 'EBZR_REVNO=108667' '--build=i686-pc-linux-gnu'
 'build_alias=i686-pc-linux-gnu' 'host_alias=i686-pc-linux-gnu'
 'CFLAGS=-march=prescott -O2 -pipe -O2' 'LDFLAGS=-Wl,-O1
 -Wl,--as-needed' 'CPPFLAGS=''

Important settings:
  value of $LANG: en_GB.utf-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

-- 
Dr T. S. Cubitt
Mathematics and Quantum Information group
Department of Mathematics
Complutense University
Madrid, Spain

email: tsc25@cantab.net
web:   www.dr-qubit.org





^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2014-11-03 14:35 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-24 21:27 bug#11774: org-mode causes undo boundaries to be lost Toby Cubitt
2012-06-24 21:39 ` Bastien
2012-06-24 21:52   ` Toby Cubitt
2012-06-25 11:35     ` Toby Cubitt
2012-07-02  6:51       ` bug#11774: [O] " Martin Pohlack
2012-07-03  9:57         ` Toby Cubitt
2012-07-03 15:18           ` Martin Pohlack
2012-07-03 17:29             ` Stefan Monnier
     [not found]             ` <jwvpq8coitq.fsf-monnier+emacs@gnu.org>
2012-07-03 18:13               ` bug#11774: [O] bug#11774: " Samuel Wales
2012-07-03 22:57                 ` Stefan Monnier
2012-07-04  0:18                   ` Samuel Wales
2012-07-04  0:24                     ` bug#11774: [O] bug#11774: " Samuel Wales
2012-07-04  9:40                     ` bug#11774: [O] " Toby Cubitt
2012-07-18 13:21                     ` Stefan Monnier
     [not found]                     ` <jwvpq7t1a4t.fsf-monnier+emacs@gnu.org>
2012-08-01 14:26                       ` bug#11774: " Bastien
     [not found]                       ` <CAJcAo8ux9Dw5Nu6x0jm59mWFaLWFG6SSeMs9dju-Jgy5nWkUcA@mail.gmail.com>
2014-11-03 14:35                         ` bug#11774: [O] " Stefan Monnier
2012-07-03 18:33       ` bug#11774: [O] " Martin Pohlack

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).