From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Multi-line input Date: Thu, 04 Dec 2014 21:03:53 -0500 Message-ID: References: <87fvds2r5i.fsf@mail.jurta.org> <87zjbokx0t.fsf@mail.linkov.net> <546E1845.2010301@dancol.org> <87oarjklgc.fsf_-_@mail.linkov.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1417745080 8145 80.91.229.3 (5 Dec 2014 02:04:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Dec 2014 02:04:40 +0000 (UTC) Cc: Daniel Colascione , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 05 03:04:33 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XwiG0-0003o0-VW for ged-emacs-devel@m.gmane.org; Fri, 05 Dec 2014 03:04:33 +0100 Original-Received: from localhost ([::1]:48450 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwiG0-0004qw-7S for ged-emacs-devel@m.gmane.org; Thu, 04 Dec 2014 21:04:32 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60312) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwiFX-0004q5-Gv for emacs-devel@gnu.org; Thu, 04 Dec 2014 21:04:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XwiFO-0006K0-KP for emacs-devel@gnu.org; Thu, 04 Dec 2014 21:04:03 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:29797) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwiFO-0006JX-D7 for emacs-devel@gnu.org; Thu, 04 Dec 2014 21:03:54 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjsPAOwQflRMCqTq/2dsb2JhbABbgweDYIVaxR0EAgKBJBcBAQEBAQF8hAMBAQMBViMFCws0EhQYDSSISgnWWQEBAQEGAQEBAR6QbweESAWLAZIxgziORYF4hBkhgncBAQE X-IPAS-Result: AjsPAOwQflRMCqTq/2dsb2JhbABbgweDYIVaxR0EAgKBJBcBAQEBAQF8hAMBAQMBViMFCws0EhQYDSSISgnWWQEBAQEGAQEBAR6QbweESAWLAZIxgziORYF4hBkhgncBAQE X-IronPort-AV: E=Sophos;i="5.07,502,1413259200"; d="scan'208";a="99600075" Original-Received: from 76-10-164-234.dsl.teksavvy.com (HELO pastel.home) ([76.10.164.234]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 04 Dec 2014 21:03:53 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 41D468848; Thu, 4 Dec 2014 21:03:53 -0500 (EST) In-Reply-To: <87oarjklgc.fsf_-_@mail.linkov.net> (Juri Linkov's message of "Fri, 05 Dec 2014 02:38:03 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:178870 Archived-At: > Other problematic place where S-RET could help to insert a newline > is shell input. As mentioned earlier, I'm not convinced S-RET is a great idea, since I think it's more beneficial to get people to learn about C-q. I do realize that we have a problem in C-q because you need C-q C-j rather than C-q RET (the same problem recently pointed out by Raman w.r.t to the ?\n in electric-indent-chars which affects the behavior of RET rather than that of C-j). So, S-RET is not without merit, but I'm still not quite convinced it's a good idea. I wish I could solve the "C-q RET doesn't insert a newline" problem instead. > What is worse in shell than in the minibuffer typing RET accidentally > in the middle of multi-line shell input causes a mess: it sends the > part before point, and leaves the remaining lines dangling at the end > of the shell buffer. > This patch gets the input until the end of the possibly multi-line > input field instead of only the end of the line: Good, please install it. > While checking this, I also noticed a problem in searching the history of > multi-line entries. `comint-line-beginning-position' operates only > on the current line, so it too should be replaced with `field-beginning': I'm less confident, but I think this is good as well. Please install. Stefan