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: comint-insert-input on non-command lines: A trivial fix, a quibble, and a bug Date: Wed, 10 May 2006 06:57:20 +0100 (BST) Message-ID: <20060510055720.1D2D5627ED@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> <200605080349.k483neE2027538@jane.dms.auburn.edu> <17503.63124.518985.734399@rgrjr.dyndns.org> <17504.2149.496291.186794@farnswood.snap.net.nz> <17505.22411.194721.809455@rgrjr.dyndns.org> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1147240697 10290 80.91.229.2 (10 May 2006 05:58:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 10 May 2006 05:58:17 +0000 (UTC) Cc: Miles Bader , Luc Teirlinck , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 10 07:58:15 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 1FdhiA-0002GZ-8c for ged-emacs-devel@m.gmane.org; Wed, 10 May 2006 07:58:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fdhi9-0001i3-VV for ged-emacs-devel@m.gmane.org; Wed, 10 May 2006 01:58:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fdhhy-0001ho-3P for emacs-devel@gnu.org; Wed, 10 May 2006 01:58:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fdhhw-0001hc-Qj for emacs-devel@gnu.org; Wed, 10 May 2006 01:58:00 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fdhhw-0001hZ-Ju for emacs-devel@gnu.org; Wed, 10 May 2006 01:58:00 -0400 Original-Received: from [202.37.101.8] (helo=viper.snap.net.nz) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fdhj7-0004MM-VM; Wed, 10 May 2006 01:59:14 -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 6E907758704; Wed, 10 May 2006 17:57:57 +1200 (NZST) Original-Received: by farnswood.snap.net.nz (Postfix, from userid 500) id 1D2D5627ED; Wed, 10 May 2006 06:57:20 +0100 (BST) Original-To: Bob Rogers In-Reply-To: <17505.22411.194721.809455@rgrjr.dyndns.org> 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:54175 Archived-At: > The name comint-insert-input suggests that it inserts (old) input so > to do nothing when the point isn't over input seems appropriate to me. > > The name comint-insert-input does suggest that it should be inserting > something, so I found "doing nothing" surprising. At the very least, it > should explain why it is refusing do what I am obviously asking. It could give a message "No input here". I'll see if I can do that. > > This seems to be because > > comint-insert-input is trying to invoke the "RET" binding, but doesn't > > allow for the fact that this-command-keys returns a string. > > Its because comint-insert-input can also be invoked by mouse-2 which > falls back to the global binding (generally mouse-yank-at-click). > > OK. But why wouldn't this be a reasonable thing to do for keyboard > input as well? It does. The keyboard input in this case (C-c RET) doesn't have a global binding: thats why it does nothing. > > In contrast, I never expect > > insertion when I type "C-c RET"; besides which, the side-effects of an > > accidental "C-c RET" are easier to undo. So if "safety" were the reason > > ... > > It isn't the reason. We have tried to combine two commands with a > similar functionality (comint-insert-clicked-input, comint-copy-old-input) > > So the loss of functionality was accidental, then? I can't remember but I don't find it unfortunate. > Again the name comint-copy-old-input doesn't suggest this behaviour and > my preference would be not to have it. > > That depends on how narrowly you want to define "input." Well, I would certainly exclude output from my definition. > Well, I found it within an hour of building emacs from CVS, having used > distro versions for many years now. It's possible that I'm the only one > who ever uses C-c RET on output lines . . . but somehow I doubt that. The patch I've installed works on output lines when comint-use-prompt-regexp is non-nil. Does this do what you want? -- Nick http://www.inet.net.nz/~nickrob