From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#5375: 23.1.91; eshell eshell-cmpl-load-hook bug Date: Sat, 16 Jan 2010 12:46:03 -0500 Message-ID: <87bpgurlic.fsf@stupidchicken.com> References: <87eilrjp4i.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1263665374 20696 80.91.229.12 (16 Jan 2010 18:09:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 16 Jan 2010 18:09:34 +0000 (UTC) Cc: 5375@debbugs.gnu.org, John Wiegley To: Leo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 16 19:09:25 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NWD5Q-0002eN-L6 for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Jan 2010 19:09:24 +0100 Original-Received: from localhost ([127.0.0.1]:52149 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NWD5R-00026R-9P for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Jan 2010 13:09:25 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NWD5M-00024q-Bc for bug-gnu-emacs@gnu.org; Sat, 16 Jan 2010 13:09:20 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NWD5H-00021T-Qn for bug-gnu-emacs@gnu.org; Sat, 16 Jan 2010 13:09:20 -0500 Original-Received: from [199.232.76.173] (port=44525 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NWD5H-00021Q-KO for bug-gnu-emacs@gnu.org; Sat, 16 Jan 2010 13:09:15 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41675) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NWD5H-0005dR-9n for bug-gnu-emacs@gnu.org; Sat, 16 Jan 2010 13:09:15 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NWCjl-0006UO-Vj; Sat, 16 Jan 2010 12:47:01 -0500 X-Loop: bug-gnu-emacs@gnu.org Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Jan 2010 17:47:01 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5375 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 5375-submit@debbugs.gnu.org id=B5375.126366397124914 (code B ref 5375); Sat, 16 Jan 2010 17:47:01 +0000 Original-Received: (at 5375) by debbugs.gnu.org; 16 Jan 2010 17:46:11 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWCix-0006Tn-4i for submit@debbugs.gnu.org; Sat, 16 Jan 2010 12:46:11 -0500 Original-Received: from pantheon-po29.its.yale.edu ([130.132.50.124]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWCiv-0006Ta-Hq for 5375@debbugs.gnu.org; Sat, 16 Jan 2010 12:46:09 -0500 Original-Received: from furry (173-14-147-246-NewEngland.hfc.comcastbusiness.net [173.14.147.246]) (authenticated bits=0) by pantheon-po29.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o0GHk4MI012491 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 16 Jan 2010 12:46:05 -0500 Original-Received: by furry (Postfix, from userid 1000) id A8DF2C05D; Sat, 16 Jan 2010 10:46:03 -0700 (MST) In-Reply-To: (Leo's message of "Fri, 15 Jan 2010 20:12:30 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -5.4 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list X-Spam-Score: -5.5 (-----) Resent-Date: Sat, 16 Jan 2010 12:47:01 -0500 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:34389 Archived-At: Leo writes: > On 2010-01-15 16:42 +0000, Chong Yidong wrote: >>> The definition of eshell-cmpl-load-hook includes eshell-cmpl-initialize, >>> which is ignored if user has something like: >>> >> >>> (add-hook 'eshell-cmpl-load-hook ...) in their .emacs. >>> >>> And without eshell-cmpl-initialize, TAB in eshell inserts the TAB char >>> instead of completing commands, rendering the shell broken. >>> >>> I think this is a bug. If eshell-cmpl-initialize must be called, please >>> move it to the right place. It seems to me it is unsafe putting it in >>> eshell-cmpl-load-hook. >> >> Hmm, I'm afraid I don't know what you're talking about. Could you try >> to explain the problem more precisely, e.g. with a test case? > > 1. Emacs -q > 2. Eval: > (add-hook 'eshell-cmpl-load-hook > (lambda () > (add-to-list 'eshell-command-completions-alist ("LaTeX" . "\\.TeX\\'")))) > 3. M-x eshell > 4. Type TAB to see what it does. Thanks, I understand the problem now. Normally, we give hooks a nil default value for this exact reason, but unfortunately eshell doesn't seem to follow the convention. Apart from eshell-cmpl-load-hook, there are lots of other such hooks in eshell that have a default value. I'm not sure it's good to fix this right now---maybe post-23.2 would be better. In the meantime you can work around it by putting (require 'eshell) or (require 'em-cmpl) before the call to add-hook.