From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#61069: 30.0.50; comint-copy-old-input should include continuation lines Date: Thu, 26 Jan 2023 09:04:34 +0200 Message-ID: <834jsdg4jh.fsf@gnu.org> References: <25553.55974.767552.842578@orion.rgrjr.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24795"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61069@debbugs.gnu.org To: Bob Rogers Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 26 08:05:27 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pKwK6-0006HR-Bp for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Jan 2023 08:05:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pKwJk-0004ai-3j; Thu, 26 Jan 2023 02:05:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKwJi-0004aS-Ny for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2023 02:05:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pKwJi-00088F-AE for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2023 02:05:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pKwJh-0004an-Ow for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2023 02:05:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Jan 2023 07:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61069 X-GNU-PR-Package: emacs Original-Received: via spool by 61069-submit@debbugs.gnu.org id=B61069.167471666917611 (code B ref 61069); Thu, 26 Jan 2023 07:05:01 +0000 Original-Received: (at 61069) by debbugs.gnu.org; 26 Jan 2023 07:04:29 +0000 Original-Received: from localhost ([127.0.0.1]:60472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKwJA-0004Zy-KU for submit@debbugs.gnu.org; Thu, 26 Jan 2023 02:04:28 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:54648) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKwJ7-0004Zg-MY for 61069@debbugs.gnu.org; Thu, 26 Jan 2023 02:04:26 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKwJ2-000855-6B; Thu, 26 Jan 2023 02:04:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=p+WBcKJrTT40DGPss6+KT3vPGp2kyxkvUfKU5Sa+awM=; b=GaJcriUV2SkJ +rZu1GyQh3/3QfEad9OSQX22fEhVfSJ1ZY3efGgHWXlIo4sacBo6HeEpc+ByAdOBm4aYTUX2HqwaO 5QVgpI8edWK/MyzltYm61evISgyaky9CYu8/9u1tzo8+s5A7OMGEAy3r9ZZNqJZqFbVr67i/E+7XH shWvSl1r8V7UcbhXoxlC8HzGGg3Gf7J/bejug5soFrm80RGmYez5pdt81k3ClLQ7+y3kcZs6lS6u8 5cB89Bb+n+1mEPFQqjBbRdeF6Js4akS+zJmsFvulNL8/gq1bptsi0jdcLgiBmDoGqaekV34CSFIKV 68M7zA2jc4asnSxN2YtdRg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKwJ1-00055v-Jk; Thu, 26 Jan 2023 02:04:19 -0500 In-Reply-To: <25553.55974.767552.842578@orion.rgrjr.com> (message from Bob Rogers on Wed, 25 Jan 2023 17:43:02 -0800) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:254174 Archived-At: > From: Bob Rogers > Date: Wed, 25 Jan 2023 17:43:02 -0800 > > In a shell-mode buffer with lots of "make" output, there will often > appear commands with continuation lines. To use them as new input > (e.g. while debugging some bit of makefile logic) requires either > marking and copying multiple lines, or multiple invocations of > comint-copy-old-input (C-RET in shell-mode) to get the complete command. > The attached patch against f0971f94fe42224b4d85bb8b6188d5d805689ddf in > master includes those continuation lines, which seems like a desirable > bit of dwimmery. However, I may have misunderstood the purpose of the > line-end-position vs. field-end thing. Also, this assumes shell syntax, > so it may be more appropriate to leave comint-get-old-input-default > alone and give shell-mode its own shell-get-old-input-default function. I don't understand: line-end-position already reports the entire line, including continuation lines. So could you explain the problem with the current code in more detail, please? > + ;; Include continuation lines as long as the current > + ;; line ends with a backslash. > + (while (and (not (eobp)) > + (= (char-before) ?\\)) > + (goto-char (line-end-position 2)))) Or maybe I don't understand what is this "backslash" business is about? AFAICT, the "backslashes" shown for long lines of Make output are those produced by the Emacs display, not by the shell, so the code you want to change should already take care of that. What am I missing? Could you please show an example of "long Make output" where the current code doesn't DTRT, so we'd be on the same page wrt the problem? Thanks.