From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Constantin Kulikov Newsgroups: gmane.emacs.devel Subject: Point manipulations in the term-mode buffer. Date: Wed, 12 Nov 2014 22:27:40 +0400 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=90e6ba6e8ca41140d20507ad8d6a X-Trace: ger.gmane.org 1415816885 31477 80.91.229.3 (12 Nov 2014 18:28:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Nov 2014 18:28:05 +0000 (UTC) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 12 19:27:59 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xoce5-0007Vb-Sk for ged-emacs-devel@m.gmane.org; Wed, 12 Nov 2014 19:27:58 +0100 Original-Received: from localhost ([::1]:56224 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xoce5-0006wo-F0 for ged-emacs-devel@m.gmane.org; Wed, 12 Nov 2014 13:27:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xocds-0006wi-G3 for emacs-devel@gnu.org; Wed, 12 Nov 2014 13:27:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xocdr-0006gm-F1 for emacs-devel@gnu.org; Wed, 12 Nov 2014 13:27:44 -0500 Original-Received: from mail-ig0-x233.google.com ([2607:f8b0:4001:c05::233]:44270) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xocdr-0006gX-9H for emacs-devel@gnu.org; Wed, 12 Nov 2014 13:27:43 -0500 Original-Received: by mail-ig0-f179.google.com with SMTP id r10so3478403igi.0 for ; Wed, 12 Nov 2014 10:27:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=CNhcZkPe43ab6f0JX/UFDX8vY27NS2o230wS01NWI3o=; b=P3UvSs26N1z0svhf5a3sTHl/bFHiT3m51CsLp3tQlnHxs/6dCWWgra/DrD7vF8fclh 4FLP77DVb+UKzrDXDTs4XJ8CelMJ2NCMgpmLGn/CoPd8ygUi+c9Au/wsW1Sek9brKZSP YjH9yeN3HKsF8pTBd/zVctjjivWcTW9DWyTnAVFrUtvYaISZSy5To493wfX2NUQtF4X+ Hy2275Hj1WXipTyL0b2ZkCAhSD4CXJ6O4ZNtawyGCpdW1vkv9Ys6qVilpBwy+ygeJ/sA 7kE5Q36Wpw7K5Bx86V+FnYrvkncMtmkh8SbEO8Yq2/h7oKpm0uhh8a/YhS8weFzqt8bq 1ckQ== X-Received: by 10.42.167.1 with SMTP id q1mr349092icy.48.1415816861006; Wed, 12 Nov 2014 10:27:41 -0800 (PST) Original-Received: by 10.43.127.195 with HTTP; Wed, 12 Nov 2014 10:27:40 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c05::233 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:176836 Archived-At: --90e6ba6e8ca41140d20507ad8d6a Content-Type: text/plain; charset=UTF-8 Hello. Can somebody explain me about using (point) function or some equivalent in the term-mode buffers? : emacs -Q C-x 3 M-x ielm RET C-x o M-x term RET RET (run /bin/bash by default) C-c C-j (switch term to line mode) C-x o (go back to ielm) In the ielm: (with-current-buffer "*terminal*" (term-char-mode) ;; actually line/char mode doesn't change anything for this example (message "1: %s %s" (point) (term-current-column)) (term-send-raw-string "asd") (message "2: %s %s" (point) (term-current-column)) (term-send-left) (term-send-left) (message "3: %s %s" (point) (term-current-column)) (term-send-right) (message "4: %s %s" (point) (term-current-column))) All of the four messages gives me an equal numbers for point and term-current-column, while point(or cursor) actually moves on the screen. Is it possible and if possible -- how to track the input point movement in a term-mode buffer ? --90e6ba6e8ca41140d20507ad8d6a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello. Can somebody explain = me about using (point) function or some equivalent in the term-mode buffers= ? :

emacs -Q

C-x 3
M-x ielm RET

C-x o
M-x = term RET
RET (run /bin/bash by default)

C-c C-j = (switch term to line mode)
C-x o (go back to ielm)
<= div>
In the ielm:

(with-current-buffer "*terminal*"
=C2=A0=C2=A0=C2=A0=C2=A0 = (term-char-mode) ;; actually line/char mode doesn't change anything for= this example
=C2=A0=C2=A0=C2=A0 =C2=A0(message "1: %s %s" (po= int) (term-current-column))
=C2=A0=C2=A0=C2=A0 =C2=A0(term-send-raw-stri= ng "asd")
=C2=A0=C2=A0=C2=A0 =C2=A0(message "2: %s %s&quo= t; (point) (term-current-column))
=C2=A0=C2=A0=C2=A0 =C2=A0(term-send-le= ft)
=C2=A0=C2=A0=C2=A0 =C2=A0(term-send-left)
=C2=A0=C2=A0=C2=A0 =C2= =A0(message "3: %s %s" (point) (term-current-column))
=C2=A0= =C2=A0=C2=A0 =C2=A0(term-send-right)
=C2=A0=C2=A0=C2=A0 =C2=A0(message &= quot;4: %s %s" (point) (term-current-column)))

All= of the four messages gives me an equal numbers for point and term-current-= column, while point(or cursor) actually moves on the screen.
Is it= possible and if possible -- how to track the input point movement in a ter= m-mode buffer ?

--90e6ba6e8ca41140d20507ad8d6a--