From: Pierre Neidhardt <ambrevar@gmail.com>
To: npostavs@users.sourceforge.net
Cc: 27405@debbugs.gnu.org
Subject: bug#27405: 25.2; Make eshell-next-prompt more reliable
Date: Sun, 18 Jun 2017 14:29:32 +0100 [thread overview]
Message-ID: <20170618132932.GA2617@gmail.com> (raw)
In-Reply-To: <87zid6qn3b.fsf@users.sourceforge.net>
> > (defun eshell-previous-prompt (n)
> > "Move to end of Nth previous prompt in the buffer.
> > See `eshell-prompt-regexp'."
> > (interactive "p")
> > (backward-char)
> > (eshell-next-prompt (- n))))
>
> What's the backward-char for?
That would have definitely deserved a comment...
Without it, if point is right after the prompt, it won't move. That would be
disturbing for the user.
Detailed rules:
- If point is on the command line _after_ eshell-bol, then go back to eshell-bol.
- If point is between eshell-bol (included) and _after_ eshell-bol of the last
prompt (excluded), go to the last prompt.
--
Pierre Neidhardt
next prev parent reply other threads:[~2017-06-18 13:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-17 9:08 bug#27405: 25.2; Make eshell-next-prompt more reliable Pierre Neidhardt
2017-06-17 22:13 ` npostavs
2017-06-18 13:29 ` Pierre Neidhardt [this message]
2017-06-18 13:52 ` npostavs
2017-06-18 14:19 ` Pierre Neidhardt
2017-07-12 2:16 ` npostavs
2017-07-12 13:06 ` Pierre Neidhardt
2017-07-12 19:26 ` Noam Postavsky
2017-07-21 2:44 ` npostavs
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=20170618132932.GA2617@gmail.com \
--to=ambrevar@gmail.com \
--cc=27405@debbugs.gnu.org \
--cc=npostavs@users.sourceforge.net \
/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).