From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: transpose-regions Date: Thu, 22 Mar 2007 15:49:57 +0100 Message-ID: References: <46026277.7060305@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1174575022 24170 80.91.229.12 (22 Mar 2007 14:50:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 22 Mar 2007 14:50:22 +0000 (UTC) Cc: martin rudalics To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 22 15:50:16 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HUOcG-0001FP-9t for ged-emacs-devel@m.gmane.org; Thu, 22 Mar 2007 15:50:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HUOe3-0003Ad-Hc for ged-emacs-devel@m.gmane.org; Thu, 22 Mar 2007 09:52:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HUOdz-0003AR-MQ for emacs-devel@gnu.org; Thu, 22 Mar 2007 10:51:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HUOdy-0003AF-7s for emacs-devel@gnu.org; Thu, 22 Mar 2007 10:51:58 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HUOdy-0003AC-1X for emacs-devel@gnu.org; Thu, 22 Mar 2007 09:51:58 -0500 Original-Received: from pfepa.post.tele.dk ([195.41.46.235]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HUOc9-0005az-PT for emacs-devel@gnu.org; Thu, 22 Mar 2007 10:50:06 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (unknown [80.165.4.124]) by pfepa.post.tele.dk (Postfix) with SMTP id 71A96FAC018; Thu, 22 Mar 2007 15:50:04 +0100 (CET) In-Reply-To: <46026277.7060305@gmx.at> (martin rudalics's message of "Thu\, 22 Mar 2007 12\:03\:19 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.96 (gnu/linux) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:68295 Archived-At: martin rudalics writes: > I'm quite frequently harassed by reports like > > Debugger entered--Lisp error: (wrong-type-argument listp 4297150) > transpose-regions(44516 44561 44561 44599) > > Debugger entered--Lisp error: (wrong-type-argument listp 4479113) > transpose-regions(64984 65044 65044 65059) > > Debugger entered--Lisp error: (wrong-type-argument listp 4626696) > transpose-regions(130041 130061 130061 130225) > > Erratically and unreproducible. Apparently, the transposed regions are > always adjacent, I don't see a common pattern as far as their sizes are > concerned. > > Breaking at Fsignal gave: > > #0 Fsignal (error_symbol=23761593, data=24130861) at eval.c:1620 > #1 0x0100cd68 in xsignal (error_symbol=23761593, data=24130861) at eval.c:1722 > #2 0x0100cfb7 in xsignal2 () at eval.c:1746 > #3 0x01004620 in pure_write_error () at data.c:121 > #4 0x0107e521 in Flength (sequence=35483205) at fns.c:185 > #5 0x0107f1e0 in concat (nargs=1, args=0xd2f280, target_type=Lisp_Cons, last_special=0) at fns.c:608 > #6 0x0107f873 in Fcopy_sequence (arg=35483205) at fns.c:537 > #7 0x0111ac12 in copy_properties (source=0x21db988, target=0x1eb79c0) at intervals.c:106 > #8 0x0111be5f in graft_intervals_into_buffer (source=0x21db9f8, position=4778, length=322, buffer=0x20a2a00, inherit=0) at intervals.c:1842 > #9 0x0108f6fb in Ftranspose_regions (startr1=38216, endr1=40792, startr2=40792, endr2=40800, leave_markers=23697409) at editfns.c:4214 > #10 0x0100c87b in Ffuncall (nargs=5, args=0xd2f590) at eval.c:3011 > #11 0x0110f83f in Fbyte_code (bytestr=33408387, vector=33639812, maxdepth=40) at bytecode.c:679 > #12 0x0100bdcd in Feval (form=33251485) at eval.c:2334 > #13 0x0100e1da in internal_lisp_condition_case (var=23697409, bodyform=33251485, handlers=33250773) at eval.c:1426 > #14 0x0110ffe0 in Fbyte_code (bytestr=33408403, vector=33639684, maxdepth=24) at bytecode.c:869 > #15 0x0100c274 in funcall_lambda (fun=33034660, nargs=0, arg_vector=0xd2f924) at eval.c:3184 > #16 0x0100c6c6 in Ffuncall (nargs=1, args=0xd2f920) at eval.c:3054 > #17 0x0100df03 in apply1 (fn=33611281, arg=23697409) at eval.c:2738 > #18 0x0110e61c in Fcall_interactively (function=33611281, record_flag=23697409, keys=23756804) at callint.c:406 > #19 0x01057506 in Fcommand_execute (cmd=33611281, record_flag=23697409, keys=23697409, special=23697409) at keyboard.c:10013 > #20 0x0105e2bd in command_loop_1 () at keyboard.c:1873 > #21 0x0100aa24 in internal_condition_case (bfun=0x105df60 , handlers=23761545, hfun=0x1057f40 ) at eval.c:1481 > #22 0x01051f6e in command_loop_2 () at keyboard.c:1329 > #23 0x0100a949 in internal_catch (tag=23755777, func=0x1051f40 , arg=23697409) at eval.c:1222 > #24 0x01051d7e in command_loop () at keyboard.c:1308 > #25 0x01051e1f in recursive_edit_1 () at keyboard.c:1006 > #26 0x01051f1c in Frecursive_edit () at keyboard.c:1067 > #27 0x01002a75 in main (argc=1, argv=0x19a06a0) at emacs.c:1761 > #28 0x010011e7 in _end__ () > #29 0x01001238 in mainCRTStartup () > #30 0xbff7b9e4 in _libwinspool_a_iname () > #31 0xbff7b896 in _libwinspool_a_iname () > #32 0xbff7a24f in _libwinspool_a_iname () Martin sent me this additional info: Hmmm ... (gdb) xbacktrace "transpose-regions" (0xc6c0) "byte-code" (0x1fd43b3) "m&d-drag-line-up" (0x1699801) "call-interactively" (0x2002229) (gdb) up 6 #6 0x0107f873 in Fcopy_sequence (arg=35173925) at fns.c:537 (gdb) pp arg Program received signal SIGILL, Illegal instruction. 0x00d2ec07 in ?? () (gdb) pp arg (gdb) ppt BUF PT: 7879 of 1..132090 GAP: 132090 SZ=2000 .. where (defun m&d-drag-line-up (&optional beg end) "Drag region up by one line. Region defaults to current line. Region is always rounded up to whole lines." (interactive) (let* ((beg (save-excursion (goto-char (or beg (and mark-active (min (point) (mark))) (point))) (line-beginning-position))) (end (save-excursion (goto-char (or end (and mark-active (max (point) (mark))) (line-beginning-position 2))) (if (bolp) (point) (line-beginning-position 2)))) (point-beg (and (<= beg (point)) (<= (point) end) (- (point) beg))) (mark-beg (and mark-active (<= beg (mark)) (<= (mark) end) (- (mark) beg))) (from (save-excursion (goto-char beg) (line-beginning-position 0))) (recenter (when (= from (window-start)) (count-lines beg end)))) (condition-case nil ;; Wrapped in condition-case until we find out why `transpose-regions' ;; is broken. (if (> beg from) (progn (if (save-excursion (goto-char end) (not (bolp))) ;; Probably at eob. (transpose-regions from (1- beg) beg end) (transpose-regions from beg beg end)) (when mark-beg (set-mark (+ mark-beg from)) (setq deactivate-mark nil)) (when point-beg (goto-char (+ point-beg from))) (when recenter (recenter recenter))) (m&d-ensure-mark) (message "Can't drag") (ding)) (error (m&d-ensure-mark))))) -- Kim F. Storm http://www.cua.dk