unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tim X <timx@nospam.dev.null>
To: help-gnu-emacs@gnu.org
Subject: Re: What I'm missing when using M-x shell
Date: Sun, 14 Sep 2008 12:20:44 +1000	[thread overview]
Message-ID: <874p4jeadf.fsf@lion.rapttech.com.au> (raw)
In-Reply-To: 64cc3cde-69bb-4afc-b874-2ee37c302976@i20g2000prf.googlegroups.com

Livin Stephen <livin.stephen@gmail.com> writes:

> On Sep 12, 9:20 pm, "Francis Moreau" <francis.m...@gmail.com> wrote:
>> Hello,
>>
>> I'm still trying to do all my jobs inside emacs but I'm missing a couple
>> things.
>>
>> The first one is what I can't do anymore when working with a shell/terminal
>> inside emacs.
>>
>>   1/ Most applications based on ncurse behave strangely when using
>>       M-x term
>>
>>   2/ Although M-x shell has history reference completions, it doesn't complete
>>       for '!#:<n>'. But '!!:<n>' works fine though.
>>
>>   3/ There's no readline "reverse-search-history" function (C-r) which does
>>      an _incremental_  search;
>>
>>   4/ There's no readline "yank-last-arg" function which inserts the last
>>       argument to the previous commands
>>
>>   5/ emacs doesn't expand shell variable when hitting <TAB>
>>
>> Am I missing something ?
>>
>> Thanks
>> --
>> Francis
>
>
> Hi, FM.
> I too found M-x term to initially fall terribly short - but not
> anymore :)
>
> YMMV, but I had to "export TERM=xterm" in my ~/.bashrc  to make M-x
> term work as per expectations...
> - i.e. to be usable for everyday use: on my Mac I'm perfectly happy
> with it's behaviour now!
>
>
>  (previous value in M-x term term used to show $TERM to be eterm-color
> or something like that)
>
> After this change my man-pages, etc don't look like their full of odd
> characters (especiallly when trying to print single-quotes), nor is
> man-page text underlined randomly .
>
> This TERM change definitely took care of at least issues 3/, and 5/
> which you mention
>  - I have both "C-r" history-search and "TAB"-completion of shell-vars
> AND file-names working.
>

I think the reason you got better results setting the term to xterm
rather than eterm-color is to do with terminfo. 

There are many programs that when executed check the terminfo database
to find out what the capabilities of the terminal are. Often, a program
will drop back to a 'dumb' terminal setting if the terminal returned by
$TERM is not in the terminfo database. 

IIRC, eterm-color is not set in the terminfo database on most systems,
so when you run a program, it cannot determine what the
capabilities/characteristics of the terminal your running under are. 

Setting the TERM variable to xterm probably gives resonable results
because the capabilities are similar. However, you would probably get
even better results by adding eterm-color to your terminfo database. I
think you will find the relevant information in the Emacs etc/e
directory. 

I'm surprised setting TERM=xterm and exporting it prior to running M-x
term works at all. The TERM setting is (I think) set as part of the
startup (see term.el). I'm assuming what you are doing is issuing an
export TERM=xterm or something similar once you have started M-x term?

On my system, Debian, I've put the eterm-color terminfo file in
/etc/terminfo/e/ and I don't seem to have many of the problems being
reported under M-x term. For example, if I enter echo $T and hit tab, it
is completed to echo $TERM. 

HTH

Tim


-- 
tcross (at) rapttech dot com dot au


  parent reply	other threads:[~2008-09-14  2:20 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.19125.1221236437.18990.help-gnu-emacs@gnu.org>
2008-09-12 17:34 ` What I'm missing when using M-x shell Dan Espen
2008-09-13  8:27   ` Francis Moreau
2008-09-15  7:32     ` Jonathan Groll
2008-09-15  8:42       ` Francis Moreau
2008-09-15  9:05         ` Francis Moreau
     [not found]   ` <mailman.19169.1221294471.18990.help-gnu-emacs@gnu.org>
2008-09-13 15:42     ` Dan Espen
2008-09-13 16:43       ` Francis Moreau
2008-09-13 17:32         ` Thierry Volpiatto
2008-09-13 19:14           ` Francis Moreau
2008-09-13 19:50             ` Thierry Volpiatto
2008-09-14  4:02     ` Tim X
2008-09-12 17:59 ` Oleksandr Gavenko
2008-09-13  8:29   ` Francis Moreau
     [not found]   ` <mailman.19170.1221294576.18990.help-gnu-emacs@gnu.org>
2008-09-15 18:32     ` Oleksandr Gavenko
2008-09-13  6:10 ` rustom
2008-09-13  8:36   ` Francis Moreau
2008-09-13  8:08 ` Livin Stephen
2008-09-13  9:00   ` Francis Moreau
2008-09-13 11:21     ` Livin Stephen Sharma
2008-09-13 14:27       ` Francis Moreau
2008-09-13 12:22   ` David Hansen
2008-09-14  2:20   ` Tim X [this message]
2008-09-15  7:56     ` Livin Stephen
2008-09-15  8:49       ` Francis Moreau
2008-09-13 22:43 ` Chris F.A. Johnson
2008-09-14 18:30   ` Francis Moreau
2008-09-14 18:40     ` Thierry Volpiatto
     [not found]     ` <mailman.19222.1221417839.18990.help-gnu-emacs@gnu.org>
2008-09-14 18:55       ` Barry Margolin
2008-09-14 20:28         ` Francis Moreau
2008-09-14 20:41           ` Francis Moreau
     [not found]   ` <mailman.19221.1221417026.18990.help-gnu-emacs@gnu.org>
2008-09-14 18:33     ` Chris F.A. Johnson
2008-09-14 18:50       ` Drew Adams
2008-09-14 20:01       ` Francis Moreau
2008-09-15 10:26         ` Bernardo Bacic
     [not found]       ` <mailman.19228.1221422522.18990.help-gnu-emacs@gnu.org>
2008-09-14 20:27         ` Chris F.A. Johnson
2008-09-15  6:32           ` Francis Moreau
2008-09-15 10:35             ` Francis Moreau
2008-09-15 11:38             ` Thierry Volpiatto
2008-09-15 12:10               ` Francis Moreau
2008-09-15 13:00                 ` Thierry Volpiatto
2008-09-15 13:13                   ` Francis Moreau
2008-09-12 16:20 Francis Moreau

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=874p4jeadf.fsf@lion.rapttech.com.au \
    --to=timx@nospam.dev.null \
    --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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).