emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: comint-insert-input on non-command lines: A trivial fix, a quibble,


From: Luc Teirlinck
Subject: Re: comint-insert-input on non-command lines: A trivial fix, a quibble, and a bug
Date: Tue, 9 May 2006 23:41:06 -0500 (CDT)

Nick Roberts wrote:

   When comint-use-prompt-regexp is nil things should work as before.  When it
   is t, you should get the old behaviour i.e output lines are copied too.

Now C-c RET works indeed OK if comint-use-prompt-regexp is non-nil,
but now mouse-2 gives problems.  I do not believe that mouse-2 should
do anything but yank if comint-use-prompt-regexp is non-nil, since the
behavior is too confusing otherwise, without any help echo to warn or
anything.  Of course, the mouse-2 help-echo should also be made
conditional on comint-use-prompt-regexp being nil.

Also, people who find the old behavior useful will now have to set
comint-use-prompt-regexp non-nil for no other reason than to restore
that behavior.  To me, this seems weird. 

You replaced comint-copy-old-input with comint-insert-input believing
that it was similar to comint-insert-clicked-input.  But it is not.
mouse-2 has an important global binding, yanking, and even overriding
that global binding for old input seems rather dubious, let alone
overriding it in the entire comint buffer, making yanking using
mouse-2 completely impossible.

On the other hand, `C-c RET' has no important global binding, so there
is no reason not to use it on output.  The user gets the opportunity
to edit, so even _if_ he hit `C-c RET' by accident, which is very
unlikely, no major harm is done.  So providing the extra functionality
to people who find it useful does not impose any real hardship on
people who never use it.

In certain derived Comint modes, like external Lisp mode, using `C-c RET'
on output seems even more often useful than in shell-mode, which,
if I understood correctly, is what Bob is concerned with.

I personally believe that restoring comint-copy-old-input would be a
good thing.  `comint-insert-input' has not been part of any release,
so if we ever plan to undo the change, now is the time to do it.

Regardless of whether comint-copy-old-input gets restored, I believe
that it would be good to make the mouse-2 binding and corresponding
help-echo conditional on comint-use-prompt-regexp being non-nil and
document that wherever the mouse-2 binding is mentioned.  I could do
that if there are no objections.

Sincerely,

Luc.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]