From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Shiyao Ma Newsgroups: gmane.emacs.help Subject: Re: under termianl emacs, how to start a process and make it believe it's running inside a termial? Date: Mon, 4 Apr 2016 13:46:24 +0800 Message-ID: References: <878u0urdis.fsf@kuiper.lan.informatimago.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1459748814 6339 80.91.229.3 (4 Apr 2016 05:46:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Apr 2016 05:46:54 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "Pascal J. Bourguignon" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Apr 04 07:46:44 2016 Return-path: Envelope-to: geh-help-gnu-emacs@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 1amxLY-00067r-D4 for geh-help-gnu-emacs@m.gmane.org; Mon, 04 Apr 2016 07:46:44 +0200 Original-Received: from localhost ([::1]:56718 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amxLU-0006t9-60 for geh-help-gnu-emacs@m.gmane.org; Mon, 04 Apr 2016 01:46:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34836) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amxLI-0006sH-Ow for help-gnu-emacs@gnu.org; Mon, 04 Apr 2016 01:46:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1amxLF-0004rO-HY for help-gnu-emacs@gnu.org; Mon, 04 Apr 2016 01:46:28 -0400 Original-Received: from mail-lb0-x22c.google.com ([2a00:1450:4010:c04::22c]:34003) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amxLF-0004rK-4R for help-gnu-emacs@gnu.org; Mon, 04 Apr 2016 01:46:25 -0400 Original-Received: by mail-lb0-x22c.google.com with SMTP id vo2so143551942lbb.1 for ; Sun, 03 Apr 2016 22:46:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=introo-me.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=nnuSiGG6UMVspnTsmzPWFKelQciXvwNLBiN/a2B6KzA=; b=XPkmCFSCvWIQDjrO1V/k9P7Bjf1oFJKHAVULs0cYs+uZdh0sQw5DacoEEFaIamIMqK JzDZBC1fzd93CsM3hzzLDOzwEv5v/kYB2MDV+n6ojph2p+tu7EGzNsG2zsgXCkSYIc8M Eo3lE8rgMv0bSrIwtEg7f4wBDnQzhXh6iVxZVyWv1dUt/05BYJ+UwywpcrO1KQBlS5Lj lMq9aamMCJnBt+kwTT1oGvrdzesRSkBrx+ZiZ7D9qf0QHmDtTR8Qq6N0dqKuJkw+9+K/ /IL+uC1PHGeBQo3B9Tgct72L2xaZXhLro3QyakBdoKjG+Yq1XdGeEimZRCyH/PTBmg6F VQmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=nnuSiGG6UMVspnTsmzPWFKelQciXvwNLBiN/a2B6KzA=; b=mQITcjymRIOeN9rCzNM4Y5p+5NmbmpHdEEn24VZ6qIAX/8JnARTMmGEFxHWkYYEspn yESHye+c5lKml4OBnx6TFdqBS6NZOkD6P9603hLKLMTNK6DyXsXtv3Qes3cA/DqWa9ef /Pjd4zyZENNzZhYBfhyS0fmuY+StvlfOTBnnuxjmiFdJZGBnN2yZ5GlJ7KVAAzforuec oEWYyCrpk/isXX9OItyZ1rxrAYjtIuri9AlLxuQwhVeQ3HThAHehPbTFNEK/OKJccGY0 FfYb/IIE/DeFWekGfei8zpX0UjxXbEkde9tiBVpehqcXa8UmJbCEZsnClso086C15pL5 OMrw== X-Gm-Message-State: AD7BkJKf+NaSkxdTVr1AlQDQp7YjYY7zmMz29wYyk/CZgieE8osl9K48KMWng0FUzd57VG0abM7AgEMECZZWAg== X-Received: by 10.28.99.6 with SMTP id x6mr9730976wmb.25.1459748784243; Sun, 03 Apr 2016 22:46:24 -0700 (PDT) Original-Received: by 10.28.24.196 with HTTP; Sun, 3 Apr 2016 22:46:24 -0700 (PDT) X-Originating-IP: [143.89.244.107] In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c04::22c X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:109718 Archived-At: one more thing, `M-x ansi-term' does work. But again, how can I make `ranger' utllize the my termianl (iterm2) instead of the one provided by emacs? On 4 April 2016 at 13:40, Shiyao Ma wrote: > sorry for my first mail. It seems a little misleading. > > > It's not to allocate a term-ish thing for ranger *from emacs*. > > Indeed, I'd like to run "ranger" as the foreground process, since I am > already inside terminal. > > > > Btw, the M-x term thing failed, out put here: > https://bpaste.net/show/c45a47b26cd8 > > But it's not relevant here because the terminal should be my own terminal= . > > > > regards. > > On 3 April 2016 at 22:08, Pascal J. Bourguignon > wrote: > >> Shiyao Ma writes: >> >> > Hi, >> > >> > I am running emacs in a terminal. >> > >> > I want to invoke the ranger program, which is a tui file manager, >> inside >> > emacs. >> > >> > basically, I am translating the following file into elisp. >> > >> https://github.com/hut/ranger/blob/master/examples/vim_file_chooser.vim#= L10 >> > >> > >> > The problem I am facing is, when I do a: >> > (call-process "/usr/bin/ranger") >> > >> > ranger thinks it's not running inside terminal, and exited directly. >> > >> > >> > So, my question is, how to make ranger believe it's actually inside a >> > terminal? >> >> You can use term or terminal for that: >> >> M-x term RET /usr/bin/ranger RET >> >> or: (term "/usr/bin/ranger") ; in code. >> >> >> -- >> __Pascal Bourguignon__ http://www.informatimago.com/ >> =E2=80=9CThe factory of the future will have only two employees, a man a= nd a >> dog. The man will be there to feed the dog. The dog will be there to >> keep the man from touching the equipment.=E2=80=9D -- Carl Bass CEO Auto= desk >> > > > > -- > > =E5=90=BE=E8=BC=A9=E3=81=AF=E7=8C=AB=E3=81=A7=E3=81=82=E3=82=8B=E3=80=82= =E3=83=9B=E3=83=BC=E3=83=A0=E3=83=BC=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=AFhtt= ps://introo.me =E3=80=82 > --=20 =E5=90=BE=E8=BC=A9=E3=81=AF=E7=8C=AB=E3=81=A7=E3=81=82=E3=82=8B=E3=80=82=E3= =83=9B=E3=83=BC=E3=83=A0=E3=83=BC=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=AFhttps:= //introo.me =E3=80=82