From: Chong Yidong <cyd@stupidchicken.com>
To: Leo <sdl.web@gmail.com>
Cc: 5375@debbugs.gnu.org, John Wiegley <johnw@gnu.org>
Subject: bug#5375: 23.1.91; eshell eshell-cmpl-load-hook bug
Date: Sat, 16 Jan 2010 12:46:03 -0500 [thread overview]
Message-ID: <87bpgurlic.fsf@stupidchicken.com> (raw)
In-Reply-To: <xbaivdf33z69.fsf@cam.ac.uk> (Leo's message of "Fri, 15 Jan 2010 20:12:30 +0000")
Leo <sdl.web@gmail.com> 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.
next prev parent reply other threads:[~2010-01-16 17:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-14 2:00 bug#5375: 23.1.91; eshell eshell-cmpl-load-hook bug Leo
2010-01-15 16:42 ` Chong Yidong
2010-01-15 20:12 ` Leo
2010-01-16 17:46 ` Chong Yidong [this message]
2010-01-16 20:04 ` Leo
2010-01-16 21:13 ` Kevin Rodgers
2010-01-17 17:48 ` Leo
2010-01-18 1:13 ` Kevin Rodgers
2010-01-19 17:11 ` Leo
2011-03-05 4:13 ` Glenn Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bpgurlic.fsf@stupidchicken.com \
--to=cyd@stupidchicken.com \
--cc=5375@debbugs.gnu.org \
--cc=johnw@gnu.org \
--cc=sdl.web@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.