* bug#5375: 23.1.91; eshell eshell-cmpl-load-hook bug
@ 2010-01-14 2:00 Leo
2010-01-15 16:42 ` Chong Yidong
0 siblings, 1 reply; 10+ messages in thread
From: Leo @ 2010-01-14 2:00 UTC (permalink / raw
To: emacs-pretest-bug
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.
BTW, although I've found eshell very powerful and used it daily, sadly
it is also buggy. I have learnt to ignore most of them. For example,
sometimes when I hit TAB the eshell buffer suddenly disappears and the
completion window is shown instead. Sometimes when I use mouse to scroll
down the completion window brought up by eshell, it disappears too.
In GNU Emacs 23.1.91.2 (i386-apple-darwin9.8.0, Carbon Version 1.6.0
AppKit 949.54) of 2010-01-01 on victoria.local Windowing system
distributor `Apple Inc.', version 10.5.8 configured using `configure
'--with-mac' '--prefix=/usr/local/opensource/emacs''
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#5375: 23.1.91; eshell eshell-cmpl-load-hook bug
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
0 siblings, 1 reply; 10+ messages in thread
From: Chong Yidong @ 2010-01-15 16:42 UTC (permalink / raw
To: Leo; +Cc: 5375
> 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?
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#5375: 23.1.91; eshell eshell-cmpl-load-hook bug
2010-01-15 16:42 ` Chong Yidong
@ 2010-01-15 20:12 ` Leo
2010-01-16 17:46 ` Chong Yidong
0 siblings, 1 reply; 10+ messages in thread
From: Leo @ 2010-01-15 20:12 UTC (permalink / raw
To: Chong Yidong; +Cc: 5375
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.
Leo
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#5375: 23.1.91; eshell eshell-cmpl-load-hook bug
2010-01-15 20:12 ` Leo
@ 2010-01-16 17:46 ` Chong Yidong
2010-01-16 20:04 ` Leo
0 siblings, 1 reply; 10+ messages in thread
From: Chong Yidong @ 2010-01-16 17:46 UTC (permalink / raw
To: Leo; +Cc: 5375, John Wiegley
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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#5375: 23.1.91; eshell eshell-cmpl-load-hook bug
2010-01-16 17:46 ` Chong Yidong
@ 2010-01-16 20:04 ` Leo
2010-01-16 21:13 ` Kevin Rodgers
0 siblings, 1 reply; 10+ messages in thread
From: Leo @ 2010-01-16 20:04 UTC (permalink / raw
To: Chong Yidong; +Cc: 5375, John Wiegley
2010/1/16 Chong Yidong <cyd@stupidchicken.com>:
[...]
> 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.
That sounds best for now.
> In the meantime you can work around it by putting (require 'eshell) or
> (require 'em-cmpl) before the call to add-hook.
I included the original value in the add-hook.
Thanks.
Leo
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#5375: 23.1.91; eshell eshell-cmpl-load-hook bug
2010-01-16 20:04 ` Leo
@ 2010-01-16 21:13 ` Kevin Rodgers
2010-01-17 17:48 ` Leo
0 siblings, 1 reply; 10+ messages in thread
From: Kevin Rodgers @ 2010-01-16 21:13 UTC (permalink / raw
To: bug-gnu-emacs
Leo wrote:
> 2010/1/16 Chong Yidong <cyd@stupidchicken.com>:
>> In the meantime you can work around it by putting (require 'eshell) or
>> (require 'em-cmpl) before the call to add-hook.
>
> I included the original value in the add-hook.
Fragile!
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#5375: 23.1.91; eshell eshell-cmpl-load-hook bug
2010-01-16 21:13 ` Kevin Rodgers
@ 2010-01-17 17:48 ` Leo
2010-01-18 1:13 ` Kevin Rodgers
0 siblings, 1 reply; 10+ messages in thread
From: Leo @ 2010-01-17 17:48 UTC (permalink / raw
To: bug-gnu-emacs
On 2010-01-16 21:13 +0000, Kevin Rodgers wrote:
> Leo wrote:
>> 2010/1/16 Chong Yidong <cyd@stupidchicken.com>:
>>> In the meantime you can work around it by putting (require 'eshell) or
>>> (require 'em-cmpl) before the call to add-hook.
>>
>> I included the original value in the add-hook.
>
> Fragile!
How so?
Leo
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#5375: 23.1.91; eshell eshell-cmpl-load-hook bug
2010-01-17 17:48 ` Leo
@ 2010-01-18 1:13 ` Kevin Rodgers
2010-01-19 17:11 ` Leo
0 siblings, 1 reply; 10+ messages in thread
From: Kevin Rodgers @ 2010-01-18 1:13 UTC (permalink / raw
To: bug-gnu-emacs
Leo wrote:
> On 2010-01-16 21:13 +0000, Kevin Rodgers wrote:
>> Leo wrote:
>>> 2010/1/16 Chong Yidong <cyd@stupidchicken.com>:
>>>> In the meantime you can work around it by putting (require 'eshell) or
>>>> (require 'em-cmpl) before the call to add-hook.
>>> I included the original value in the add-hook.
>> Fragile!
It won't work if the original value is changed e.g. in a future release.
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#5375: 23.1.91; eshell eshell-cmpl-load-hook bug
2010-01-18 1:13 ` Kevin Rodgers
@ 2010-01-19 17:11 ` Leo
2011-03-05 4:13 ` Glenn Morris
0 siblings, 1 reply; 10+ messages in thread
From: Leo @ 2010-01-19 17:11 UTC (permalink / raw
To: bug-gnu-emacs
On 2010-01-18 01:13 +0000, Kevin Rodgers wrote:
> Leo wrote:
>> On 2010-01-16 21:13 +0000, Kevin Rodgers wrote:
>>> Leo wrote:
>>>> 2010/1/16 Chong Yidong <cyd@stupidchicken.com>:
>>>>> In the meantime you can work around it by putting (require 'eshell) or
>>>>> (require 'em-cmpl) before the call to add-hook.
>>>> I included the original value in the add-hook.
>>> Fragile!
>
> It won't work if the original value is changed e.g. in a future release.
Indeed. I am only doing it temporarily until the bug is fixed.
Leo
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#5375: 23.1.91; eshell eshell-cmpl-load-hook bug
2010-01-19 17:11 ` Leo
@ 2011-03-05 4:13 ` Glenn Morris
0 siblings, 0 replies; 10+ messages in thread
From: Glenn Morris @ 2011-03-05 4:13 UTC (permalink / raw
To: 5375-done
Version: 24.1
Fixed.
(There are some 20-odd defcustoms of hooks with non-nil default values
elsewhere in the Emacs sources. I haven't checked them yet; some may be
dumped or autoloaded.)
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-03-05 4:13 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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.