From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader 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 13:09:27 +0900 Message-ID: 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> <17505.19996.720964.47189@farnswood.snap.net.nz> <17505.25357.397260.50040@farnswood.snap.net.nz> Reply-To: Miles Bader NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1147234190 27980 80.91.229.2 (10 May 2006 04:09:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 10 May 2006 04:09:50 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 10 06:09:48 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 1Fdg1B-00035g-6r for ged-emacs-devel@m.gmane.org; Wed, 10 May 2006 06:09:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fdg1A-0004aq-Jp for ged-emacs-devel@m.gmane.org; Wed, 10 May 2006 00:09:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fdg0z-0004Zr-Nm for emacs-devel@gnu.org; Wed, 10 May 2006 00:09:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fdg0y-0004Xp-6k for emacs-devel@gnu.org; Wed, 10 May 2006 00:09:33 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fdg0y-0004Xh-2u for emacs-devel@gnu.org; Wed, 10 May 2006 00:09:32 -0400 Original-Received: from [203.180.232.82] (helo=mgate02.necel.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fdg29-0005KF-PJ; Wed, 10 May 2006 00:10:46 -0400 Original-Received: from relay11.aps.necel.com (relay11 [10.29.19.46]) by mgate02.necel.com (8.13.6/8.13.1) with ESMTP id k4A1V7Ow026921; Wed, 10 May 2006 13:09:29 +0900 (JST) Original-Received: from relay11.aps.necel.com ([10.29.19.20] [10.29.19.20]) by relay11.aps.necel.com with ESMTP; Wed, 10 May 2006 13:09:29 +0900 Original-Received: from dhapc248.dev.necel.com ([10.114.97.235] [10.114.97.235]) by relay11.aps.necel.com with ESMTP; Wed, 10 May 2006 13:09:28 +0900 Original-Received: by dhapc248.dev.necel.com (Postfix, from userid 31295) id 79E40423; Wed, 10 May 2006 13:09:28 +0900 (JST) Original-To: Nick Roberts System-Type: i686-pc-linux-gnu Blat: Foop In-Reply-To: <17505.25357.397260.50040@farnswood.snap.net.nz> (Nick Roberts's message of "Wed, 10 May 2006 15:50:37 +1200") Original-Lines: 32 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:54168 Archived-At: Nick Roberts writes: > looks good to me, but Stefan specifically added them on 2005-03-24: > > * comint.el (comint-insert-input): Obey mouse-yank-at-point. > > Are you sure they are redundant? Well with the current code, yes -- but note that the value of POS is slightly different than it used to be in some cases because I moved the call to posn-set-point before POS gets bound. The call to `setq' seems clearly redundant (though in the old code it would have been needed because the posn-set-point could have moved point). However now that I think about it, if EVENT is non-nil, the call to `goto-char' in the old code would have moved point to _original_ value of (point), not the value of (posn-point EVENT), and this is what FUN would see. That's I guess the right thing if `mouse-yank-at-point' is true, but what if `mouse-yank-at-point' is nil? How is the old code supposed to work in that case? [I have `mouse-yank-at-point' set to nil, and the new code seems to work correctly for me, whereas the old code did not.] Perhaps an explicit test of `mouse-yank-at-point' is needed? -Miles -- Freedom's just another word, for nothing left to lose --Janis Joplin