From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin 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, 04 Apr 2016 11:00:29 -0400 Organization: A noiseless patient Spider Message-ID: References: <878u0urdis.fsf@kuiper.lan.informatimago.com> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1459782330 20344 80.91.229.3 (4 Apr 2016 15:05:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Apr 2016 15:05:30 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Apr 04 17:05:25 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 1an64D-0000fp-4g for geh-help-gnu-emacs@m.gmane.org; Mon, 04 Apr 2016 17:05:25 +0200 Original-Received: from localhost ([::1]:59229 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1an64C-00052X-MV for geh-help-gnu-emacs@m.gmane.org; Mon, 04 Apr 2016 11:05:24 -0400 Original-Path: usenet.stanford.edu!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!barmar.motzarella.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 86 Injection-Info: barmar.motzarella.org; posting-host="2be9e9f5dd9af768b8861af71b85fc28"; logging-data="16673"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19LJHW5L328jY13eLRl2CeW" User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Cancel-Lock: sha1:AQnaMUcvUE803rG2zCGJJmqwd9Y= Original-Xref: usenet.stanford.edu gnu.emacs.help:217425 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:109719 Archived-At: In article , Shiyao Ma wrote: > 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? Maybe: M-! /usr/bin/ranger &/dev/tty > > 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/ > >> メThe factory of the future will have only two employees, a man and a > >> dog. The man will be there to feed the dog. The dog will be there to > >> keep the man from touching the equipment.モ -- Carl Bass CEO Autodesk > >> > > > > > > > > -- > > > > 吾輩は猫である。ホームーページはhttps://introo.me 。 > > -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***