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:40:45 +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 1459748477 1148 80.91.229.3 (4 Apr 2016 05:41:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Apr 2016 05:41:17 +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:41:08 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 1amxG5-0003nz-8g for geh-help-gnu-emacs@m.gmane.org; Mon, 04 Apr 2016 07:41:05 +0200 Original-Received: from localhost ([::1]:56706 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amxG4-0005ok-NQ for geh-help-gnu-emacs@m.gmane.org; Mon, 04 Apr 2016 01:41:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34350) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amxFq-0005mD-Ag for help-gnu-emacs@gnu.org; Mon, 04 Apr 2016 01:40:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1amxFn-0004Ce-3y for help-gnu-emacs@gnu.org; Mon, 04 Apr 2016 01:40:50 -0400 Original-Received: from mail-lf0-x22f.google.com ([2a00:1450:4010:c07::22f]:34476) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amxFm-0004C6-Mw for help-gnu-emacs@gnu.org; Mon, 04 Apr 2016 01:40:47 -0400 Original-Received: by mail-lf0-x22f.google.com with SMTP id c62so152358201lfc.1 for ; Sun, 03 Apr 2016 22:40:46 -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=+nCouGENPRAK1+p2uCce7B8qEGuwqfgHNppbGSfwrJ4=; b=YTukHoQrftCBAch9ZoHsDa0uIwldKz6eRXv7bvnO1oeSLnz9aMk1dQkk+TUa3ehRMA sQd4K6G5Gc5a67O7i9LPkv+XmYrxlm4taeGJNV1zTIwk1rsDulSj4NDUMJ0erMvM/u4h Oq9iZvB/uZdVOyFCZhESmZ//4auEjlabMXhHGdfQZc+NSdc/iBigyx4e55NZtu+t891/ Ca7rElXCc2CXPoB25e4cS+AKUSXRLsBMRjO7knAj+bxWgTpdYbiG4z8EJ8QcteS1U5q3 rWXlr9pPgT2jFm4yA7VR77ZDcFnHXIHWDpOJBaDMr3YwbdodBgYqIDEVypZIoJBedoez W7Bg== 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=+nCouGENPRAK1+p2uCce7B8qEGuwqfgHNppbGSfwrJ4=; b=g0Eu2f2M1m2R2YNUEwssh0jOuRPISUL/r46T8kTns/AsW42bk+I1Qd1OF0AJKwMEeJ 24OuSGL05ybD7yw9jpwmcNeDXZuVvYOqtWevzzmGjtBuqJMVrcChljUfeqvfne0+NB6Q lGxrls/a9lZPrNonwd250Mq861m/1AxGCJpdCZBcAc13XTOsXBLJnE+yMsSlF3XP1xog qtO69obsroljFtYzHR2VF90Ohsxau2L8hJH8s+1Re46NVVjT2hPvYCIdCTdDx3wGQNKe c53nDgsTS8X+kMUIIwq1mKLUB3z5gVGMWZZyHXP6ABNo3GjhUDqZmQ27tiFLhT42cNVI XLiA== X-Gm-Message-State: AD7BkJIJL7bepaOPtHqpY5Ujx3bbekMn20/6Ok4+QzkVcAfZoZ6VrbSYwzwRK87+E+no4CD9bMQDWQPCbc7MxQ== X-Received: by 10.194.216.2 with SMTP id om2mr12466487wjc.164.1459748445698; Sun, 03 Apr 2016 22:40:45 -0700 (PDT) Original-Received: by 10.28.24.196 with HTTP; Sun, 3 Apr 2016 22:40:45 -0700 (PDT) X-Originating-IP: [143.89.244.107] In-Reply-To: <878u0urdis.fsf@kuiper.lan.informatimago.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::22f 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:109717 Archived-At: 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, insi= de > > emacs. > > > > basically, I am translating the following file into elisp. > > > https://github.com/hut/ranger/blob/master/examples/vim_file_chooser.vim#L= 10 > > > > > > 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 an= d 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 Autod= esk > --=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