GNU bug report logs - #6093
24.0.50; kbd-macro breaks atomic-change-group

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Andreas Politz <politza@HIDDEN>; dated Mon, 3 May 2010 19:20:03 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at>

Received: (at submit) by; 3 May 2010 19:19:15 +0000
From debbugs-submit-bounces <at> Mon May 03 15:19:15 2010
Received: from localhost ([]
	by with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at>>)
	id 1O91Ag-0005MS-Sx
	for submit <at>; Mon, 03 May 2010 15:19:15 -0400
Received: from ([]
	by with esmtp (Exim 4.69)
	(envelope-from <politza@HIDDEN>) id 1O91Ae-0005MN-G3
	for submit <at>; Mon, 03 May 2010 15:19:13 -0400
Received: from ([]:37186)
	by with esmtps
	(TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60)
	(envelope-from <politza@HIDDEN>) id 1O91Aa-0000HC-0V
	for submit <at>; Mon, 03 May 2010 15:19:08 -0400
Received: from mailman by with tmda-scanned (Exim 4.43)
	id 1O91AZ-0004T3-FY
	for bug-gnu-emacs@HIDDEN; Mon, 03 May 2010 15:19:07 -0400
Received: from [] (port=44028
	by with esmtp (Exim 4.43) id 1O91AT-0004It-PH
	for bug-gnu-emacs@HIDDEN; Mon, 03 May 2010 15:19:06 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on
X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED,
	T_DKIM_INVALID,T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.0
Received: from Debian-exim by with spam-scanned (Exim 4.69)
	(envelope-from <politza@HIDDEN>) id 1O91AP-0004FJ-Hk
	for bug-gnu-emacs@HIDDEN; Mon, 03 May 2010 15:19:01 -0400
Received: from ([]:35801)
	by with esmtp (Exim 4.69)
	(envelope-from <politza@HIDDEN>) id 1O91AP-0004D6-3o
	for bug-gnu-emacs@HIDDEN; Mon, 03 May 2010 15:18:57 -0400
Received: from raven ( [])
	(Authenticated sender: politza)
	by (Postfix) with ESMTP id BEE79173AEB2
	for <bug-gnu-emacs@HIDDEN>; Mon,  3 May 2010 21:18:27 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple;; s=default;
	t=1272914308; bh=YYCvVeCfQbubNkE9yceSdciq1N8=; h=From:To:Subject:
	Date:Message-ID:MIME-Version:Content-Type; b=SQjNFh40azloI4ndi7tCI
From: Andreas Politz <politza@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.0.50; kbd-macro breaks atomic-change-group
Date: Mon, 03 May 2010 21:18:27 +0200
Message-ID: <87ocgwssjg.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum
	FH-Trier (r/ft)]
X-detected-operating-system: by GNU/Linux 2.6 (newer, 3)
X-detected-operating-system: by GNU/Linux 2.6,
	seldom 2.4 (older, 4)
X-Spam-Score: -4.1 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at>
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <>
List-Unsubscribe: <>,
	<mailto:debbugs-submit-request <at>>
List-Archive: <>
List-Post: <mailto:debbugs-submit <at>>
List-Help: <mailto:debbugs-submit-request <at>>
List-Subscribe: <>,
	<mailto:debbugs-submit-request <at>>
Sender: debbugs-submit-bounces <at>
Errors-To: debbugs-submit-bounces <at>
X-Spam-Score: -5.1 (-----)

I believe this to be a bug.

Executing a kbd-macro inside a atomic-change-group signals an error,
if the group gets cancelled via `cancel-change-group'.

(setq buffer-undo-list (list nil))
  (execute-kbd-macro "foobar.sFOOBAR"))

I believe the problem is self-inserting-command popping the nil
from buffer-undo-list, which in turn makes cancel-change-group
believe it's understandging of the list became corrupted.

I think it's safe to ignore the car, if it's nil, and proceed on
the cdr.  The next command will push a new nil anyway (as far as
I can tell).

Anyway, that's what this is based upon :

diff -c -B -w /home/politza/src/emacs23/lisp/subr.el /tmp/buffer-content-32254fF
*** /home/politza/src/emacs23/lisp/subr.el	Sat May  1 10:39:53 2010
--- /tmp/buffer-content-32254fF	Mon May  3 21:14:56 2010
*** 2145,2150 ****
--- 2145,2155 ----
    (dolist (elt handle)
      (with-current-buffer (car elt)
        (setq elt (cdr elt))
+       ;; The command loop may have changed the first cons, if it was a
+       ;; boundary (nil), skip it.
+       (when (and (cdr elt)
+                  (null (car elt)))
+         (setq elt (cdr elt)))
  	;; Widen buffer temporarily so if the buffer was narrowed within
  	;; the body of `atomic-change-group' all changes can be undone.

Diff finished.  Mon May  3 21:14:56 2010

In GNU Emacs (x86_64-unknown-linux-gnu, GTK+ Version 2.18.9)
 of 2010-05-03 on raven
Windowing system distributor `The X.Org Foundation', version 11.0.10705000
Important settings:
  value of $LC_ALL: C
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Text

Minor modes in effect:
  diff-auto-refine-mode: t
  narrow-stack-mode: t
  server-mode: t
  easy-repeat-mode: t
  shell-dirtrack-mode: t
  recentf-mode: t
  ido-hacks-mode: t
  window-numbering-mode: t
  which-function-mode: t
  show-paren-mode: t
  ido-everywhere: t
  icomplete-mode: t
  global-hi-lock-mode: t
  hi-lock-mode: t
  display-time-mode: t
  savehist-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
c d r C-n TAB C-n TAB C-e C-M-b C-o M-; T h e SPC c 
o m m a n d SPC l o o p SPC m a y SPC h a v e SPC c 
h a n g e d SPC t h e SPC f i r s t SPC c o n s , SPC 
i f SPC i t ' s SPC c a r SPC M-h M-h M-h w a s SPC 
a SPC b o u n d a r y SPC ( C-h C-h SPC ( n i l ) M-q 
. C-p C-e M-b M-b i t SPC M-q C-n C-p M-b M-b M-b M-b 
M-b M-b M-b M-b C-n C-h , SPC s k i p SPC i t . M-q 
M-1 C-j C-j C-p C-p M-q M-x t e x t - <return> C-n 
C-j A n y w a y SPC C-h , SPC t h a t ' s SPC w h a 
t SPC h <backspace> t h i s SPC i s SPC b a s e d SPC 
u p o n SPC : M-2 M-q C-M-x M-1 C-x C-g C-p C-p C-p 
C-p C-p C-p C-p C-p C-p C-x C-e q M-2 C-n M-m C-M-SPC 
M-; C-M-x M-1 C-x C-e q q C-/ M-2 C-/ M-x d i f f - 
b u <return> <return> M-1 C-x h M-w C-, C-, C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-j C-y C-p C-p C-p 
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-k C-k M-\ C-p C-k C-k C-/ C-/ C-/ C-/ C-x h C-w M-x 
r e p o <return>

Recent messages:
Back to top level.
Mark set
Type C-. for help.
Entering debugger... [2 times]
Back to top level.
Undo! [2 times]
Mark set [3 times]
Undo! [4 times]
Mark set [2 times]

Load-path shadows:
/home/politza/.emacs.d/minor-modes/ido hides /home/politza/src/emacs23/lisp/ido

(shadow emacsbug whitespace diff-mode diff browse-kill-ring apropos
gnus-cite smiley ansi-color gnus-async gnus-bcklg qp sort gnus-ml
disp-table parse-time nnfolder nnmbox utf-7 utf7 netrc starttls nnimap
imap nndraft nnmh bbdb-gnus bbdb-snarf mail-extr bbdb-com warnings nnnil
gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art
mm-uu mml2015 epg-config mm-view smime dig mailcap nntp gnus-cache
gnus-sum nnoo gnus-group gnus-undo nnmail mail-source gnus-start
gnus-spec gnus-win jka-compr find-dired cl-specs edebug newcomment
thingatpt help-mode view debug vc-dispatcher vc-svn reposition etags
multi-isearch vc-git cc-mode cc-fonts cc-menus cc-cmds cc-styles
cc-align cc-engine cc-vars cc-defs find-func minibuffer-regexp pascal
narrow-stack org org-footnote org-src org-list org-faces org-compat
org-entities org-macs noutline outline ispell closure byte-opt bytecomp
byte-compile gnus-int gnus-range message rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums
mailabbrev gmm-utils mailheader gnus gnus-ems nnheader mail-utils
mm-util mail-prsvr avoid server easy-repeat repeat eldoc linux tex-site
auto-loads ibuf-macs ibuf-ext ibuffer dired-x dired-aux dired
dired-details tramp-imap assoc tramp-gw tramp-fish tramp-smb tramp-cache
tramp-ftp tramp-cmds tramp auth-source gnus-util shell password-cache
format-spec tramp-compat trampver time-date recentf tree-widget wid-edit
easymenu generic ido-hacks hippie-exp my-anything anything edmacro
kmacro kbd-helper derived org-install bbdb-autoloads bbdb timezone
persistent-scratch-buffer window-numbering easy-mmode cl cl-19 uniquify
winner which-func imenu paren ido icomplete grep compile comint
regexp-opt ring hi-lock time cus-start cus-load saveplace savehist
advice help-fns advice-preload tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev loaddefs button minibuffer faces cus-face files text-properties
overlay md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
dynamic-setting font-render-setting gtk x-toolkit x multi-tty emacs)

Acknowledgement sent to Andreas Politz <politza@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to owner <at>, bug-gnu-emacs@HIDDEN:
bug#6093; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.