all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Passing tab to inferiors shell in Shell mode
@ 2006-02-23 13:51 PT
  2006-02-24  4:36 ` Barry Margolin
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: PT @ 2006-02-23 13:51 UTC (permalink / raw)


Shell-mode is nice, but the inferior process I'm running in it can do
smarter completion than shell-mode.

So while I'd like to use the features I shell-mode I also want to send
a real TAB character to the inferior shell sometimes.

C-q TAB doesn't work. It simply inserts a TAB characters.

Is there an other way?

Thanks.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Passing tab to inferiors shell in Shell mode
  2006-02-23 13:51 Passing tab to inferiors shell in Shell mode PT
@ 2006-02-24  4:36 ` Barry Margolin
  2006-02-24  6:50   ` PT
  2006-02-24 20:05 ` Peter Dyballa
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Barry Margolin @ 2006-02-24  4:36 UTC (permalink / raw)


In article <1140702691.193679.142200@v46g2000cwv.googlegroups.com>,
 "PT" <spamfilteraccount@gmail.com> wrote:

> Shell-mode is nice, but the inferior process I'm running in it can do
> smarter completion than shell-mode.
> 
> So while I'd like to use the features I shell-mode I also want to send
> a real TAB character to the inferior shell sometimes.
> 
> C-q TAB doesn't work. It simply inserts a TAB characters.
> 
> Is there an other way?

M-x terminal-emulator

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Passing tab to inferiors shell in Shell mode
  2006-02-24  4:36 ` Barry Margolin
@ 2006-02-24  6:50   ` PT
  2006-02-24 12:56     ` Barry Margolin
  0 siblings, 1 reply; 8+ messages in thread
From: PT @ 2006-02-24  6:50 UTC (permalink / raw)


> M-x terminal-emulator

This doesn't seem to do what I want. I only want to send raw TAB
characters to the inferior shell. All other keybindings should retain
their normal behavior as in shell-mode.

This way I could enjoy the advantages of shell mode while using the
superior completion implementation of the inferior shell.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Passing tab to inferiors shell in Shell mode
  2006-02-24  6:50   ` PT
@ 2006-02-24 12:56     ` Barry Margolin
  2006-02-24 20:35       ` PT
  0 siblings, 1 reply; 8+ messages in thread
From: Barry Margolin @ 2006-02-24 12:56 UTC (permalink / raw)


In article <1140763831.980129.168280@p10g2000cwp.googlegroups.com>,
 "PT" <spamfilteraccount@gmail.com> wrote:

> > M-x terminal-emulator
> 
> This doesn't seem to do what I want. I only want to send raw TAB
> characters to the inferior shell. All other keybindings should retain
> their normal behavior as in shell-mode.
> 
> This way I could enjoy the advantages of shell mode while using the
> superior completion implementation of the inferior shell.

The problem is that shell-mode is NOT a video terminal emulator.  Even 
if you send TAB, the shell you're sending to won't be able to do all the 
cursor control to display completions -- the escape sequences will just 
show up as literal characters in the buffer.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Passing tab to inferiors shell in Shell mode
  2006-02-23 13:51 Passing tab to inferiors shell in Shell mode PT
  2006-02-24  4:36 ` Barry Margolin
@ 2006-02-24 20:05 ` Peter Dyballa
  2006-02-25 11:31 ` Eli Zaretskii
       [not found] ` <mailman.54.1140867086.5016.help-gnu-emacs@gnu.org>
  3 siblings, 0 replies; 8+ messages in thread
From: Peter Dyballa @ 2006-02-24 20:05 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 23.02.2006 um 14:51 schrieb PT:

> Shell-mode is nice, but the inferior process I'm running in it can do
> smarter completion than shell-mode.
>
> So while I'd like to use the features I shell-mode I also want to send
> a real TAB character to the inferior shell sometimes.
>
> C-q TAB doesn't work. It simply inserts a TAB characters.

shell-quote-argument ?

There is also term or terminal-emulator.

--
Greetings

   Pete

"What do you think of Western Civilisation?"
  "I think it would be a good idea!"
     - Mohandas Karamchand Gandhi

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Passing tab to inferiors shell in Shell mode
  2006-02-24 12:56     ` Barry Margolin
@ 2006-02-24 20:35       ` PT
  0 siblings, 0 replies; 8+ messages in thread
From: PT @ 2006-02-24 20:35 UTC (permalink / raw)



Barry Margolin wrote:
> In article <1140763831.980129.168280@p10g2000cwp.googlegroups.com>,
>
> The problem is that shell-mode is NOT a video terminal emulator.  Even
> if you send TAB, the shell you're sending to won't be able to do all the
> cursor control to display completions -- the escape sequences will just
> show up as literal characters in the buffer.
>

I think I figured out what to do in theory:

When tab is pressed a raw tab character is to be sent to the inferior
shell (I found a code snippet which does this). The inferior shell
performs the completion and displays the possible candidates. The
displayed list is saved and removed from the shell buffer, otherwise it
would be considered part of the input for the next command.

Then the saved list is parsed and a completion buffer is popped up for
the user to select a completion (like in case of file completion), The
selected completion is then inserted back to the buffer.

Of course, there will be a bit of flickering when the inferior shell
writes its output and it is removed from the shell buffer, but it's not
a great price for better completion.

The only thing left is to implement the whole thing. :)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Passing tab to inferiors shell in Shell mode
  2006-02-23 13:51 Passing tab to inferiors shell in Shell mode PT
  2006-02-24  4:36 ` Barry Margolin
  2006-02-24 20:05 ` Peter Dyballa
@ 2006-02-25 11:31 ` Eli Zaretskii
       [not found] ` <mailman.54.1140867086.5016.help-gnu-emacs@gnu.org>
  3 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2006-02-25 11:31 UTC (permalink / raw)


> From: "PT" <spamfilteraccount@gmail.com>
> Date: 23 Feb 2006 05:51:31 -0800
> 
> Shell-mode is nice, but the inferior process I'm running in it can do
> smarter completion than shell-mode.

How smarter?  Can you specify the shell and describe its smarter
completion?  It's quite possible that Emacs already can be similarly
smart, perhaps as an option; or there might be place for a new
feature.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Passing tab to inferiors shell in Shell mode
       [not found] ` <mailman.54.1140867086.5016.help-gnu-emacs@gnu.org>
@ 2006-02-25 15:55   ` PT
  0 siblings, 0 replies; 8+ messages in thread
From: PT @ 2006-02-25 15:55 UTC (permalink / raw)



Eli Zaretskii wrote:
>
> How smarter?  Can you specify the shell and describe its smarter
> completion?  It's quite possible that Emacs already can be similarly
> smart, perhaps as an option; or there might be place for a new
> feature.

It's an Erlang shell which can complete module and function names which
can be invoked from the shell.

It's language specific, not a generic feature.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-02-25 15:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-23 13:51 Passing tab to inferiors shell in Shell mode PT
2006-02-24  4:36 ` Barry Margolin
2006-02-24  6:50   ` PT
2006-02-24 12:56     ` Barry Margolin
2006-02-24 20:35       ` PT
2006-02-24 20:05 ` Peter Dyballa
2006-02-25 11:31 ` Eli Zaretskii
     [not found] ` <mailman.54.1140867086.5016.help-gnu-emacs@gnu.org>
2006-02-25 15:55   ` PT

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.