unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: 50443@debbugs.gnu.org
Cc: roni kallio <roni@kallio.app>
Subject: bug#50443: Fwd: Flyspell error traversal additions
Date: Tue, 7 Sep 2021 02:22:29 +0200	[thread overview]
Message-ID: <CADwFkm==pCKz+0eirFtmcZr-fKx5m7cOKZYPRt1KGCTX5Bc8BA@mail.gmail.com> (raw)
In-Reply-To: <87r1m5ch9n.fsf@kallio.app>

[-- Attachment #1: Type: text/plain, Size: 1705 bytes --]

X-Debbugs-CC: Roni Kallio <roni@kallio.app>

This was sent to emacs-devel, but never followed up.  I'm forwarding
to the bug tracker so that we don't lose track of it.

---------- Forwarded message ---------
Från: Roni Kallio <roni@kallio.app>
Date: tors 28 jan. 2021 kl 14:59
Subject: Flyspell error traversal additions
To: <emacs-devel@gnu.org>


While consolidating my spell/syntax checking setup, I noticed that
flyspell lacks a command to jump to the nearest error that is before the
point in a buffer.  There exists `flyspell-goto-next-error', which of
course loops back to beginning when the end of the buffer is reached,
but no equivalent command for going backwards.

I have attached a patch that implements backwards traversal, making sure
it acts analogous to `flyspell-goto-next-error'.  I'd like to open a
discussion on whether it would be feasible to have a key binding in
`flyspell-mode-map' for this command.  For reference, the bindings
currently are:

C-;   -- flyspell-auto-correct-previous-word
C-,   -- flyspell-goto-next-error
C-.   -- flyspell-auto-correct-word
C-c $ -- flyspell-correct-word-before-point

IMO the best course of action would be to modify
`flyspell-goto-next-error' to accept a prefix argument.  The prefix
would control the direction and number of jumps performed; negative
arguments would jump backwards -ARG errors (by calling
flyspell-goto-previous-error), while positive arguments would jump
forwards ARG errors.  This would be similar to how commands like
`forward-word' handle prefix arguments.  This would allow us to leave
the mode-map unchanged, but still distribute the improvement to all
users.

--
Roni Kallio

[-- Attachment #2: 0001-Add-flyspell-goto-previous-error.patch --]
[-- Type: application/x-patch, Size: 2284 bytes --]

       reply	other threads:[~2021-09-07  0:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87sg6lchgc.fsf@kallio.app>
     [not found] ` <87r1m5ch9n.fsf@kallio.app>
2021-09-07  0:22   ` Stefan Kangas [this message]
2021-09-07  5:57     ` bug#50443: Fwd: Flyspell error traversal additions Eli Zaretskii
2021-09-09 20:58       ` Roni Kallio
2021-09-19 16:05         ` Stefan Kangas
2021-12-27  3:12           ` Stefan Kangas
2022-03-24  9:06             ` Lars Ingebrigtsen
2022-08-25 14:20               ` Lars Ingebrigtsen
2021-09-09 17:24     ` Juri Linkov
2021-09-10  6:39       ` Juri Linkov
2021-09-10  6:49         ` Stefan Kangas
2021-09-10 16:12           ` Juri Linkov

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='CADwFkm==pCKz+0eirFtmcZr-fKx5m7cOKZYPRt1KGCTX5Bc8BA@mail.gmail.com' \
    --to=stefan@marxist.se \
    --cc=50443@debbugs.gnu.org \
    --cc=roni@kallio.app \
    /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).