From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: C/C++ mode feature I badly want... (non-persistent indentation) Date: Wed, 14 Nov 2012 12:50:48 +0100 Message-ID: <871ufw8ktj.fsf@thinkpad.tsdh.de> References: <1352849552.67331.YahooMailNeo@web121305.mail.ne1.yahoo.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1352893887 16825 80.91.229.3 (14 Nov 2012 11:51:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 Nov 2012 11:51:27 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 14 12:51:37 2012 Return-path: Envelope-to: geh-help-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 1TYbVE-0007Da-3o for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Nov 2012 12:51:32 +0100 Original-Received: from localhost ([::1]:53065 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYbV4-0004wr-GQ for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Nov 2012 06:51:22 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:54242) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYbUt-0004iA-Os for help-gnu-emacs@gnu.org; Wed, 14 Nov 2012 06:51:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TYbUq-0004Cz-MI for help-gnu-emacs@gnu.org; Wed, 14 Nov 2012 06:51:11 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:60247) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYbUq-0004Cp-G3 for help-gnu-emacs@gnu.org; Wed, 14 Nov 2012 06:51:08 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TYbUv-0006xU-LE for help-gnu-emacs@gnu.org; Wed, 14 Nov 2012 12:51:13 +0100 Original-Received: from tsdh.uni-koblenz.de ([141.26.67.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 14 Nov 2012 12:51:13 +0100 Original-Received: from tsdh by tsdh.uni-koblenz.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 14 Nov 2012 12:51:13 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 35 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: tsdh.uni-koblenz.de User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:FARQNRXGalvvCFNuQHNgLpoo9xs= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:87683 Archived-At: Tom writes: > It does not seem too dificult and I imagine lots of people woould find > it useful. It really does seem like a useful idea. It would only be useful if all developers in the project used emacs with non-persistent indentation. Else, the people not using it would still need to reindent the code to make any rhyme of it. And then, of course the repository browsers (ViewCVS/SVN, Github, etc) or more correctly, their source-to-html transformations, should also display this synthetic indentation... IMHO, that sounds like a can of worms. And of course, it wouldn't work for languages where whitespace has semantics like python and haskell. FWIW, org-mode does have some feature like that. You might want to have a look. ,----[ C-h f org-indent-mode RET ] | org-indent-mode is an interactive autoloaded Lisp function in `org-indent.el'. | | (org-indent-mode &optional ARG) | | When active, indent text according to outline structure. | | Internally this works by adding `line-prefix' and `wrap-prefix' | properties, after each buffer modification, on the modified zone. | | The process is synchronous. Though, initial indentation of | buffer, which can take a few seconds on large buffers, is done | during idle time. `---- Bye, Tassilo