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

> From: Stefan Kangas <stefan@marxist.se>
> Date: Tue, 7 Sep 2021 02:22:29 +0200
> 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.

Thanks.

> 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'.

Thanks.

> 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.

Yes, I agree.  Can you change the patch to work this way?

Also, the patch is long enough to require a copyright assignment from
you.  Would you be willing to start your legal paperwork at this time,
so we could accept your contribution when it is complete?

> 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

I'm not sure these won't conflict with other minor modes.  And these
keys are not available on text-mode frames, which is a disadvantage.
But let's hear what others think.





  reply	other threads:[~2021-09-07  5:57 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   ` bug#50443: Fwd: Flyspell error traversal additions Stefan Kangas
2021-09-07  5:57     ` Eli Zaretskii [this message]
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=831r61q66n.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=50443@debbugs.gnu.org \
    --cc=roni@kallio.app \
    --cc=stefan@marxist.se \
    /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).