From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Marco Baringer Newsgroups: gmane.emacs.help Subject: Re: How to get a read-only prompt in emacs shell Date: 14 Jun 2002 17:57:22 +0200 Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1024070476 10263 127.0.0.1 (14 Jun 2002 16:01:16 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 14 Jun 2002 16:01:16 +0000 (UTC) Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17ItVj-0002fQ-00 for ; Fri, 14 Jun 2002 18:01:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17ItUn-0003nh-00; Fri, 14 Jun 2002 12:00:17 -0400 Original-Received: from ppp-62-10-91-107.dialup.tiscali.it ([62.10.91.107] helo=localhost.com) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17ItTl-0003fe-00 for ; Fri, 14 Jun 2002 11:59:13 -0400 Original-Received: (from marco@localhost) by localhost.com (8.10.2/8.10.2) id g5EFwNM02629; Fri, 14 Jun 2002 17:58:23 +0200 (CEST) X-Authentication-Warning: localhost: marco set sender to e.baringer@studenti.to.it using -f Original-To: help-gnu-emacs@gnu.org In-Reply-To: Original-Lines: 43 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1.30 Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:474 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:474 ruhl@4dv.net (Robert Uhl ) writes: > e.baringer@studenti.to.it (Marco Baringer) writes: > > > > eshell. > > Not too bad. C-a doesn't make sense, though--it goes to the beginning > of the line, not the beginning of the command-prompt (so the familiar > C-a C-k doesn't work). Maybe I'll take a look at it when I get a > round tuit. my bad, i often forget where the emacs distribution ends and where my .emacs begins. add this to your .emacs: (add-hook 'eshell-mode-hook '(lambda () (local-set-key (kbd "C-a") '(lambda () (interactive) (beginning-of-line) (search-forward-regexp eshell-prompt-regexp))))) or for shell-mode (i haven't tested this as i don't use shell-mode) (add-hook 'shell-mode-hook '(lambda () (local-set-key (kbd "C-a") '(lambda () (interactive) (beginning-of-line) (search-forward-regexp shell-prompt-pattern))))) > -- > Robert Uhl > I won't insult your intelligence by suggesting that you really believe > what you just said. --William F. Buckley, Jr. > -- -Marco Ring the bells that still can ring. Forget the perfect offering. There's a crack in everything. It's how the light gets in. -Isonard Cohen