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#3370: 23.0.94; `comment-region' indents comment chars inappropriately Date: Mon, 25 May 2009 17:22:02 -0400 Message-ID: References: <87prdynkm5.fsf@cyd.mit.edu> <87tz3admt1.fsf@cyd.mit.edu> <4A19F427.40606@gnu.org> <874ov9aivv.fsf@cyd.mit.edu> <460B8A8EC0204F4A830B9EC10995A169@us.oracle.com> <2425239E1D3C418886AD82BF7680D4BF@us.oracle.com> Reply-To: Stefan Monnier , 3370@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1243294189 26717 80.91.229.12 (25 May 2009 23:29:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 May 2009 23:29:49 +0000 (UTC) Cc: 'Dan Nicolaescu' , 'Chong Yidong' , rms@gnu.org, 3370@emacsbugs.donarmstrong.com To: "Drew Adams" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 26 01:29:41 2009 Return-path: Envelope-to: geb-bug-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 1M8jbv-0003fo-15 for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 May 2009 01:29:39 +0200 Original-Received: from localhost ([127.0.0.1]:39567 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M8jbu-0006h1-Ba for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 May 2009 19:29:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M8jbd-0006ZC-U6 for bug-gnu-emacs@gnu.org; Mon, 25 May 2009 19:29:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M8jbY-0006Xv-Ot for bug-gnu-emacs@gnu.org; Mon, 25 May 2009 19:29:20 -0400 Original-Received: from [199.232.76.173] (port=52437 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M8jbY-0006Xs-Gs for bug-gnu-emacs@gnu.org; Mon, 25 May 2009 19:29:16 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:38124) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M8jbX-00032L-Nf for bug-gnu-emacs@gnu.org; Mon, 25 May 2009 19:29:16 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n4PNTBmm000860; Mon, 25 May 2009 16:29:13 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n4PNA6os030355; Mon, 25 May 2009 16:10:06 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 25 May 2009 23:10:06 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3370 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3370-submit@emacsbugs.donarmstrong.com id=B3370.124329256628649 (code B ref 3370); Mon, 25 May 2009 23:10:06 +0000 Original-Received: (at 3370) by emacsbugs.donarmstrong.com; 25 May 2009 23:02:46 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from pruche.dit.umontreal.ca (pruche.dit.umontreal.ca [132.204.246.22]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n4PN2eI0028644 for <3370@emacsbugs.donarmstrong.com>; Mon, 25 May 2009 16:02:42 -0700 Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id n4PLM4tZ028523; Mon, 25 May 2009 17:22:04 -0400 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 6AF9A3A07A; Mon, 25 May 2009 17:22:02 -0400 (EDT) In-Reply-To: <2425239E1D3C418886AD82BF7680D4BF@us.oracle.com> (Drew Adams's message of "Mon, 25 May 2009 10:42:05 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.93 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3282=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Mon, 25 May 2009 19:29:20 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:28167 Archived-At: >> Emacs put the comment-starters at column-0 because that code >> was written a looooonnng time ago and keeping things simple >> was more important than now. > Emacs Lisp files still use ;; in column 0 in file headers, > AFAICT. What column would you prefer to indent them to? If you use comment-region in such places, the result should also be at column-0, AFAIK. > That is exactly the use case here: commenting a line that will be in a file > header. There is nothing in the surrounding code that would indicate an > indentation level (other than 0 indent). Then I misunderstood your use case. Please give a recipe. Normally, code at top-level should have some part of it in column-0, so the resulting commented-out version should also be placed at column-0. >> Emacs-21's default (as well as 22) was set to `plain' because Richard >> always puts such comments at column-0 (the `plain' setting >> had actually to be added specifically for this). > Well I don't always put "such comments" (depending on what you mean by > that) at column 0. I put `;;' comments where Emacs has always put > them: at the same level of indentation that TAB puts code. Good. > This is about commenting out a region, however, not about inserting > a comment at the current indentation level. Yes, I know that. > Commenting out this line: > `abcdef' > gives this, prior to Emacs 23: > ;; `abcdef' > Commenting out the line is different from inserting a comment at the > same level: > ;; > `abcdef' I know. Yet, most cases of commented-out code would use ;; `abcdef' Obviously, you don't like it, just like Richard doesn't like it. I do believe you're in the minority, tho. Stefan