unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Bob Rogers <rogers@rgrjr.com>
Cc: 61069@debbugs.gnu.org
Subject: bug#61069: 30.0.50; comint-copy-old-input should include continuation lines
Date: Thu, 26 Jan 2023 09:04:34 +0200	[thread overview]
Message-ID: <834jsdg4jh.fsf@gnu.org> (raw)
In-Reply-To: <25553.55974.767552.842578@orion.rgrjr.com> (message from Bob Rogers on Wed, 25 Jan 2023 17:43:02 -0800)

> From: Bob Rogers <rogers@rgrjr.com>
> 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.





  reply	other threads:[~2023-01-26  7:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-26  1:43 bug#61069: 30.0.50; comint-copy-old-input should include continuation lines Bob Rogers
2023-01-26  7:04 ` Eli Zaretskii [this message]
2023-01-26  7:33   ` Bob Rogers
2023-01-26  8:12     ` Eli Zaretskii
2023-01-26  8:38       ` Bob Rogers
2023-01-26  9:32         ` Eli Zaretskii
2023-01-28  3:45           ` Bob Rogers
2023-01-30  8:25             ` Robert Pluim
2023-01-30 21:05               ` Bob Rogers
2023-01-31  2:38                 ` Bob Rogers
2023-01-31  9:10                   ` Robert Pluim
2023-01-31 19:45                     ` Bob Rogers
2023-03-30 19:51                       ` Bob Rogers
2023-03-31  8:07                         ` Robert Pluim
2023-03-31 10:51                           ` Eli Zaretskii
2023-03-31 13:01                             ` Robert Pluim
2023-03-31 13:23                               ` Robert Pluim
2023-04-01  0:15                                 ` Bob Rogers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=834jsdg4jh.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=61069@debbugs.gnu.org \
    --cc=rogers@rgrjr.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).