unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: 白い熊 <emacs-devel_gnu.org@sumou.com>
To: emacs-devel@gnu.org
Subject: Re: Creating modem process and receiving output of AT commands
Date: Mon, 01 Mar 2010 16:24:23 +0300	[thread overview]
Message-ID: <87bpf8qins.fsf@porzhiz.org> (raw)
In-Reply-To: <877hpwcj60.fsf@ambire.localdomain> (Thien-Thi Nguyen's message of "Mon, 01 Mar 2010 13:37:11 +0100")

Thien-Thi Nguyen <ttn@gnuvola.org> writes:
>   (defun nokia-n900-send-output-keep (process output)
>     (setq nokia-n900-send-output-kept (cons output nokia-n900-send-output-kept)))
>
> Probably you want to add output to the tail, not the head.

Yeah, however, if adding to the tail, for some reason it adds some
strange quotation marks and brackets. This way, the variable has an
identical log, just in reverse order, as when you don't use a filter,
and have output logged to a buffer. Not a big deal, could probably
figure out what's wrong later, after I get it working...

>    But running (testos), it doesn't even get to sending the first `at\r'.
>
> What does that mean, precisely?  Does Emacs signal an error?

No, there is no error, the first AT command doesn't get sent, Emacs just
waits forever.

>    I think the reason is [...].
>
> It's possible that \r is being mangled.
> See `process-coding-system-alist' (and friends).

It's not. If I run all the commands by hand, i.e. line by line, then
Emacs updates, and they are carried out, but if run in a function, it
just halts before getting to the first AT command, if I interrupt the
process, and inspect the value of nokia-n900-send-output-kept it's still
empty.

If I send the commands one by one, i.e. not as a whole function, but
line by line, the nokia-n900-send-output-kept is updated well and it
carries out.

> You should make sure the subprocess sees what Emacs is purporting to send,
> first, before worrying about whether or not Emacs sees what the subprocess
> outputs.

I'm sure of that, as I'can send the SMS each and every time, evaluating
line-by-line, just running the whole function, it gets stuck as Emacs
doesn't see process output and thus doesn't advance to the next step.
-- 
C уважением / 宜しく御願い致します / Best regards / S pozdravem / Z poważaniem / Mit freundlichen Grüßen

白い熊




  reply	other threads:[~2010-03-01 13:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-01 10:05 Creating modem process and receiving output of AT commands 白い熊
2010-03-01 12:37 ` Thien-Thi Nguyen
2010-03-01 13:24   ` 白い熊 [this message]
2010-03-01 21:22     ` Thien-Thi Nguyen
2010-03-01 22:47       ` 白い熊
2010-03-02  0:45         ` Thien-Thi Nguyen

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=87bpf8qins.fsf@porzhiz.org \
    --to=emacs-devel_gnu.org@sumou.com \
    --cc=emacs-devel@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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).