Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

send ctrl-g to bash shell in emacs

41 views
Skip to first unread message

Wes James

unread,
Nov 6, 2012, 6:53:30 PM11/6/12
to help-gn...@gnu.org
ctrl-g means cancel the ctrl commands typed in, but how do you send a ctrl-g to a bash shell inside emacs? ctrl-c ctrl-c will send a ctrl-c. What about sending other keypress sequences through to a shell?

Thanks,

Wes

Peter Dyballa

unread,
Nov 6, 2012, 7:03:51 PM11/6/12
to Wes James, help-gn...@gnu.org

Am 07.11.2012 um 00:53 schrieb Wes James:

> ctrl-g means cancel the ctrl commands typed in, but how do you send a ctrl-g to a bash shell inside emacs?

Have you tried that very simple and basic C-q C-g?

--
Greetings

Pete

These are my principles and if you don't like them... well, I have others.
- Groucho Marx


Wes James

unread,
Nov 7, 2012, 11:29:42 AM11/7/12
to Peter Dyballa, help-gn...@gnu.org
Hi,

On Nov 6, 2012, at 5:03 PM, Peter Dyballa <Peter_...@Web.DE> wrote:

>
> Am 07.11.2012 um 00:53 schrieb Wes James:
>
>> ctrl-g means cancel the ctrl commands typed in, but how do you send a ctrl-g to a bash shell inside emacs?
>
> Have you tried that very simple and basic C-q C-g?
>

I tried that and it just puts ^G on the screen

> --
> Greetings
>
> Pete


wes

Barry Margolin

unread,
Nov 7, 2012, 11:47:47 AM11/7/12
to
In article <mailman.12483.1352305...@gnu.org>,
And when you press Return, it will be sent, just like anything else you
type.

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

Peter Dyballa

unread,
Nov 7, 2012, 11:49:32 AM11/7/12
to Wes James, help-gn...@gnu.org

Am 07.11.2012 um 17:29 schrieb Wes James:

>> Have you tried that very simple and basic C-q C-g?
>>
>
> I tried that and it just puts ^G on the screen

So the shell, or whatever is running inside it, is not waiting for ^G input? There is also the function send-invisible.

Maybe it helps to understand your or your shell's needs when you would explain what you intend to do and to achieve…

--
Greetings

Pete

If we don't succeed, we run the risk of failure.
– George W. Bush


Wes James

unread,
Nov 7, 2012, 12:06:41 PM11/7/12
to Barry Margolin, help-gn...@gnu.org

On Nov 7, 2012, at 9:47 AM, Barry Margolin <bar...@alum.mit.edu> wrote:

> In article <mailman.12483.1352305...@gnu.org>,
> Wes James <comp...@me.com> wrote:
>
>> Hi,
>>
>> On Nov 6, 2012, at 5:03 PM, Peter Dyballa <Peter_...@Web.DE> wrote:
>>
>>>
>>> Am 07.11.2012 um 00:53 schrieb Wes James:
>>>
>>>> ctrl-g means cancel the ctrl commands typed in, but how do you send a
>>>> ctrl-g to a bash shell inside emacs?
>>>
>>> Have you tried that very simple and basic C-q C-g?
>>>
>>
>> I tried that and it just puts ^G on the screen
>
> And when you press Return, it will be sent, just like anything else you
> type.


I did press return and it just brought the command line back without doing anything.

I'm running erlang inside of emacs. I.e., I type in erl and it takes me in to an erlang command-line. It accepts certain ctrl command to do things.

In erlang, when you press ctrl-g it should bring up a line that says:

User switch command
-->

so I can do other commands.

wes

Barry Margolin

unread,
Nov 7, 2012, 12:52:01 PM11/7/12
to
In article <mailman.12490.1352307...@gnu.org>,
Wes James <comp...@me.com> wrote:

> On Nov 7, 2012, at 9:47 AM, Barry Margolin <bar...@alum.mit.edu> wrote:
>
> > In article <mailman.12483.1352305...@gnu.org>,
> > Wes James <comp...@me.com> wrote:
> >
> >> Hi,
> >>
> >> On Nov 6, 2012, at 5:03 PM, Peter Dyballa <Peter_...@Web.DE> wrote:
> >>
> >>>
> >>> Am 07.11.2012 um 00:53 schrieb Wes James:
> >>>
> >>>> ctrl-g means cancel the ctrl commands typed in, but how do you send a
> >>>> ctrl-g to a bash shell inside emacs?
> >>>
> >>> Have you tried that very simple and basic C-q C-g?
> >>>
> >>
> >> I tried that and it just puts ^G on the screen
> >
> > And when you press Return, it will be sent, just like anything else you
> > type.
>
>
> I did press return and it just brought the command line back without doing
> anything.
>
> I'm running erlang inside of emacs. I.e., I type in erl and it takes me in
> to an erlang command-line. It accepts certain ctrl command to do things.
>
> In erlang, when you press ctrl-g it should bring up a line that says:
>
> User switch command
> -->
>
> so I can do other commands.
>
> wes

Don't try to run full-screen programs in an Emacs shell buffer. Use M-x
terminal-emulator if you must run them inside Emacs.

Wes James

unread,
Nov 7, 2012, 3:50:30 PM11/7/12
to help-gn...@gnu.org

On Nov 6, 2012, at 4:53 PM, Wes James <comp...@me.com> wrote:

> ctrl-g means cancel the ctrl commands typed in, but how do you send a ctrl-g to a bash shell inside emacs? ctrl-c ctrl-c will send a ctrl-c. What about sending other keypress sequences through to a shell?


I finally got this working. I have an erlang mode installed and I entered that and did c-c c-z to start an erlang shell and this time when I pressed ctrl-g it put a ^G on the line, but this time when I pressed enter, it did what was expected.

Thanks all for your suggestions!

wes

Wes James

unread,
Nov 7, 2012, 4:42:29 PM11/7/12
to help-gn...@gnu.org
Correction - it was c-q c-g, not just c-g that enter a ^G that I then could press enter and it took affect.

wes

0 new messages