From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: Re: comint-insert-input on non-command lines: A trivial fix, a quibble, and a bug Date: Wed, 10 May 2006 17:29:54 +1200 Message-ID: <17505.31314.844449.970281@farnswood.snap.net.nz> References: <17501.373.791079.156322@rgrjr.dyndns.org> <17502.37204.411491.461843@farnswood.snap.net.nz> <200605080408.k4848t65027552@jane.dms.auburn.edu> <17502.50834.303952.808659@farnswood.snap.net.nz> <200605090301.k4931NbZ010512@jane.dms.auburn.edu> <17504.2770.189282.768887@farnswood.snap.net.nz> <200605090359.k493xjVi010576@jane.dms.auburn.edu> <17504.13295.579987.394734@farnswood.snap.net.nz> <200605091458.k49EwOL8012994@jane.dms.auburn.edu> <20060510010929.723AA627ED@farnswood.snap.net.nz> <200605100441.k4A4f636019170@jane.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1147239062 6473 80.91.229.2 (10 May 2006 05:31:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 10 May 2006 05:31:02 +0000 (UTC) Cc: rogers-emacs@rgrjr.dyndns.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 10 07:31:00 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FdhHe-0007Lm-69 for ged-emacs-devel@m.gmane.org; Wed, 10 May 2006 07:30:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FdhHd-0000um-Oh for ged-emacs-devel@m.gmane.org; Wed, 10 May 2006 01:30:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FdhHR-0000uX-TE for emacs-devel@gnu.org; Wed, 10 May 2006 01:30:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FdhHP-0000uK-Go for emacs-devel@gnu.org; Wed, 10 May 2006 01:30:36 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FdhHP-0000uH-Dg for emacs-devel@gnu.org; Wed, 10 May 2006 01:30:35 -0400 Original-Received: from [202.37.101.8] (helo=viper.snap.net.nz) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FdhIc-0002dc-Aj for emacs-devel@gnu.org; Wed, 10 May 2006 01:31:51 -0400 Original-Received: from farnswood.snap.net.nz (p202-124-114-67.snap.net.nz [202.124.114.67]) by viper.snap.net.nz (Postfix) with ESMTP id 2B27F756B41; Wed, 10 May 2006 17:30:32 +1200 (NZST) Original-Received: by farnswood.snap.net.nz (Postfix, from userid 500) id 9370C627ED; Wed, 10 May 2006 06:29:55 +0100 (BST) Original-To: Luc Teirlinck In-Reply-To: <200605100441.k4A4f636019170@jane.dms.auburn.edu> X-Mailer: VM 7.19 under Emacs 22.0.50.51 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:54172 Archived-At: > 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. Luc, do you actually use comint? You appear to know more about the variables than me (perhaps from re-writing the manual) but I have been using mouse-2 to insert input (in the GUD buffer) for a long time, and not found it confusing. > 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. Fields provide the opportunity to distinguish between input and output: I think we should use it. > 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. What binding do you think comint-insert-clicked-input had? It was mouse-2 and it overrode the global binding. Perhaps you are also arguing against that function which was introduced six years ago and in Emacs 21. It doesn't make yanking impossible (try it), just yanking at previous input. > 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. Just like help-follow-mouse used to work on words which weren't cross-references. I think it lacks logic, adds complexity and just performs a task that can be done with two mouse clicks anyway. > 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. If it is so useful, I wonder why it wasn't documented. In fact the documentation even suggests it wasn't intended to be used in this way. > 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. I think some of your assertions are wrong. > 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. I don't even follow that, mouse-2 inserts input even when comint-use-prompt-regexp being non-nil -- Nick http://www.inet.net.nz/~nickrob