New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check for liveness of process on nix-repl completions #108
Conversation
@@ -149,6 +149,7 @@ guarantees they will be grabbed in a single call." | |||
See `completion-at-point-functions'." | |||
(save-excursion | |||
(let* ((proc (get-buffer-process (current-buffer))) | |||
(process-live-p proc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this does what you think... :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Egads, that was a silly mistake. Thank you.
@@ -149,6 +149,7 @@ guarantees they will be grabbed in a single call." | |||
See `completion-at-point-functions'." | |||
(save-excursion | |||
(let* ((proc (get-buffer-process (current-buffer))) | |||
(process-live-p proc) | |||
(prefix (and (derived-mode-p 'nix-repl-mode) | |||
proc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
proc | |
(process-live-p proc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@purcell is of course correct. But after consulting the docs, I think we might just be able to close this:
Signature
(get-buffer-process BUFFER)
Documentation
Return the (or a) live process associated with BUFFER.
Unless process-live-p
is more stringent than the liveness check in get-process-buffer
, all we're guarding against is an unlikely crash while we're checking the mode, no?
@@ -149,6 +149,7 @@ guarantees they will be grabbed in a single call." | |||
See `completion-at-point-functions'." | |||
(save-excursion | |||
(let* ((proc (get-buffer-process (current-buffer))) | |||
(process-live-p proc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Egads, that was a silly mistake. Thank you.
Yeah, guess so. |
Suggested in review of #107.