[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/go-mode 9d5f10a 366/495: cmd/guru: emacs: store output in
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/go-mode 9d5f10a 366/495: cmd/guru: emacs: store output in separate buffer |
Date: |
Sat, 7 Aug 2021 09:05:49 -0400 (EDT) |
branch: elpa/go-mode
commit 9d5f10a78de75e34797a52bb3bada360fcfc7e98
Author: Dominik Honnef <dominik@honnef.co>
Commit: Dominik Honnef <dominik@honnef.co>
cmd/guru: emacs: store output in separate buffer
Now that we have both interactive and non-interactive uses of the guru,
we should separate the command output buffer from the display buffer.
Change-Id: I50082fdc3847c7b12869e204509141e906df3852
Reviewed-on: https://go-review.googlesource.com/20473
Reviewed-by: Alan Donovan <adonovan@google.com>
---
guru_import/cmd/guru/go-guru.el | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/guru_import/cmd/guru/go-guru.el b/guru_import/cmd/guru/go-guru.el
index ec4fa8e..7d8ad65 100644
--- a/guru_import/cmd/guru/go-guru.el
+++ b/guru_import/cmd/guru/go-guru.el
@@ -118,8 +118,13 @@ region of the current buffer. If NEED-SCOPE, prompt for a
scope
if not already set. Mark up the output using `compilation-mode`,
replacing each file name with a small hyperlink, and display the
result."
- (with-current-buffer (go-guru--exec mode need-scope)
- (go-guru--compilation-markup)))
+ (let ((output (go-guru--exec mode need-scope))
+ (display (get-buffer-create "*go-guru*")))
+ (with-current-buffer display
+ (setq buffer-read-only nil)
+ (erase-buffer)
+ (insert-buffer-substring output)
+ (go-guru--compilation-markup))))
(defun go-guru--exec (mode &optional need-scope flags allow-unnamed)
"Execute the Go guru in the specified MODE, passing it the
@@ -151,7 +156,7 @@ Return the output buffer."
(env-vars (go-root-and-paths))
(goroot-env (concat "GOROOT=" (car env-vars)))
(gopath-env (concat "GOPATH=" (mapconcat #'identity (cdr env-vars)
":")))
- (output-buffer (get-buffer-create "*go-guru*"))
+ (output-buffer (get-buffer-create "*go-guru-output*"))
(buf (current-buffer)))
(with-current-buffer output-buffer
(setq buffer-read-only nil)
@@ -192,6 +197,7 @@ Return the output buffer."
(defun go-guru--compilation-markup ()
"Present guru output in the current buffer using `compilation-mode'."
+ (goto-char (point-max))
(insert "\n")
(compilation-mode)
(setq compilation-error-screen-columns nil)
@@ -438,12 +444,6 @@ timeout."
(defun go-guru--hl-identifiers-before-change-function (_beg _end)
(go-guru-unhighlight-identifiers))
-;; FIXME(dominikh): currently we're using the same buffer for
-;; interactive and non-interactive output. E.g. if a user ran the
-;; referrers query, and then the hl-identifier timer ran a what query,
-;; the what query's json response would be visible and overwrite the
-;; referrers output
-
;; TODO(dominikh): a future feature may be to cycle through all uses
;; of an identifier.
- [nongnu] elpa/go-mode aa733d8 339/495: go.tools/oracle: turn emacs integration into minor-mode, (continued)
- [nongnu] elpa/go-mode aa733d8 339/495: go.tools/oracle: turn emacs integration into minor-mode, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode cbf7274 343/495: x/tools/oracle: add whicherrs query mode, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 01dff21 358/495: cmd/guru: emacs: package.el compatibility changes, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode dc424ef 361/495: cmd/guru: emacs: add default key binding for whicherrs, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 6bfbd41 371/495: cmd/guru: emacs: report most specific element in expand-region, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 9753f6a 342/495: go.tools: use golang.org/x/... import paths, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode aa9a40c 351/495: cmd/guru: in Emacs, change 'definition' to jump directly, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 95e7a6f 377/495: cmd/guru: emacs: Use cl-lib.el instead of cl.el, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 2e9ec69 376/495: cmd/guru: update Emacs installation documentation, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 37f595f 365/495: cmd/guru: emacs: support running on nameless buffers, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 9d5f10a 366/495: cmd/guru: emacs: store output in separate buffer,
ELPA Syncer <=
- [nongnu] elpa/go-mode 6a92c3b 349/495: cmd/guru: clean ups to command-line interface, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode b2837e7 345/495: cmd/oracle: expect oracle binary beneath $GOBIN, $GOPATH/bin, or $GOROOT/bin, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode f1b8ed0 337/495: go.tools/cmd/oracle: use -pos=file:#start, #end syntax to indicate half-open [start, end) extent of byte offsets., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 7580ac3 359/495: cmd/guru: emacs: allow passing tags to guru, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 90aac96 381/495: cmd/gorename: a precise, type-aware renaming tool for Go identifiers., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 34e7efe 356/495: cmd/guru: emacs: do not shrink results window, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 3da5817 383/495: refactor/rename: allow passing -force flag from Emacs, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 3448304 340/495: go.tools/oracle: change -mode argument into subcommand., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 9d94107 328/495: Release version 1.4.0, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 6bb38ea 387/495: refactor/rename: emacs: set up autoloading of go-rename function, ELPA Syncer, 2021/08/07