From: storm@cua.dk (Kim F. Storm)
To: emacs-devel <emacs-devel@gnu.org>
Cc: martin rudalics <rudalics@gmx.at>
Subject: Re: transpose-regions
Date: Thu, 22 Mar 2007 15:49:57 +0100 [thread overview]
Message-ID: <m3bqil8h9m.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <46026277.7060305@gmx.at> (martin rudalics's message of "Thu\, 22 Mar 2007 12\:03\:19 +0100")
martin rudalics <rudalics@gmx.at> 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 <command_loop_1>, handlers=23761545, hfun=0x1057f40 <cmd_error>) at eval.c:1481
> #22 0x01051f6e in command_loop_2 () at keyboard.c:1329
> #23 0x0100a949 in internal_catch (tag=23755777, func=0x1051f40 <command_loop_2>, 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 <storm@cua.dk> http://www.cua.dk
next prev parent reply other threads:[~2007-03-22 14:49 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-22 11:03 transpose-regions martin rudalics
2007-03-22 14:49 ` Kim F. Storm [this message]
2007-03-22 20:13 ` transpose-regions Nick Roberts
2007-03-22 21:30 ` transpose-regions martin rudalics
2007-03-22 21:36 ` transpose-regions David Kastrup
2007-03-22 21:59 ` transpose-regions martin rudalics
2007-03-23 13:52 ` transpose-regions Eli Zaretskii
2007-03-22 15:04 ` transpose-regions Chong Yidong
2007-03-22 15:26 ` transpose-regions martin rudalics
2007-03-22 15:59 ` transpose-regions Chong Yidong
2007-03-22 17:07 ` transpose-regions martin rudalics
2007-03-22 18:06 ` transpose-regions Chong Yidong
2007-03-22 19:19 ` transpose-regions martin rudalics
2007-03-22 20:24 ` transpose-regions Chong Yidong
2007-03-22 21:32 ` transpose-regions martin rudalics
2007-03-22 22:13 ` transpose-regions martin rudalics
2007-03-22 21:51 ` transpose-regions Andreas Schwab
2007-03-23 13:46 ` transpose-regions Eli Zaretskii
2007-03-23 1:28 ` transpose-regions Chong Yidong
2007-03-23 9:05 ` transpose-regions martin rudalics
2007-03-23 10:55 ` transpose-regions Andreas Schwab
2007-03-23 11:50 ` transpose-regions Kim F. Storm
2007-03-23 12:08 ` transpose-regions martin rudalics
2007-03-23 14:09 ` transpose-regions Chong Yidong
2007-03-23 15:36 ` transpose-regions Kim F. Storm
2007-03-23 16:42 ` transpose-regions Stefan Monnier
2007-03-23 17:34 ` transpose-regions Chong Yidong
2007-03-23 18:17 ` transpose-regions martin rudalics
2007-03-23 22:32 ` transpose-regions Richard Stallman
2007-03-23 22:50 ` transpose-regions Stefan Monnier
2007-03-28 4:56 ` transpose-regions Richard Stallman
2007-03-24 20:24 ` transpose-regions Karl Fogel
2007-03-23 18:00 ` transpose-regions Richard Stallman
2007-03-23 22:39 ` transpose-regions Stefan Monnier
2007-03-24 15:51 ` transpose-regions Chong Yidong
2007-03-25 17:28 ` transpose-regions Richard Stallman
2007-03-23 15:39 ` transpose-regions Chong Yidong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3bqil8h9m.fsf@kfs-l.imdomain.dk \
--to=storm@cua.dk \
--cc=emacs-devel@gnu.org \
--cc=rudalics@gmx.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.