emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: next-error use cases


From: Juri Linkov
Subject: Re: next-error use cases
Date: Tue, 10 Apr 2018 23:06:25 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>> Recently we created such command with the name ‘next-error-select-buffer’.
>> Still too inconvenient for users to run this command explicitly.
>> We need next-error to be more DWIM.
>
> That's what 'compilation-last-buffer' is for; it indicates the buffer
> containing the location list that is current.

I don't understand what do you mean by indication?  Is it a visual
indication somewhere?  I grepped for 'compilation-last-buffer', but in
compile.el 'compilation-last-buffer' is an alias for 'next-error-last-buffer',
and grep.el contains commented out definition whose purpose I don't know:

  ;;;; TODO --- refine this!!
  ;; (defcustom grep-use-compilation-buffer t
  ;;   "When non-nil, grep specific commands update `compilation-last-buffer'.
  ;; This means that standard compile commands like \\[next-error] and 
\\[compile-goto-error]
  ;; can be used to navigate between grep matches (the default).
  ;; Otherwise, the grep specific commands like \\[grep-next-match] must
  ;; be used to navigate between grep matches."
  ;;   :type 'boolean
  ;;   :group 'grep)
  ;; override compilation-last-buffer
  (defvar grep-last-buffer nil
    "The most recent grep buffer.
  A grep buffer becomes most recent when you select Grep mode in it.
  Notice that using \\[next-error] or \\[compile-goto-error] modifies
  `compilation-last-buffer' rather than `grep-last-buffer'.")

> As long as the user has a convenient way to set that, there's no
> problem. In all my current use cases, it is first set by the command
> that generated the location list. I can reset it by navigating to a
> buffer, and using <return> to goto a location; after that, 'next-error'
> continues using that list.

But how can you reset it when the location list is in the same buffer
like in case of flyspell where locations of misspelled words are
in the same buffer where next-error navigates, or flymake where
locations of errors/warnings are in the same buffer?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]