Hi Mike,
Mike Kupfer <m.kupfer(a)acm.org> wrote:
Here's the second of the two annoying behavior changes that
I'm seeing,
going from xemacs-base 2.03 to xemacs-2.06.
I must have missed the first one. Can you point me to it?
Suppose I run a command briefly in a shell buffer and then interrupt
out.
kupfer@camellia:~> while true; do date; sleep 2; done
Mon Jul 3 12:15:20 PDT 2006
Mon Jul 3 12:15:22 PDT 2006
C-c C-c
kupfer@camellia:~>
If I move point back up to the "w" in "while" and hit RET, I expect
the
"while true; do date; sleep 2; done" to be copied to the bottom of the
buffer. Thus, if I hit RET again, the command will be run again. This
is the behavior I get with xemacs-base 2.03.
With xemacs-base 2.06, I just get another prompt:
kupfer@camellia:~> while true; do date; sleep 2; done
Mon Jul 3 12:15:20 PDT 2006
Mon Jul 3 12:15:22 PDT 2006
C-c C-c
kupfer@camellia:~>
kupfer@camellia:~>
If I move the mouse over the "while true..." command, it is highlighted,
and I can middle-click to have it copied to the current shell prompt.
But that's often less convenient that the old behavior, because it
requires moving the hand between the keyboard and the mouse.
The trouble is that we moved to a field-based implementation, and there
is a bug in find-field. If point is on the boundary between two fields
with different values, then find-field is identifying the one before
point, rather than the one after point like it is supposed to. I had
problems with before/after being reversed between Emacs and XEmacs while
developing field.el, as the comments at the top of that file imply.
If, in the body of find-field, we change the second let-form to this:
(let* ((ext (extent-at pos nil 'field))
(field (if ext (extent-property ext 'field))))
that fixes the problem for me. Now find-field identifies the correct
field. However, there has been another recent change that I suspect
will annoy you. We synced comint.el with Emacs, and they changed
comint-send-input to take an optional argument, no-newline. If
no-newline is nil, then you get a newline inserted after the copy is
made. For shell mode, this means that C-m copies the old input and
immediately sends it to the shell, without giving you a chance to edit
it. Suggestions on how to fix this, and just how much Emacs
compatibility we should strive for, are welcome.
--
Jerry James, Assistant Professor james(a)xemacs.org
Computer Science Department
http://www.cs.usu.edu/~jerry/
Utah State University