unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: "Clément Pit-Claudel" <cpitclaudel@gmail.com>, emacs-devel@gnu.org
Subject: Re: next-error use cases
Date: Sat, 23 May 2020 02:50:28 +0300	[thread overview]
Message-ID: <29756ecf-21ad-0f99-33c0-b01e342a577c@yandex.ru> (raw)
In-Reply-To: <f3b1470e-5720-6db7-f220-fca20525dfaa@gmail.com>

On 22.05.2020 04:31, Clément Pit-Claudel wrote:
> On 21/05/2020 18.49, Dmitry Gutov wrote:
>> On 22.05.2020 01:06, Juri Linkov wrote:
>>>> A binding for flymake-show-diagnostics-buffer in goto-map?
>>> Good idea, not only for flymake, but for all next-error capable buffers:
>>> a keybinding in goto-map to show the buffer with a list of errors/matches.
>>> For example, the user is navigating using 'M-g M-n' when the next-errors buffer
>>> is not visible, then wants to see all errors/matches, so the user needs to type
>>> some M-g key to show it.
>>
>> So we'll have 'M-g l' to pop up the current 'next-error-last-buffer'.
>>
>> And 'C-c ! l' to pop Flymake's diagnostics buffer specifically (and change next-error-last-buffer's value appropriately). 'C-c ! n' and 'C-c ! p' could work along the same idea.
> 
> Does this mean that Flycheck should override M-g l too, or will that work automatically (how will M-g l know which one to pick?)

I think this will work simply like:

(defun next-error-show-list ()
   (interactive)
   (pop-to-buffer next-error-last-buffer))

But for this to be okay, we'd have to decide on a principle, and 
Flycheck would have to agree, that next-error-function is set in 
flycheck-error-list-mode, and not in flycheck-mode.

> These are the relevant bits of Flycheck's map, I think:
> 
>      (define-key map "c"         #'flycheck-buffer)
>      (define-key map "C"         #'flycheck-clear)
>      (define-key map "n"         #'flycheck-next-error)
>      (define-key map "p"         #'flycheck-previous-error)
>      (define-key map "l"         #'flycheck-list-errors)
>      (define-key map (kbd "C-w") #'flycheck-copy-errors-as-kill)
>      (define-key map "s"         #'flycheck-select-checker)
>      (define-key map "h"         #'flycheck-display-error-at-point)
>      (define-key map "H"         #'display-local-help)

The copy-errors-as-kill command sounds nice. Not sure if any others can 
easily apply to Flymake too.



  parent reply	other threads:[~2020-05-22 23:50 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
2020-05-24  1:41                                     ` Clément Pit-Claudel
2020-05-24 14:25                                       ` Dmitry Gutov
2020-05-22 23:50                       ` Dmitry Gutov [this message]
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

  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=29756ecf-21ad-0f99-33c0-b01e342a577c@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=cpitclaudel@gmail.com \
    --cc=emacs-devel@gnu.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).