[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-hydra 0f61cc5 065/395: Add support for browising co
From: |
Basil L. Contovounesios |
Subject: |
[elpa] externals/ivy-hydra 0f61cc5 065/395: Add support for browising compilation errors |
Date: |
Thu, 25 Feb 2021 08:31:32 -0500 (EST) |
branch: externals/ivy-hydra
commit 0f61cc56054aa2d368655bde11a79cd3f7fd51db
Author: Rudi Grinberg <rudi.grinberg@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>
Add support for browising compilation errors
[counsel-compilation-errors] allows to navigate through the errors of
[M-x compile].
Fixes #2299
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
---
counsel.el | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/counsel.el b/counsel.el
index c5cbc9b..bdd400a 100644
--- a/counsel.el
+++ b/counsel.el
@@ -6238,6 +6238,44 @@ We update it in the callback with
`ivy-update-candidates'."
(define-obsolete-function-alias 'counsel-google
'counsel-search "<2019-10-17 Thu>")
+;;* `counsel-compilation-errors'
+(defun counsel--compilation-errors-buffer (buf)
+ (with-current-buffer buf
+ (let ((res nil)
+ (pt (point-min)))
+ (while (setq pt (compilation-next-single-property-change
+ pt 'compilation-message))
+ (let ((loc (get-text-property pt 'compilation-message)))
+ (when (and loc (setq loc (compilation--message->loc loc)))
+ (let* ((fs (compilation--loc->file-struct loc))
+ (file-name (caar fs))
+ (line-number (compilation--loc->line loc)))
+ (push (propertize
+ (format "%d:%s" line-number file-name)
+ 'pt pt
+ 'buffer buf) res)))))
+ (nreverse res))))
+
+(defun counsel-compilation-errors-cands ()
+ (cl-loop
+ for buf in (buffer-list)
+ when (compilation-buffer-p buf)
+ nconc (counsel--compilation-errors-buffer buf)))
+
+(defun counsel-compilation-errors-action (x)
+ (pop-to-buffer (get-text-property 0 'buffer x))
+ (goto-char (get-text-property 0 'pt x))
+ (compile-goto-error))
+
+;;;###autoload
+(defun counsel-compilation-errors ()
+ "Compilation errors."
+ (interactive)
+ (ivy-read "compilation errors: " (counsel-compilation-errors-cands)
+ :require-match t
+ :action #'counsel-compilation-errors-action
+ :history 'counsel-compilation-errors-history))
+
;;* `counsel-mode'
(defvar counsel-mode-map
(let ((map (make-sparse-keymap)))
- [elpa] externals/ivy-hydra 9e0803c 226/395: ivy.el (ivy--remote-name): Extract and use the file name, (continued)
- [elpa] externals/ivy-hydra 9e0803c 226/395: ivy.el (ivy--remote-name): Extract and use the file name, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 7ed3d85 223/395: Move recent varalias before its referent, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 136ae0e 194/395: Add command for play/pause current song, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra a0063ce 224/395: ivy.el (ivy--done): Revert ivy-set-text, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 5c951e2 245/395: * counsel.el: Add comment on xor compatibility, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 1396d7b 024/395: counsel.el (counsel-grep): Obey ivy-case-fold-search-default, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 2ccda7e 044/395: ivy.el (ivy--directory-done): Fix "Host name must not match method ssh", Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra a7ae5f0 058/395: counsel.el (counsel-geiser-doc-look-up-manual): Add., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 13a1b87 059/395: ivy.el (ivy-minibuffer-map): Bind "M-a" to ivy-toggle-marks, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 49335d2 060/395: Allow to use window configurations for ivy views, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 0f61cc5 065/395: Add support for browising compilation errors,
Basil L. Contovounesios <=
- [elpa] externals/ivy-hydra 2fb4c9f 061/395: Update test instructions, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 3d9c222 069/395: swiper.el (swiper--query-replace-updatefn): Fix, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra c7973a8 083/395: counsel.el (counsel-set-variable): Fix killing the expression, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra e7eca37 085/395: counsel.el (counsel-switch-buffer-preview-virtual-buffers): Add, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra eae1ccf 086/395: ivy.el (ivy-auto-shrink-minibuffer): New defcustom, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra f16e6e2 094/395: counsel.el (counsel-flycheck-errors-cands): Show the error, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 400a900 265/395: ivy.el (ivy-backward-delete-char): Forward to counsel-up-directory, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra edccbd7 270/395: ivy.el (ivy-completion-in-region): Use collection in place of all-completions, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 0f4cb44 051/395: ivy.el (ivy-add-prompt-count): Account for :dynamic-collection returning 0, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra cab01f3 053/395: ivy.el (ivy--reset-state): Add listp check, Basil L. Contovounesios, 2021/02/25