From: Jim Porter <jporterbugs@gmail.com>
To: Tony Zorman <soliditsallgood@mailbox.org>, 63748@debbugs.gnu.org
Subject: bug#63748: [PATCH] bug#63748: 30.0.50; eshell-previous-prompt doesn't work for multiline prompts
Date: Sat, 3 Jun 2023 12:35:50 -0700 [thread overview]
Message-ID: <88ae9a36-c9f9-fe0a-80a2-d90ff1b3837a@gmail.com> (raw)
In-Reply-To: <87bkhwllq5.fsf@hyperspace>
On 6/3/2023 6:27 AM, Tony Zorman via Bug reports for GNU Emacs, the
Swiss army knife of text editors wrote:
> Okay, I now added some hopefully sufficient tests for this based on both
> next-previous-prompt and forward-backward-matching-input (if that's not
> too overkill). Let me know what you think.
Thanks. You can probably simplify the multiline wrapper in your test to
something like this:
(defmacro em-prompt-test--with-multiline (&rest body)
"Execute BODY with a multiline Eshell prompt."
`(let ((eshell-prompt-function (lambda () "multiline prompt\n$ ")))
,@body))
Then use it like so:
;; Note: no arguments necessary.
(defun em-prompt-test/forward-backward-matching-input-with ()
;; ...
)
(ert-deftest em-prompt-test/forward-backward-matching-input-multiline ()
(em-prompt-test--with-multiline
(em-prompt-test/forward-backward-matching-input-with)))
That should be safer than setq'ing the prompt function. (You also don't
need to set the prompt regexp, since that's only useful if you want to
navigate via '(forward|backward)-paragraph', and we don't test that here.)
If you prefer, I can make that change myself and then merge your patch.
next prev parent reply other threads:[~2023-06-03 19:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-27 8:38 bug#63748: 30.0.50; eshell-previous-prompt doesn't work for multiline prompts Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-30 5:02 ` Jim Porter
2023-06-03 13:27 ` bug#63748: [PATCH] " Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-03 19:35 ` Jim Porter [this message]
2023-06-08 15:11 ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-15 16:46 ` Jim Porter
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=88ae9a36-c9f9-fe0a-80a2-d90ff1b3837a@gmail.com \
--to=jporterbugs@gmail.com \
--cc=63748@debbugs.gnu.org \
--cc=soliditsallgood@mailbox.org \
/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).