From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sebastian Rose Newsgroups: gmane.emacs.devel,gmane.emacs.help Subject: Re: auto-indent in emacs Date: Mon, 30 Nov 2009 17:48:43 +0100 Message-ID: <87eingm00k.fsf@gmx.de> References: <6bd43112-0ffd-482a-be72-0cbb579ed1b8@o13g2000vbl.googlegroups.com> <87tywc9gpi.fsf@ergodik.univ-brest.fr> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1259601227 6910 80.91.229.12 (30 Nov 2009 17:13:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Nov 2009 17:13:47 +0000 (UTC) Cc: emacs help , harven , Emacs-Devel devel To: Lennart Borgman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 30 18:13:39 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NF9og-0008Gc-Kq for ged-emacs-devel@m.gmane.org; Mon, 30 Nov 2009 18:13:38 +0100 Original-Received: from localhost ([127.0.0.1]:44954 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NF9of-0003hK-St for ged-emacs-devel@m.gmane.org; Mon, 30 Nov 2009 12:13:37 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NF9R7-0000Eg-JH for emacs-devel@gnu.org; Mon, 30 Nov 2009 11:49:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NF9R1-0000CJ-0R for emacs-devel@gnu.org; Mon, 30 Nov 2009 11:49:15 -0500 Original-Received: from [199.232.76.173] (port=58735 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NF9Qz-0000C8-Pi for emacs-devel@gnu.org; Mon, 30 Nov 2009 11:49:09 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]:49131) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1NF9Qy-0007af-Th for emacs-devel@gnu.org; Mon, 30 Nov 2009 11:49:09 -0500 Original-Received: (qmail invoked by alias); 30 Nov 2009 16:49:04 -0000 Original-Received: from unknown (EHLO beteigeuze.gmx.de) [188.46.195.75] by mail.gmx.net (mp072) with SMTP; 30 Nov 2009 17:49:04 +0100 X-Authenticated: #8529601 X-Provags-ID: V01U2FsdGVkX19kv5MeXyVkPzcMsbPVI+U5u67VRTHwmqOVgRGKWb J/T1aha3QA3t4N In-Reply-To: (Lennart Borgman's message of "Mon, 30 Nov 2009 16:58:35 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.54 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:117974 gmane.emacs.help:70263 Archived-At: Lennart Borgman writes: > On Mon, Nov 30, 2009 at 4:26 PM, harven wrote: >> Kenneth Brun Nielsen writes: >> >>> I want to auto-indent a section (actually a whole file) in Emacs. >>> >>> I googled, that the shortcut C-M-\ ("CTRL+ALT+backspace") does the >>> job, but since I have a danish keyboard, where "backspace" requires me >>> to push the META-button "Alt Gr", it seems I'm not able to push this >>> combination. >>> >>> Any suggestions for another way to auto-indent? C-x h M-x indent-region RET I have bound `indent-region' to . >>> Best regards, >>> Kenneth >> >> C-M-\ runs the command indent-region (check it by typing C-h k C-M-\). >> So bind that command to another shortcut. For example, to bind it to C-c i >> put the following line in your .emacs >> >> (global-set-key (kbd "C-c i") 'indent-region) > > > Please see also the page http://www.emacswiki.org/emacs/AltGrKey for > how to type C-M-\. All those commands are unusable anyway for they're to difficult to type. But four of those come with easier to type alternatives, which are not mentioned there. Why? C-M-@ => C-M-SPC C-@ => C-SPC C-x C-@ => C-x C-SPC C-x r C-@ => C-x r SPC Only backslash commands might be problem. They are not on none of my (German) keyboards. I guess it's a problem of the underlying system (Windows I guess). How about filing a bug report there? Those commands are: `indent-region' has to be rebound ( here). `set-input-method' `abort-recursive-edit' I think http://www.emacswiki.org/emacs/AltGrKey is obsolete and should be fixed. Sebastian