From: Dmitry Gutov <dgutov@yandex.ru>
To: "Clément Pit-Claudel" <cpitclaudel@gmail.com>,
"Vladimir Sedach" <vas@oneofus.la>
Cc: emacs-devel@gnu.org
Subject: Re: next-error use cases
Date: Sun, 24 May 2020 04:36:52 +0300 [thread overview]
Message-ID: <65bb4709-f4db-2dcd-fa12-0ce1fcdb7637@yandex.ru> (raw)
In-Reply-To: <152f1200-a2d0-e137-418f-18ceb14fbbe3@gmail.com>
On 23.05.2020 05:26, Clément Pit-Claudel wrote:
>> Oh, its beginning was only a tiny bit earlier:
>>
>> https://lists.gnu.org/archive/html/emacs-devel/2018-04/msg00207.html
>
> Thanks a lot. I think I understand the issue better.
>
> Hopefully the following isn't too silly. Right now we use C-x ` for two fairly different purposes:
>
> 1. We have a list of locations (typically lines and columns), and we want jump from one to the next, opening files and buffers as needed (that's the grep, occur, and compilation-mode cases).
> 2. We have a buffer with interesting locations, and we want to cycle through them (that's the flyspell, flymake, flycheck cases).
>
> This sounds quite similar to what happens with the global and the local mark rings, actually. To cycle through marks in the current buffer you use C-u C-SPC; to cycle through global marks you use C-x C-SPC. So I wonder if it would make sense to have C-x ` cycle through locations that come from "location lists" (grep) and having, say, C-c ` cycle through locations that come from the current buffer (flyspell).
>
> That doesn't fully solve the problem of picking which location list to cycle through, but it eliminates the confusion between local and global locations (as a logical consequence, I imagine C-c ` in a location list would most of the time just move to the next line, though in an occur or grep buffer with multiple lines of context it would jump to the next match)
>
> Does this make sense?
I'm not a big fan of mark rings, personally. Never use them, and if they
were good enough, would we still have the xref marker ring? Formerly
known as find-tag marker ring.
For error navigation, it /could/ be a better idea, but IMHO it's like
we'd be giving up and creating a parallel set of variables and commands
for "local" errors. And necessitate a "muscle memory" context switch
when one goes from "local" errors to "global" or back. One set of
bindings would also have to be more awkward than the other.
How to evaluate this option objectively, though? Maybe we should ask
what kind of user behavior we expect most of the time.
If, when working with local errors, we expect the user to go between
them, then use the "global" navigation commands to jump between
locations from e.g. Compilation, then back to "local" errors, in a short
period of time, then having two sets of commands might be optimal.
If, on the other hand, we rather expect the user not to interleave the
uses of "local" and "global" location lists as often, that the switches
between sources of errors would be mostly performed automatically (e.g.
when one calls 'M-x rgrep'), and that the necessary manual invocations
of next-error-select-buffer would be infrequent enough. Or that the user
would be switching between "global" sources of errors at least as often
as between "local" and "global" ones, we should probably optimize for
having just one set of commands.
There's also another wrinkle: I think there was a proposed feature for
Flycheck to list errors for multiple files (or the whole project)
together? 'next-error' could be handy for jumping between those too.
next prev parent reply other threads:[~2020-05-24 1:36 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-07 21:47 next-error use cases Juri Linkov
2018-04-08 13:48 ` Eli Zaretskii
2018-04-08 19:56 ` Juri Linkov
2018-04-08 20:26 ` Clément Pit-Claudel
2018-04-08 20:35 ` Dmitry Gutov
2018-04-10 4:19 ` Stephen Leake
2018-04-10 14:28 ` Drew Adams
2018-04-09 2:24 ` Eli Zaretskii
2018-04-08 20:36 ` Dmitry Gutov
2018-04-09 14:48 ` Eli Zaretskii
2018-04-09 18:44 ` Charles A. Roelli
2018-04-09 20:47 ` Juri Linkov
2018-04-10 4:24 ` Stephen Leake
2018-04-10 20:06 ` Juri Linkov
[not found] ` <86woxe1l0l.fsf@stephe-leake.org>
2018-04-11 7:29 ` Dmitry Gutov
2018-04-11 20:46 ` Juri Linkov
2018-04-12 15:31 ` Stephen Leake
2018-04-12 15:25 ` Stephen Leake
2018-04-12 16:51 ` Dmitry Gutov
2018-04-13 16:22 ` Stephen Leake
2018-04-13 16:26 ` Dmitry Gutov
2018-04-10 23:06 ` Dmitry Gutov
2018-04-12 20:27 ` Juri Linkov
2018-04-13 7:45 ` Eli Zaretskii
2018-04-13 19:48 ` Juri Linkov
2020-05-19 1:10 ` Dmitry Gutov
2020-05-19 22:12 ` Juri Linkov
2020-05-21 1:57 ` Dmitry Gutov
2020-05-21 20:33 ` Vladimir Sedach
2020-05-21 21:02 ` Stefan Monnier
2020-05-21 21:53 ` Dmitry Gutov
2020-05-21 22:06 ` Juri Linkov
2020-05-21 22:49 ` Dmitry Gutov
2020-05-22 1:31 ` Clément Pit-Claudel
2020-05-22 19:10 ` Vladimir Sedach
2020-05-23 1:22 ` Clément Pit-Claudel
2020-05-23 1:27 ` Dmitry Gutov
[not found] ` <b386929f-4412-860d-343f-a728d6d7e816@gmail.com>
[not found] ` <c6c941bb-a160-f767-b266-6a17f4b4c2ca@yandex.ru>
[not found] ` <152f1200-a2d0-e137-418f-18ceb14fbbe3@gmail.com>
2020-05-23 15:29 ` Drew Adams
2020-05-24 1:36 ` Dmitry Gutov [this message]
2020-05-24 1:41 ` Clément Pit-Claudel
2020-05-24 14:25 ` Dmitry Gutov
2020-05-22 23:50 ` Dmitry Gutov
2020-05-23 1:25 ` Clément Pit-Claudel
2020-05-23 1:29 ` Dmitry Gutov
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=65bb4709-f4db-2dcd-fa12-0ce1fcdb7637@yandex.ru \
--to=dgutov@yandex.ru \
--cc=cpitclaudel@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=vas@oneofus.la \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.