[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/beardbolt ebbdebc66f 239/323: Improve compilation buffe
From: |
ELPA Syncer |
Subject: |
[elpa] externals/beardbolt ebbdebc66f 239/323: Improve compilation buffer display UX |
Date: |
Thu, 9 Mar 2023 10:58:34 -0500 (EST) |
branch: externals/beardbolt
commit ebbdebc66fa4f04771e8112db05ff96c1800fa61
Author: Erik Arvstedt <erik.arvstedt@gmail.com>
Commit: Erik Arvstedt <erik.arvstedt@gmail.com>
Improve compilation buffer display UX
- Always move the point to the first error in the compilation buffer
- Handle buffer display like this:
- If the compilation was manually started, show and select the
compilation buffer in another window.
This way, the user can just press enter to jump to the line where the
error occured.
- If the compilation was auto-started, display the compilation
buffer, but don't select it so that the typing flow is not interrupted.
This makes it obvious that the compilation failed and helpful
error information is shown automatically.
godbolt also removes the assembly display on compilation failures.
---
rmsbolt.el | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/rmsbolt.el b/rmsbolt.el
index 1b829da910..b20bda0c53 100644
--- a/rmsbolt.el
+++ b/rmsbolt.el
@@ -1389,9 +1389,13 @@ Argument OVERRIDE-BUFFER asm src buffer to use instead
of reading
(setq rmsbolt-src-buffer src-buffer)
(display-buffer (current-buffer))
(run-at-time 0 nil #'rmsbolt-update-overlays))))
- ((not rmsbolt--automated-compile)
- ;; Display compilation output
- (display-buffer buffer)
+ (t ; Compilation failed
+ ;; Display compilation buffer
+ (if rmsbolt--automated-compile
+ (display-buffer buffer)
+ ;; If the compilation was directly started by the user,
+ ;; select the compilation buffer.
+ (pop-to-buffer buffer))
;; TODO find a cleaner way to disable overlays.
(with-current-buffer src-buffer
(setq rmsbolt-line-mapping nil))
@@ -1536,10 +1540,13 @@ and return it."
(setq cmd (rmsbolt--demangle-command cmd lang src-buffer))
(with-current-buffer ; With compilation buffer
(let ((shell-file-name (or (executable-find rmsbolt--shell)
- shell-file-name)))
+ shell-file-name))
+ (compilation-auto-jump-to-first-error t))
;; TODO should this be configurable?
(rmsbolt-with-display-buffer-no-window
(compilation-start cmd nil (lambda (&rest _)
"*rmsbolt-compilation*"))))
+ ;; Only jump to errors, skip over warnings
+ (setq-local compilation-skip-threshold 2)
(add-hook 'compilation-finish-functions
#'rmsbolt--handle-finish-compile nil t)
(setq rmsbolt-src-buffer src-buffer))))))
- [elpa] externals/beardbolt be3cf0a712 318/323: Fix problems with beardbolt-compile when file is saved, (continued)
- [elpa] externals/beardbolt be3cf0a712 318/323: Fix problems with beardbolt-compile when file is saved, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 349ace7310 164/323: Merge branch 'master' of gitlab.com:jgkamat/rmsbolt, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 5aeda6f846 155/323: Add basic documentation for compile_commands.json, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 246377bbff 173/323: Add dummy panic handler to reduce size of zig diassembly, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 73dcaca98d 177/323: Remove unneeded variables, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 28ccabf318 190/323: Clean up overlays and simplify hook when asm buffer is closed, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 3a8964d537 204/323: Update Readme, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 7c81d55d3e 202/323: Format go block, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 9b1a5abbdf 208/323: Strip -flto flag from compile_commands.json by default, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt d257e51fce 244/323: starters/zig: Automatically export functions, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt ebbdebc66f 239/323: Improve compilation buffer display UX,
ELPA Syncer <=
- [elpa] externals/beardbolt f6b72fe0eb 248/323: First stab at rainbow overlays, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 3cace942b8 251/323: Fix buffer selection problems, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 041234b499 241/323: Improve auto-compilation, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 2421b29094 255/323: Remove .ert-runner, .gitlab-ci.yml and Cask, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 49e2500be1 259/323: Use shorthands so I can just type bb- instead of beardbolt-, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 58b07a215c 268/323: Simplify some code, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 9f6d1cf10c 269/323: Remove some rmsbolt remnants, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 5deed3972e 276/323: * beardbolt.el (bb--reachable-p, bb--process-asm): Use obarrays., ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 291f82a324 266/323: Continue rewriting, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 3195997ccd 275/323: * beardbolt.el (bb--synch-relation-overlays): Rework and bugfix., ELPA Syncer, 2023/03/09