Subject: bug#16346: 24.3; electric-pair-mode close-paren issue

From: Stefan Monnier <[email-masked]>
Date: Fri, 10 Jan 2014 09:14:07 -0500

>> But you can get the same result with suitable use of eldoc-remove-command.
> But in case of a read-only buffer, one may want the normal eldoc to show
> arglist.  So there is two use cases: one when editing and the other when
> reading others code.  I only enable eldoc-mode manually i.e. M-x
> eldoc-mode when I need it.

So you want an eldoc-subdued-mode which only gives you info in some very
restricted cases (e.g. self-insert-command) and which you can
dynamically enable/disable in specific buffers.

Making eldoc-message-commands buffer-local would let us do that fairly easily.

> But then when you go anywhere that you don't want to edit code (such as
> just to copy some text) eldoc also prints the arglist.

Right.  And it doesn't bother me because if I don't want to see the
eldoc info, I just don't look at the echo area.

> The latter happens more often in my editing habit that it can
> be annoying.

We obviously have different tastes/habits ;-)

> But maybe eldoc-post-insert-mode (maybe even a new name
> eldoc-edit-mode?) can check on char changes instead?

I don't understand what you mean by "char changes".
Ah, you mean using an after-change-function?  I don't really like that.
I'm not sure what problem it is supposed to avoid.

>>> Also getting the arglist can be expensive. For example in octave it has
>>> to ask the running process (which can get stuck when the process is in
>>> the middle of doing something else). In other cases it has to make
>>> remote calls.
>> Not sure why that's relevant.
> For example, if a heavy job is running in the inferior octave buffer,
> one normally don't want any movement to send a request to it asking for
> arglist.

But neither do you want to send such a request just because you inserted
a char.  So, the problem really applies to bother cases.  I find it hard
to believe that the problem would really be much more serious in one
case then in the other: either it's serious in both cases, or it's
bearable in both cases.

        Stefan

PS: I think some version of eldoc-mode should be enabled by default.
It's too late for 24.4, but: for the one after.