From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.help Subject: Re: In "C" mode, how do I turn off electric mode? Date: Sat, 24 Nov 2007 21:18:19 +0000 Message-ID: <20071124211819.GA6151@muc.de> References: <47486275.1090006@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1195938712 21155 80.91.229.12 (24 Nov 2007 21:11:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 Nov 2007 21:11:52 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Bruce Korb Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Nov 24 22:11:58 2007 Return-path: Envelope-to: geh-help-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 1Iw2IA-0007ZR-Gv for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Nov 2007 22:11:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iw2Hv-0006jm-S1 for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Nov 2007 16:11:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Iw2Hd-0006hr-W9 for help-gnu-emacs@gnu.org; Sat, 24 Nov 2007 16:11:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Iw2Hd-0006ha-Jf for help-gnu-emacs@gnu.org; Sat, 24 Nov 2007 16:11:25 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iw2Hd-0006hT-9f for help-gnu-emacs@gnu.org; Sat, 24 Nov 2007 16:11:25 -0500 Original-Received: from colin.muc.de ([193.149.48.1] helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Iw2Hc-0001cy-D6 for help-gnu-emacs@gnu.org; Sat, 24 Nov 2007 16:11:24 -0500 Original-Received: (qmail 38670 invoked by uid 3782); 24 Nov 2007 21:11:19 -0000 Original-Received: from acm.muc.de (p57B1DFF0.dip.t-dialin.net [87.177.223.240]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Sat, 24 Nov 2007 22:11:17 +0100 Original-Received: (qmail 6600 invoked by uid 1000); 24 Nov 2007 21:18:19 -0000 Content-Disposition: inline In-Reply-To: <47486275.1090006@gmail.com> User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.6-4.9 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:49485 Archived-At: Hi, Bruce! On Sat, Nov 24, 2007 at 09:42:13AM -0800, Bruce Korb wrote: > c-toggle-electric-state does not seem to do the trick. I try to put > text into a comment, and the electric mode is so helpful, it is > impossible to do it, except by using text mode in another buffer and > pasting it into my C code. OK, calm down please! We'll get your CC Mode working reasonably for you, don't worry! All "helpful" features in CC Mode can be turned off. Have you got the latest version of Emacs/CC Mode? If you do M-x c-version, you should hopefully get 5.31.n, where n is probably 4. If not, you might want to upgrade your Emacs. And just to make sure we're speaking the same language: "electric mode" in CC Mode means things like your code being automatically re-indented when you type a semicolon or brace. You can toggle this with C-c C-l. See the page "Getting Started" in the CC Mode manual if you want to disable it more permanently. The page "Electric Keys" gives a complete run down of the electric mode. > What is going on? What are the emacs developers thinking? > STOP BEING SO HELPFUL. Hey, I don't think you mean that! I'm being as helpful as I can, right now. ;-) > IT IS NOT HELPFUL. I JUST WANT TO EDIT MY TEXT. SOME ASSISTS ARE NICE > BUT THIS IS WAY OVER THE LINE. ARGHHHH!!!!!!!!!!! Really, these things _are_ helpful. Honest! The problem is that you don't feel in control of what Emacs is doing. So the way to go is to disable the particular features which are biting, and once you feel like you've got control back again, you can then start experimenting with them slowly, if you want. You might even like them if they're not being forced on you. We need to identify these features. You've said: > I try to put text into a comment, and the electric mode is so helpful, > it is impossible to do it, except by using text mode in another buffer > and pasting it into my C code. Could you please give as a keystroke-by-keystroke description of what you're doing and what you see: o - Is it an existing comment or a new one? o - If it's new, how did you create it? o - How are you putting the text into the comment? Typing a character at a time, or with C-y, or how? o - What happens, and what do you want to happen instead? Have you configured any CC Mode stuff in your .emacs? If so, would you post the relevant bits here, please. -- Alan Mackenzie (Ittersbach, Germany).