[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gtags-mode 9b67043bcf 44/61: Use a workaround to pint p
From: |
ELPA Syncer |
Subject: |
[elpa] externals/gtags-mode 9b67043bcf 44/61: Use a workaround to pint proper information |
Date: |
Thu, 28 Apr 2022 10:57:41 -0400 (EDT) |
branch: externals/gtags-mode
commit 9b67043bcf194b24fd80400b6ff4a86033c1e4d2
Author: Jimmy Aguilar Mena <kratsbinovish@gmail.com>
Commit: Jimmy Aguilar Mena <kratsbinovish@gmail.com>
Use a workaround to pint proper information
In async processes the remote commands are not printed properly a new
feature in tramp was added for this, but it is too new, so it is better
to use a workaround.
---
Readme.md | 9 ++++++---
gtags-mode.el | 20 ++++++++++++--------
2 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/Readme.md b/Readme.md
index 30e8344413..878638b36b 100644
--- a/Readme.md
+++ b/Readme.md
@@ -2,7 +2,10 @@ Readme
======
This is a simple project to enable GNU global integration with Emacs
-xref and imenu with emphasis on tramp support and simplicity.
+xref, project, completion-at-point (capf) and imenu with emphasis on
+tramp support and simplicity.
+
+Just load and enable the mode: `gtags-mode` or call it in a hook as
+usual.
+
-Just load and enable the mode: `global-xref-mode` or call it in a
-hook.
diff --git a/gtags-mode.el b/gtags-mode.el
index 5e8a1f887e..7c73e4af38 100644
--- a/gtags-mode.el
+++ b/gtags-mode.el
@@ -98,7 +98,8 @@ The address is relative on remote hosts and includes the
remote prefix.")
"Sentinel to run when PROCESS emits EVENT.
This is the sentinel set in `gtags-mode--exec-async'."
(let ((temp-buffer (process-buffer process))
- (parent-buffer (process-get process :buffer)))
+ (parent-buffer (process-get process :buffer))
+ (command (process-get process :command)))
(if (and (eq (process-status process) 'exit) ;; if success
(eq (process-exit-status process) 0))
(and (buffer-name temp-buffer) ;; kill temp buffer
@@ -108,8 +109,9 @@ This is the sentinel set in `gtags-mode--exec-async'."
(message "Global error output:\n%s" (buffer-string))))
(when (buffer-live-p parent-buffer) ;; Always clear the cache
(with-current-buffer parent-buffer
- (plist-put gtags-mode--plist :cache nil))))
- (message "Async %s: %s" (process-command process) event)) ;; Notify
+ (plist-put gtags-mode--plist :cache nil)))
+ ;; TODO: use `remote-command' in the future, it will be on emacs 29.1
+ (message "Async %s: %s" command event))) ;; Notify
(defsubst gtags-mode--quote (args symbol)
"Pre-process ARGS and quote SYMBOL."
@@ -122,12 +124,14 @@ Start an asynchronous process and sets
`gtags-mode--exec-async-sentinel' as the process sentinel.
Returns the process object."
(when cmd
- (let ((pr (make-process :name (format "%s-async" cmd)
- :buffer (generate-new-buffer " *temp*" t)
- :command (append `(,cmd) (gtags-mode--quote args
target))
- :sentinel #'gtags-mode--exec-async-sentinel
- :file-handler t)))
+ (let* ((command (append `(,cmd) (gtags-mode--quote args target)))
+ (pr (make-process :name (format "%s-async" cmd)
+ :buffer (generate-new-buffer " *temp*" t)
+ :command command
+ :sentinel #'gtags-mode--exec-async-sentinel
+ :file-handler t)))
(process-put pr :buffer (current-buffer))
+ (process-put pr :command command) ;; In future not needed with
`remote-commands'.
pr)))
(defun gtags-mode--exec-sync (args &optional target)
- [elpa] externals/gtags-mode b18a7cb93d 46/61: Fix docs, info messages and use `(,, (continued)
- [elpa] externals/gtags-mode b18a7cb93d 46/61: Fix docs, info messages and use `(,, ELPA Syncer, 2022/04/28
- [elpa] externals/gtags-mode 3d7bf179bb 29/61: Use make-process instead of start-file-process., ELPA Syncer, 2022/04/28
- [elpa] externals/gtags-mode dc50f340d4 12/61: Small fixes in documentation and other details., ELPA Syncer, 2022/04/28
- [elpa] externals/gtags-mode 5525174de9 34/61: Many changes:, ELPA Syncer, 2022/04/28
- [elpa] externals/gtags-mode 317ed00754 61/61: Assert we retun nil on error, ELPA Syncer, 2022/04/28
- [elpa] externals/gtags-mode 7dc81cbae2 56/61: Small simplifies, ELPA Syncer, 2022/04/28
- [elpa] externals/gtags-mode 5445a63b79 21/61: Small fixes., ELPA Syncer, 2022/04/28
- [elpa] externals/gtags-mode 33938b17e7 41/61: New function, ELPA Syncer, 2022/04/28
- [elpa] externals/gtags-mode d1195ca318 40/61: Use memoization function, ELPA Syncer, 2022/04/28
- [elpa] externals/gtags-mode 65c2da145a 11/61: Reorder code a but and simplify., ELPA Syncer, 2022/04/28
- [elpa] externals/gtags-mode 9b67043bcf 44/61: Use a workaround to pint proper information,
ELPA Syncer <=
- [elpa] externals/gtags-mode 2e5ecb8042 39/61: Add check on mode enable., ELPA Syncer, 2022/04/28
- [elpa] externals/gtags-mode 19f827a1d7 15/61: Use delq instead of remove., ELPA Syncer, 2022/04/28
- [elpa] externals/gtags-mode 688f1e8886 16/61: Break long lines., ELPA Syncer, 2022/04/28
- [elpa] externals/gtags-mode ea16b9d8c7 23/61: global-xref-project-backend shouldn't call global-xref--find-root., ELPA Syncer, 2022/04/28
- [elpa] externals/gtags-mode c2e13cc742 33/61: Use a better name gtags-mode is free., ELPA Syncer, 2022/04/28
- [elpa] externals/gtags-mode cd79d73561 26/61: Fix following Michael Albinus recommendations., ELPA Syncer, 2022/04/28
- [elpa] externals/gtags-mode 75aef71741 19/61: Fix messages., ELPA Syncer, 2022/04/28
- [elpa] externals/gtags-mode 13a0afbefd 31/61: Renamed to gtags-xref-mode., ELPA Syncer, 2022/04/28
- [elpa] externals/gtags-mode 3f43b6056d 47/61: ;; Fix typo, ELPA Syncer, 2022/04/28
- [elpa] externals/gtags-mode ce6a4a6201 60/61: Merge pull request #1 from jangid/master, ELPA Syncer, 2022/04/28