From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Dan Jacobson Newsgroups: gmane.emacs.bugs Subject: Re: no pangs of guilt that can't turn off M-x shell's ^ ! ? Date: Wed, 19 Mar 2003 14:52:55 +0800 Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87he9zu9tk.fsf@jidanni.org> References: <3E75FA45.2030103@ihs.com> <3E77503D.90302@ihs.com> Reply-To: Dan Jacobson NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1048057296 12744 80.91.224.249 (19 Mar 2003 07:01:36 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 19 Mar 2003 07:01:36 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 19 08:01:35 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18vXZu-0003JQ-00 for ; Wed, 19 Mar 2003 08:01:35 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18vXZW-00072f-03 for gnu-bug-gnu-emacs@m.gmane.org; Wed, 19 Mar 2003 02:01:10 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18vXZG-0006dH-00 for bug-gnu-emacs@gnu.org; Wed, 19 Mar 2003 02:00:54 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18vXZD-0006Yj-00 for bug-gnu-emacs@gnu.org; Wed, 19 Mar 2003 02:00:51 -0500 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18vXYq-00067Y-00 for bug-gnu-emacs@gnu.org; Wed, 19 Mar 2003 02:00:28 -0500 Original-Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18vXYm-0003GT-00 for ; Wed, 19 Mar 2003 08:00:24 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: bug-gnu-emacs@gnu.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18vXXb-0003DA-00 for ; Wed, 19 Mar 2003 07:59:11 +0100 Original-Lines: 32 Original-X-Complaints-To: usenet@main.gmane.org User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:4637 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:4637 >> The shell-mode author thought csh-style ! and ^ history >> substitutions were so great, he forgot to leave a way to turn them off. K> C-h v comint-input-autoexpand K> Does setting that variable to nil in a shell-mod-hook function fix your problem? Hmm, I already had (add-hook 'comint-mode-hook (function (lambda ()(setq comint-input-autoexpand nil)))) ;no more "!" surprizes OK, now I will add (add-hook 'shell-mode-hook (function (lambda ()(setq comint-input-autoexpand nil)))) ;no more "!" surprizes for double protection. Thanks. Blame ----- Blame for my troubles can be conveniently shifted onto the Info page for saying Shell mode can optionally expand history references in the buffer when you send them to the shell. To request this, set the variable `comint-input-autoexpand' to `input'. You can make perform history expansion by binding to the command `comint-magic-space'. It said 'optionally' when indeed it is doing it somewhat already by default. Odd, in the source it says (defcustom comint-input-autoexpand nil But when I do $ LC_ALL=C emacs --no-site-file -q -nw -f shell and check its value, it is 'history. Yes, I wish it was history, as in out of here :-)