From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel,gmane.emacs.help Subject: Re: auto-indent in emacs Date: Mon, 30 Nov 2009 09:26:00 -0800 (PST) Message-ID: <200911301726.nAUHQ0nf014925@godzilla.ics.uci.edu> References: <6bd43112-0ffd-482a-be72-0cbb579ed1b8@o13g2000vbl.googlegroups.com> <87tywc9gpi.fsf@ergodik.univ-brest.fr> <87eingm00k.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1259606177 24664 80.91.229.12 (30 Nov 2009 18:36:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Nov 2009 18:36:17 +0000 (UTC) Cc: emacs help , Lennart Borgman , harven , Emacs-Devel devel To: Sebastian Rose Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 30 19:36:09 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 1NFB6J-0007cu-Pf for ged-emacs-devel@m.gmane.org; Mon, 30 Nov 2009 19:36:09 +0100 Original-Received: from localhost ([127.0.0.1]:43947 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFB6G-0004wI-PR for ged-emacs-devel@m.gmane.org; Mon, 30 Nov 2009 13:35:52 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NFA3r-00056v-0c for emacs-devel@gnu.org; Mon, 30 Nov 2009 12:29:19 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NFA3m-00051S-6N for emacs-devel@gnu.org; Mon, 30 Nov 2009 12:29:18 -0500 Original-Received: from [199.232.76.173] (port=36118 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFA3m-00051J-0H; Mon, 30 Nov 2009 12:29:14 -0500 Original-Received: from paul-mcgann-v0.ics.uci.edu ([128.195.1.147]:56521) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NFA3l-0004Ri-83; Mon, 30 Nov 2009 12:29:13 -0500 Original-Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by paul-mcgann-v0.ics.uci.edu (8.13.8/8.13.8) with ESMTP id nAUHQ0tH015467 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 30 Nov 2009 09:26:00 -0800 Original-Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id nAUHQ0nf014925; Mon, 30 Nov 2009 09:26:00 -0800 (PST) In-Reply-To: <87eingm00k.fsf@gmx.de> (Sebastian Rose's message of "Mon, 30 Nov 2009 17:48:43 +0100") Original-Lines: 69 X-ICS-MailScanner-Information: Please send mail to helpdesk@ics.uci.edu or more information X-ICS-MailScanner-ID: nAUHQ0tH015467 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-0.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44, dmtrx141 1.00) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:117976 gmane.emacs.help:70267 Archived-At: Sebastian Rose writes: > 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). Why? TAB does `indent-region' just fine > `set-input-method' > `abort-recursive-edit' > > > > > I think http://www.emacswiki.org/emacs/AltGrKey is obsolete and should > be fixed. > > > > Sebastian