Browse Source

Merge pull request 'Release 1.0.0' (#1) from DamienCassou/json-process-client:1.0.0 into master

Reviewed-on: https://gitea.petton.fr/nico/json-process-client/pulls/1
master
Nicolas Petton 1 year ago
parent
commit
373b2cc7e3
3 changed files with 21 additions and 25 deletions
  1. +14
    -0
      .drone.yml
  2. +0
    -19
      .gitlab-ci.yml
  3. +7
    -6
      json-process-client.el

+ 14
- 0
.drone.yml View File

@ -0,0 +1,14 @@
kind: pipeline
name: default
platform:
os: linux
arch: arm
steps:
- name: check
image: silex/emacs:27.2-dev
commands:
- emacs --version
- make ci-dependencies
- make check

+ 0
- 19
.gitlab-ci.yml View File

@ -1,19 +0,0 @@
image: ubuntu:latest
.test_job_template: &test_job_definition
script:
- emacs --version
- make ci-dependencies
- make check
test:emacs:25.1:
image: silex/emacs:25.1-dev
<<: *test_job_definition
test:emacs:25.3:
image: silex/emacs:25.3-dev
<<: *test_job_definition
test:emacs:26:
image: silex/emacs:26-dev
<<: *test_job_definition

+ 7
- 6
json-process-client.el View File

@ -4,7 +4,7 @@
;; Author: Nicolas Petton <nicolas@petton.fr>
;; Damien Cassou <damien@cassou.me>,
;; Version: 0.2.0
;; Version: 1.0.0
;; Package-Requires: ((emacs "25.1"))
;; Url: https://gitlab.petton.fr/nico/json-process-client
@ -30,6 +30,7 @@
(require 'json)
(require 'map)
(require 'cl-lib)
;; Private variables
@ -171,7 +172,7 @@ Messages end with a line feed."
(cl-defun json-process-client-start (&key name executable port started-regexp tcp-started-callback save-callback exec-callback delete-callback debug args)
"Start a process using EXECUTABLE. Return an application object.
NAME is a short string describing the application. It is used to
NAME is a short string describing the application. It is used to
name processes and buffers.
PORT is a number indicating which TCP port to connect to reach
@ -186,7 +187,7 @@ SAVE-CALLBACK, EXEC-CALLBACK and DELETE-CALLBACK should be three
functions used to associate callbacks to TCP messages and
responses.
If DEBUG is non-nil, send all messages to a debug buffer. If
If DEBUG is non-nil, send all messages to a debug buffer. If
DEBUG is a string, use this as the name for the debug buffer.
ARGS are passed to EXECUTABLE."
@ -219,7 +220,7 @@ ARGS are passed to EXECUTABLE."
application))
(cl-defun json-process-client-start-with-id (&key name executable port started-regexp tcp-started-callback exec-callback debug args)
"Same as `json-process-client-start' but maps responses to callbacks using ids.
"Like `json-process-client-start' but maps responses to callbacks using ids.
The parameters NAME, EXECUTABLE, PORT, STARTED-REGEXP,
TCP-STARTED-CALLBACK, EXEC-CALLBACK, DEBUG, and ARGS are the same
@ -227,9 +228,9 @@ as in `json-process-client-start'.
This function is simpler to use than `json-process-client-start'
because it doesn't require managing a response-to-callback
mapping manually. Nevertheless, it can only be useful if the
mapping manually. Nevertheless, it can only be useful if the
process pointed to by EXECUTABLE reads ids from the messages and
writes them back in its responses. "
writes them back in its responses."
(let* ((callbacks (list))
(application
(json-process-client-start


Loading…
Cancel
Save