[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/plz 260840d3e7 18/40: Change: (plz--respond) Rename fro
From: |
ELPA Syncer |
Subject: |
[elpa] externals/plz 260840d3e7 18/40: Change: (plz--respond) Rename from plz--timer |
Date: |
Mon, 26 Jun 2023 06:59:33 -0400 (EDT) |
branch: externals/plz
commit 260840d3e749c2c3580eb177a3ff03b9aad1ab7d
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>
Change: (plz--respond) Rename from plz--timer
And improve docstring.
---
plz.el | 28 ++++++++++++++++++----------
1 file changed, 18 insertions(+), 10 deletions(-)
diff --git a/plz.el b/plz.el
index 27107978d3..f06be9aef8 100644
--- a/plz.el
+++ b/plz.el
@@ -731,26 +731,34 @@ node `(elisp) Sentinels'). Kills the buffer before
returning."
((or 0 "finished\n")
;; Curl exited normally: check HTTP status code.
(if plz-sync
- (plz--timer process buffer status)
- (run-at-time 0 nil #'plz--timer process buffer status)))
+ (plz--respond process buffer status)
+ (run-at-time 0 nil #'plz--respond process buffer status)))
((or (and (pred numberp) code)
(rx "exited abnormally with code " (let code (group (1+ digit)))))
;; Curl error.
(ignore code)
(if plz-sync
- (plz--timer process buffer status)
- (run-at-time 0 nil #'plz--timer process buffer status)))
+ (plz--respond process buffer status)
+ (run-at-time 0 nil #'plz--respond process buffer status)))
((and (or "killed\n" "interrupt\n") status)
;; Curl process killed or interrupted.
(if plz-sync
- (plz--timer process buffer status)
- (run-at-time 0 nil #'plz--timer process buffer status)))))))
-
-(defun plz--timer (process buffer status)
- "Process HTTP response in BUFFER.
-To be called from a timer run in `plz--sentinel'."
+ (plz--respond process buffer status)
+ (run-at-time 0 nil #'plz--respond process buffer status)))))))
+
+(defun plz--respond (process buffer status)
+ "Respond to HTTP response from PROCESS in BUFFER.
+Parses the response and calls the THEN/ELSE callbacks
+accordingly. To be called from `plz--sentinel'. STATUS is the
+argument passed to `plz--sentinel', which see."
+ ;; Is it silly to call this function "please respond"? Perhaps, but
+ ;; naming things is hard. The term "process" has another meaning in
+ ;; this context, and the old standby, "handle," is much overused.
+ ;; "Respond" also means "to react to something," which is what this
+ ;; does--react to receiving the HTTP response--and it's an internal
+ ;; name, so why not.
(let ((finally (buffer-local-value 'plz-finally buffer))
sync)
(cl-assert process nil "PROCESS IS NIL FOR BUFFER:%S" buffer)
- [elpa] externals/plz 582f0c5bb8 31/40: Tests: Enable continue-on-error for linting, (continued)
- [elpa] externals/plz 582f0c5bb8 31/40: Tests: Enable continue-on-error for linting, ELPA Syncer, 2023/06/26
- [elpa] externals/plz b896c41d71 32/40: Change: Generate buffer for STDERR, ELPA Syncer, 2023/06/26
- [elpa] externals/plz d2a7368699 37/40: Tidy: (plz) Don't switch to process-buffer, ELPA Syncer, 2023/06/26
- [elpa] externals/plz 9319470060 38/40: Merge branch 'wip/no-signal-from-sentinel-as-timer', ELPA Syncer, 2023/06/26
- [elpa] externals/plz 5e63662e21 40/40: Docs: Update changelog, ELPA Syncer, 2023/06/26
- [elpa] externals/plz 0cb20bc74d 03/40: Tidy, ELPA Syncer, 2023/06/26
- [elpa] externals/plz e28b4e8b6a 06/40: Tidy, ELPA Syncer, 2023/06/26
- [elpa] externals/plz 8f263bfd0f 09/40: Comment: Remove old TODO, ELPA Syncer, 2023/06/26
- [elpa] externals/plz c181fd1565 10/40: Tidy: Error handling in THEN function, ELPA Syncer, 2023/06/26
- [elpa] externals/plz 4735c8333d 17/40: Fix: (plz) Signal error with data as list, ELPA Syncer, 2023/06/26
- [elpa] externals/plz 260840d3e7 18/40: Change: (plz--respond) Rename from plz--timer,
ELPA Syncer <=
- [elpa] externals/plz b04b466d79 19/40: Change: Signal plz-curl/http-error again, ELPA Syncer, 2023/06/26
- [elpa] externals/plz 5a60113110 21/40: Comment: Add links to bug reports, ELPA Syncer, 2023/06/26
- [elpa] externals/plz 96710ad323 23/40: Tidy, ELPA Syncer, 2023/06/26
- [elpa] externals/plz 7edcd67472 27/40: Change: Set STDERR process and sentinel, ELPA Syncer, 2023/06/26
- [elpa] externals/plz 3576b9820c 28/40: Tidy: Unused arguments, ELPA Syncer, 2023/06/26
- [elpa] externals/plz f94f8af98a 30/40: Tidy: Error message, ELPA Syncer, 2023/06/26
- [elpa] externals/plz 1aad476df9 33/40: Fix: Replace string in error data, ELPA Syncer, 2023/06/26
- [elpa] externals/plz 3dfcbff613 36/40: Change: Use process properties instead of buffer-local variables, ELPA Syncer, 2023/06/26
- [elpa] externals/plz 919d2b8500 39/40: Docs: Update changelog, ELPA Syncer, 2023/06/26