From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#16346: 24.3; electric-pair-mode close-paren issue Date: Fri, 10 Jan 2014 09:14:07 -0500 Message-ID: References: <878uuuy7g1.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1389363324 27475 80.91.229.3 (10 Jan 2014 14:15:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 10 Jan 2014 14:15:24 +0000 (UTC) Cc: 16346@debbugs.gnu.org, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= To: Leo Liu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 10 15:15:27 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W1crr-0005Ne-G7 for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 Jan 2014 15:15:23 +0100 Original-Received: from localhost ([::1]:57122 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1crq-00024Z-Sw for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 Jan 2014 09:15:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41228) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1crg-00024T-Ji for bug-gnu-emacs@gnu.org; Fri, 10 Jan 2014 09:15:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W1crX-0002Xo-SW for bug-gnu-emacs@gnu.org; Fri, 10 Jan 2014 09:15:12 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59083) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1crX-0002X3-OY for bug-gnu-emacs@gnu.org; Fri, 10 Jan 2014 09:15:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W1crW-00016k-R2 for bug-gnu-emacs@gnu.org; Fri, 10 Jan 2014 09:15:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Jan 2014 14:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16346 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16346-submit@debbugs.gnu.org id=B16346.13893632514177 (code B ref 16346); Fri, 10 Jan 2014 14:15:02 +0000 Original-Received: (at 16346) by debbugs.gnu.org; 10 Jan 2014 14:14:11 +0000 Original-Received: from localhost ([127.0.0.1]:44869 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W1cqg-00015I-Jo for submit@debbugs.gnu.org; Fri, 10 Jan 2014 09:14:10 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:51156) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W1cqe-00015A-Fl for 16346@debbugs.gnu.org; Fri, 10 Jan 2014 09:14:09 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFxKG9/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDiGGcGYFegxU X-IPAS-Result: Av4EABK/CFFFxKG9/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDiGGcGYFegxU X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="44638875" Original-Received: from 69-196-161-189.dsl.teksavvy.com (HELO pastel.home) ([69.196.161.189]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 10 Jan 2014 09:14:07 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 444916045A; Fri, 10 Jan 2014 09:14:07 -0500 (EST) In-Reply-To: (Leo Liu's message of "Fri, 10 Jan 2014 11:24:24 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:83229 Archived-At: >> 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.