GNU bug report logs -
#64919
28.2; jsonrpc.el: jsonrpc-lambda failed to deal with single value
Previous Next
Reported by: Yue Yi <includeyy123 <at> gmail.com>
Date: Fri, 28 Jul 2023 17:27:02 UTC
Severity: normal
Found in version 28.2
Done: João Távora <joaotavora <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hello João:
> That's a great idea. Have you looked at the jsonrpc.el test application
> in test/lisp/jsonrpc-tests.el? It has a simple application, but it's
> not very well commented, so a well-described tutorial that does a
> similar simple application is welcome.
I haven't read it yet and I will.
> Doing jsonrpc-async-request without success-fn is possible but oesn't
> make much sense, becase there's nothing to react to whatever the server
> returned for this remote proceedure call if the request succeeds.
You're right and what I want to do is to see what will happen if I don't
use :success-fn.
> By the way, this isn't how you make objects in Common Lisp (or in Emacs
> Lisp's emulation of it, which is what we have here). You would have to
> use 'make-instance'
Yes, 'make-instance' is the better one.
> You should first be able to describe in plain English what you want this
> tutorial example to showcase. Do you want to make a simple JSONRPC
> client that asks the endpoint to perform elementary arithmetic remotely?
> Fine. Where do you want the remote endpoint to live? The same Emacs?
> Another Emacs? Another process running a program written in another
> language?
All these problems are indeed things I need to consider if I want to write
an
example using JSON-RPC. My initial idea was simply to use RPC in
Emacs to access some functionalities of Python.
> As I said, it's a very good idea in principle. But from your
> description of it, it seems still a bit fuzzy.
Yeah. While writing this example, I assume that the user acts as the
transport layer
for RPC messages: manually calling 'jsonrpc-connection-send' and
'jsonrpc-connection-receive'
to achieve message transmission. My initial intention is to let readers of
the
tutorial get a simple understanding of how jsonrpc.el works.
> I _think_ you first want to do 1, to get a feeling of how to use the
> library as an application writer. Only then should you move on to 2 to
> understand how to user the library an implementor of new transports.
can't agree more.
In summary, first, I need to consider with whom I will perform RPC and
address some of the details mentioned above. Afterward, I can proceed to
plan and write the tutorial.
I will carefully consider the suggestions above on how to better introduce
the usage of jsonrpc.el. When I believe that my work is well-prepared, I
may consider submitting a request to emacs-devel for review and feedback.
Regards
YI YUE
[Message part 2 (text/html, inline)]
This bug report was last modified 2 years and 25 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.