all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Barry Margolin <barmar@alum.mit.edu>
To: help-gnu-emacs@gnu.org
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	[thread overview]
Message-ID: <barmar-196491.11002904042016@88-209-239-213.giganet.hu> (raw)
In-Reply-To: mailman.8972.1459748791.843.help-gnu-emacs@gnu.org

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2285 bytes --]

In article <mailman.8972.1459748791.843.help-gnu-emacs@gnu.org>,
 Shiyao Ma <i@introo.me> 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 >&/dev/tty

> 
> On 4 April 2016 at 13:40, Shiyao Ma <i@introo.me> 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 <pjb@informatimago.com>
> > wrote:
> >
> >> Shiyao Ma <i@introo.me> 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 <http://introo.me>。
> >

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


  parent reply	other threads:[~2016-04-04 15:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.8886.1459691173.843.help-gnu-emacs@gnu.org>
2016-04-03 14:08 ` under termianl emacs, how to start a process and make it believe it's running inside a termial? Pascal J. Bourguignon
2016-04-04  5:40   ` Shiyao Ma
2016-04-04  5:46     ` Shiyao Ma
     [not found]     ` <mailman.8972.1459748791.843.help-gnu-emacs@gnu.org>
2016-04-04 15:00       ` Barry Margolin [this message]
2016-04-05  2:11         ` Shiyao Ma
     [not found]         ` <mailman.9050.1459822277.843.help-gnu-emacs@gnu.org>
2016-04-05  2:43           ` Barry Margolin
2016-04-06  2:43             ` Shiyao Ma
2016-04-06  5:27               ` Bob Proulx
2016-04-04 16:09     ` Yuri Khan
2016-04-03 13:46 Shiyao Ma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=barmar-196491.11002904042016@88-209-239-213.giganet.hu \
    --to=barmar@alum.mit.edu \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.