* eshell regexp for prompt
@ 2007-02-04 5:58 Hadron
2007-02-04 7:26 ` Matthew Flaschen
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Hadron @ 2007-02-04 5:58 UTC (permalink / raw)
To: help-gnu-emacs
What is the best regexp to match my eshell prompt which is of the form
~/d1/d1 $
which I assume is an eshell default since my normal bash shell is different?
I basically want "home" to only move cursor to the end of the prompt so
I have to set eshell-prompt-regexp I think?
I ask because I dont see that variable in the eshell UI customization interface.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: eshell regexp for prompt
2007-02-04 5:58 eshell regexp for prompt Hadron
@ 2007-02-04 7:26 ` Matthew Flaschen
2007-02-04 8:26 ` Matthew Flaschen
[not found] ` <mailman.3982.1170574001.2155.help-gnu-emacs@gnu.org>
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Matthew Flaschen @ 2007-02-04 7:26 UTC (permalink / raw)
Cc: help-gnu-emacs
[-- Attachment #1.1: Type: text/plain, Size: 372 bytes --]
Hadron wrote:
> What is the best regexp to match my eshell prompt which is of the form
>
> ~/d1/d1 $
>
> which I assume is an eshell default since my normal bash shell is different?
>
First, are you aware that you can get a bash shell with M-x shell ?
I'll try to look into how you could get the behavior you're asking about
in eshell.
Matt Flaschen
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: eshell regexp for prompt
[not found] ` <mailman.3982.1170574001.2155.help-gnu-emacs@gnu.org>
@ 2007-02-04 8:07 ` Hadron
0 siblings, 0 replies; 8+ messages in thread
From: Hadron @ 2007-02-04 8:07 UTC (permalink / raw)
To: help-gnu-emacs
Matthew Flaschen <matthew.flaschen@gatech.edu> writes:
> Hadron wrote:
>> What is the best regexp to match my eshell prompt which is of the form
>>
>> ~/d1/d1 $
>>
>> which I assume is an eshell default since my normal bash shell is different?
>>
>
> First, are you aware that you can get a bash shell with M-x shell ?
>
Yes, but its not integrated in the same way. But now you mention that, I
wonder what the general concensus is with eshell versus others in emacs.
> I'll try to look into how you could get the behavior you're asking about
> in eshell.
>
> Matt Flaschen
>
--
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: eshell regexp for prompt
2007-02-04 7:26 ` Matthew Flaschen
@ 2007-02-04 8:26 ` Matthew Flaschen
0 siblings, 0 replies; 8+ messages in thread
From: Matthew Flaschen @ 2007-02-04 8:26 UTC (permalink / raw)
To: emacs
[-- Attachment #1.1: Type: text/plain, Size: 734 bytes --]
Matthew Flaschen wrote:
> Hadron wrote:
>> What is the best regexp to match my eshell prompt which is of the form
>>
>> ~/d1/d1 $
>>
>> which I assume is an eshell default since my normal bash shell is different?
>>
>
> First, are you aware that you can get a bash shell with M-x shell ?
>
> I'll try to look into how you could get the behavior you're asking about
> in eshell.
>
> Matt Flaschen
I figured out the reason it works in shell but not eshell is that shell
is based a framework called comint, which defines a "field" for the
prompt. Beginning of line will stop there. However, eshell makes no
field. I tried to make it do so, but couldn't figure it out (I'm new to
elisp).
Matthew Flaschen
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: eshell regexp for prompt
2007-02-04 5:58 eshell regexp for prompt Hadron
2007-02-04 7:26 ` Matthew Flaschen
[not found] ` <mailman.3982.1170574001.2155.help-gnu-emacs@gnu.org>
@ 2007-02-04 16:17 ` David Hansen
2007-02-04 17:21 ` Matthew Flaschen
[not found] ` <mailman.3997.1170606228.2155.help-gnu-emacs@gnu.org>
3 siblings, 1 reply; 8+ messages in thread
From: David Hansen @ 2007-02-04 16:17 UTC (permalink / raw)
To: help-gnu-emacs
On Sun, 04 Feb 2007 06:58:58 +0100 Hadron wrote:
> I basically want "home" to only move cursor to the end of the prompt so
> I have to set eshell-prompt-regexp I think?
(add-hook 'eshell-mode-hook
#'(lambda ()
(define-key eshell-mode-map (kbd "<home>") #'eshell-bol)))
David
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: eshell regexp for prompt
2007-02-04 16:17 ` David Hansen
@ 2007-02-04 17:21 ` Matthew Flaschen
0 siblings, 0 replies; 8+ messages in thread
From: Matthew Flaschen @ 2007-02-04 17:21 UTC (permalink / raw)
To: emacs
[-- Attachment #1.1: Type: text/plain, Size: 628 bytes --]
David Hansen wrote:
> On Sun, 04 Feb 2007 06:58:58 +0100 Hadron wrote:
>
>> I basically want "home" to only move cursor to the end of the prompt so
>> I have to set eshell-prompt-regexp I think?
>
> (add-hook 'eshell-mode-hook
> #'(lambda ()
> (define-key eshell-mode-map (kbd "<home>") #'eshell-bol)))
>
> David
Might as well make it:
(add-hook 'eshell-mode-hook
#'(lambda ()
(define-key eshell-mode-map (kbd "<home>") #'eshell-bol)
(define-key eshell-mode-map (kbd "C-a") #'eshell-bol)))
I'm wondering why this isn't default behavior.
Matt
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: eshell regexp for prompt
[not found] ` <mailman.3997.1170606228.2155.help-gnu-emacs@gnu.org>
@ 2007-02-05 7:58 ` Hadron
2007-02-05 9:00 ` Matthew Flaschen
0 siblings, 1 reply; 8+ messages in thread
From: Hadron @ 2007-02-05 7:58 UTC (permalink / raw)
To: help-gnu-emacs
David Hansen <david.hansen@gmx.net> writes:
> On Sun, 04 Feb 2007 06:58:58 +0100 Hadron wrote:
>
>> I basically want "home" to only move cursor to the end of the prompt so
>> I have to set eshell-prompt-regexp I think?
>
> (add-hook 'eshell-mode-hook
> #'(lambda ()
> (define-key eshell-mode-map (kbd "<home>") #'eshell-bol)))
>
> David
>
>
>
Thanks David. So creating a different reg-exp wasnt the way. I am
surprised this isnt the default to be honest, But as Ive come to
realise in emacs, there is probably a very good reason :)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: eshell regexp for prompt
2007-02-05 7:58 ` Hadron
@ 2007-02-05 9:00 ` Matthew Flaschen
0 siblings, 0 replies; 8+ messages in thread
From: Matthew Flaschen @ 2007-02-05 9:00 UTC (permalink / raw)
Cc: help-gnu-emacs
[-- Attachment #1.1: Type: text/plain, Size: 740 bytes --]
Hadron wrote:
> David Hansen <david.hansen@gmx.net> writes:
>
>> On Sun, 04 Feb 2007 06:58:58 +0100 Hadron wrote:
>>
>>> I basically want "home" to only move cursor to the end of the prompt so
>>> I have to set eshell-prompt-regexp I think?
>> (add-hook 'eshell-mode-hook
>> #'(lambda ()
>> (define-key eshell-mode-map (kbd "<home>") #'eshell-bol)))
>>
>> David
>>
>>
>>
>
> Thanks David. So creating a different reg-exp wasnt the way. I am
> surprised this isnt the default to be honest, But as Ive come to
> realise in emacs, there is probably a very good reason :)
That's certainly possible, but I'm hard-pressed to think of a reason
that applies to eshell but not shell-mode.
Matt
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-02-05 9:00 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-04 5:58 eshell regexp for prompt Hadron
2007-02-04 7:26 ` Matthew Flaschen
2007-02-04 8:26 ` Matthew Flaschen
[not found] ` <mailman.3982.1170574001.2155.help-gnu-emacs@gnu.org>
2007-02-04 8:07 ` Hadron
2007-02-04 16:17 ` David Hansen
2007-02-04 17:21 ` Matthew Flaschen
[not found] ` <mailman.3997.1170606228.2155.help-gnu-emacs@gnu.org>
2007-02-05 7:58 ` Hadron
2007-02-05 9:00 ` Matthew Flaschen
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.