unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Thien-Thi Nguyen <ttn@gnuvola.org>
To: Oleksandr Gavenko <gavenkoa@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Look for data serialisation format to implement communication between Emacs and external program.
Date: Tue, 08 Jan 2013 10:44:54 +0100	[thread overview]
Message-ID: <874nisuhyh.fsf@zigzag.favinet> (raw)
In-Reply-To: <871udxt8u2.fsf@gavenkoa.example.com> (Oleksandr Gavenko's message of "Mon, 07 Jan 2013 15:35:01 +0200")

[-- Attachment #1: Type: text/plain, Size: 1258 bytes --]

() Oleksandr Gavenko <gavenkoa@gmail.com>
() Mon, 07 Jan 2013 15:35:01 +0200

   But as input come from external process I need manually check for
   input end because parsing of incomplete input take error
   "args-out-of-range".

   I don't know how to resolve this issue.

   Also I don't see have can I split data into packets with "bindat"
   (Emacs send request and Python send response in a loop without
   dropping connection while returned data is valid). As solution - make
   10 attempt with 1 sec delay and then report error - incomplete or
   invalid packet...

See ‘accept-process-output’: (info "(elisp) Accepting Output")
and ‘condition-case’: (info "(elisp) Handling Errors")

   I expect to find a way to get data validation for free (like XSD/RNC
   for XML).

It depends on what you mean by "valid data" and "for free", i suppose.

-- 
Thien-Thi Nguyen ..................................... GPG key: 4C807502
.                  NB: ttn at glug dot org is not me                   .
.                 (and has not been since 2007 or so)                  .
.                        ACCEPT NO SUBSTITUTES                         .
........... please send technical questions to mailing lists ...........

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2013-01-08  9:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-06 21:44 Look for data serialisation format to implement communication between Emacs and external program Oleksandr Gavenko
2013-01-06 22:46 ` Thien-Thi Nguyen
2013-01-07 13:35   ` Oleksandr Gavenko
2013-01-08  9:44     ` Thien-Thi Nguyen [this message]
2013-01-07 21:57   ` Oleksandr Gavenko
     [not found] <mailman.16821.1357508702.855.help-gnu-emacs@gnu.org>
2013-01-07  7:53 ` Helmut Eller
2013-01-07 13:53   ` Oleksandr Gavenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874nisuhyh.fsf@zigzag.favinet \
    --to=ttn@gnuvola.org \
    --cc=gavenkoa@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).