From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?B?55m944GE54aK?= Newsgroups: gmane.emacs.devel Subject: Re: Creating modem process and receiving output of AT commands Date: Mon, 01 Mar 2010 16:24:23 +0300 Message-ID: <87bpf8qins.fsf@porzhiz.org> References: <87635g73wc.fsf@porzhiz.org> <877hpwcj60.fsf@ambire.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1267450795 15272 80.91.229.12 (1 Mar 2010 13:39:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 1 Mar 2010 13:39:55 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 01 14:39:51 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nm5qh-0007fN-Cu for ged-emacs-devel@m.gmane.org; Mon, 01 Mar 2010 14:39:51 +0100 Original-Received: from localhost ([127.0.0.1]:42657 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nm5qg-00064d-MF for ged-emacs-devel@m.gmane.org; Mon, 01 Mar 2010 08:39:50 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nm5q8-0005gV-WD for emacs-devel@gnu.org; Mon, 01 Mar 2010 08:39:17 -0500 Original-Received: from [140.186.70.92] (port=34768 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nm5q7-0005ey-Vm for emacs-devel@gnu.org; Mon, 01 Mar 2010 08:39:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nm5q6-0001Hx-BI for emacs-devel@gnu.org; Mon, 01 Mar 2010 08:39:15 -0500 Original-Received: from deleuze.hcoop.net ([69.90.123.67]:59475) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nm5q5-0001Hk-Pe for emacs-devel@gnu.org; Mon, 01 Mar 2010 08:39:14 -0500 Original-Received: from [195.239.33.7] (helo=mbp52) by deleuze.hcoop.net with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1Nm5bo-0006Ie-JK for emacs-devel@gnu.org; Mon, 01 Mar 2010 08:24:29 -0500 In-Reply-To: <877hpwcj60.fsf@ambire.localdomain> (Thien-Thi Nguyen's message of "Mon, 01 Mar 2010 13:37:11 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.93 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:121492 Archived-At: Thien-Thi Nguyen 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. --=20 C =D1=83=D0=B2=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=D0=BC / =E5=AE=9C=E3=81= =97=E3=81=8F=E5=BE=A1=E9=A1=98=E3=81=84=E8=87=B4=E3=81=97=E3=81=BE=E3=81=99= / Best regards / S pozdravem / Z powa=C5=BCaniem / Mit freundlichen Gr=C3= =BC=C3=9Fen =E7=99=BD=E3=81=84=E7=86=8A