From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jack Duthen Newsgroups: gmane.emacs.bugs Subject: bug#11636: 23.1; wrong comment indentation Date: Thu, 7 Jun 2012 11:10:02 +0200 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1339060328 28132 80.91.229.3 (7 Jun 2012 09:12:08 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 7 Jun 2012 09:12:08 +0000 (UTC) Cc: 11636@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 07 11:12:06 2012 Return-path: Envelope-to: geb-bug-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 1ScYl8-0005hB-QB for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Jun 2012 11:12:03 +0200 Original-Received: from localhost ([::1]:41091 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScYl8-0001KD-GA for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Jun 2012 05:12:02 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36047) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScYl0-0001Ig-Ie for bug-gnu-emacs@gnu.org; Thu, 07 Jun 2012 05:12:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ScYkv-0008T3-L3 for bug-gnu-emacs@gnu.org; Thu, 07 Jun 2012 05:11:54 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51690) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScYkv-0008Sz-EM for bug-gnu-emacs@gnu.org; Thu, 07 Jun 2012 05:11:49 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1ScYn4-0000EI-32 for bug-gnu-emacs@gnu.org; Thu, 07 Jun 2012 05:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jack Duthen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Jun 2012 09:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11636 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11636-submit@debbugs.gnu.org id=B11636.1339060384804 (code B ref 11636); Thu, 07 Jun 2012 09:14:02 +0000 Original-Received: (at 11636) by debbugs.gnu.org; 7 Jun 2012 09:13:04 +0000 Original-Received: from localhost ([127.0.0.1]:32998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ScYm7-0000Cu-VB for submit@debbugs.gnu.org; Thu, 07 Jun 2012 05:13:04 -0400 Original-Received: from mail-ob0-f172.google.com ([209.85.214.172]:49161) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ScYln-0000Bp-ON for 11636@debbugs.gnu.org; Thu, 07 Jun 2012 05:13:03 -0400 Original-Received: by obbeh20 with SMTP id eh20so784388obb.3 for <11636@debbugs.gnu.org>; Thu, 07 Jun 2012 02:10:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=LF6nGrApD2nUwSC6GkKmQ3BdfZrjlr88lvaRm8PXKsY=; b=yb66wpEV06mCNvODxzH2k6M7okaEvLpsiraV4MKmnYtYJ1on6F1bTN3KCw0dopHP1G Z4l4QiE7tAaY8jgUVF3VloDVWizPh5B1skqhKNvTEbgC7aCtvAE0Er0RZQhGpgknoE9S Wd7UU4V7HhTYFn5JaYmKOD54mrKeW8rV8U/TufcuPKk8JNhQYtLAc6ga42JvLMD24IzE yi5l+kJTZR8Bd4YGPcL/CXqZzp+Cq+twmkidmZRJAl5uPvAthup+H9NRQLACSwPjIkbC /ZsUij8qHcGY8Q7+/bKNBXTpW2kshLiFCARjPzTrPi+uYSduIKD/oqDRsWxm6RUP0nkZ qAJQ== Original-Received: by 10.60.20.198 with SMTP id p6mr1214489oee.60.1339060223122; Thu, 07 Jun 2012 02:10:23 -0700 (PDT) Original-Received: by 10.182.51.195 with HTTP; Thu, 7 Jun 2012 02:10:02 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: NfaShxBDq-fyRe9iLMVl_Q5cqUc X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:60755 Archived-At: Ok. Many thanks for the explanation. I made a mistake. (I'm sorry about that...) So, I just read carefully the docs to understand what happened. I didn't know `comment-dwim' (maybe it's new since emacs 14...) and believed the action of M-; was just to insert or reindent a comment past the right end of a normal code instruction, but it seems to do much more. The documentation of the function `comment-dwim' itself does not refer to the behaviour of the variable `fill-column', but it refers to the function `comment-indent', whose documentation refers to the variable `comment-column', whose documentation refers to the variable `comment-fill-column', whose documentation refers to the variable `fill-column'. So, yes, the documentation describes clearly (sic!) the behaviour you reminded me in your answer! (I should have RTFM! and apologize!) Nevertheless there is no such reference in the Emacs info: 30.5 Manipulating Comments and its sections (30.5.1 30.5.2 30.5.3): * Comment Commands:: Inserting, killing, and aligning comments. * Multi-Line Comments:: Commands for adding and editing multi-line comments= . * Options for Comments::Customizing the comment features. (though 30.5.2 refers to `auto-fill-mode' (which is not in use in my example)) Also if you lookup-subject-in-emacs-manual or -in-elisp-manual with comment-fill-column, you will find no reference to it. Maybe there should be a word about it in =A730.5.1 or =A730.5.3 ? 2012/6/6 Stefan Monnier : >> =A0 =A0 (jd-re-or "COM_writeLog 1") =A0 =A0 =A0 =A0 ; >> =A0 =A0 (jd-re-paren >> =A0 =A0 =A0"return ") =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ; \2 <= msg> \n "return " >> =A0 =A0 (jd-re-paren "[0-9]")) =A0 =A0 =A0 =A0 =A0 =A0; >> =A0 =A0"COM_log \\3\\2\\3")) > [...] >> Is this a bug? > > I don't think so: > - The second comment is not moved to the same column as the first > =A0because that would push the text past fill-column. =A0If you shorten t= he > =A0second comment or if you increase fill-column, then the 3 comments > =A0will be aligned. > - The first is not moved to the same column as the second because Emacs > =A0doesn't look past a non-commented line. =A0If you add a comment on the > =A0`jd-re-paren' line, then Emacs will look further and will align all > =A04 comments. > > =A0 =A0 =A0 =A0Stefan