From unknown Sat Jun 21 12:12:18 2025 X-Loop: don@donarmstrong.com Subject: bug#1286: comment-dwim on a comment line does not toggle comment Reply-To: xah lee , 1286@debbugs.gnu.org Resent-From: xah lee Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 31 Oct 2008 21:35:02 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1286 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122548833621278 (code B ref -1); Fri, 31 Oct 2008 21:35:02 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.3 required=4.0 tests=AWL,BAYES_00, MIME_QP_LONG_LINE,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 31 Oct 2008 21:25:36 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9VLPW5H021272 for ; Fri, 31 Oct 2008 14:25:33 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kw1Uq-0000lI-35 for bug-gnu-emacs@gnu.org; Fri, 31 Oct 2008 17:25:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kw1Un-0000kt-Fm for bug-gnu-emacs@gnu.org; Fri, 31 Oct 2008 17:25:30 -0400 Received: from [199.232.76.173] (port=43676 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kw1Un-0000kq-BR for bug-gnu-emacs@gnu.org; Fri, 31 Oct 2008 17:25:29 -0400 Received: from mout.perfora.net ([74.208.4.194]:59095) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kw1Un-0008Dq-Ku for bug-gnu-emacs@gnu.org; Fri, 31 Oct 2008 17:25:29 -0400 Received: from [192.168.1.2] (c-24-6-185-159.hsd1.ca.comcast.net [24.6.185.159]) by mrelay.perfora.net (node=mrus1) with ESMTP (Nemesis) id 0MKpCa-1Kw1UZ2mna-0007lY; Fri, 31 Oct 2008 17:25:18 -0400 Mime-Version: 1.0 (Apple Message framework v753.1) Content-Transfer-Encoding: quoted-printable Message-Id: Content-Type: text/plain; charset=UTF-8; delsp=yes; format=flowed To: bug-gnu-emacs@gnu.org From: xah lee Date: Fri, 31 Oct 2008 14:25:09 -0700 X-Mailer: Apple Mail (2.753.1) X-Provags-ID: V01U2FsdGVkX1/xHK+J11a5Q/TVM08eVDZCS7VL53nPsxzsASw SWMntW8dkj72uR87WVWTB5x4V9v5RelS9SHA5r5KpphobV28mX Qd+kSKmRlsHbygO25Rskw== X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. this appears to be like a bug. in emacs-lisp-mode, if you have a comment like this: ;; This is a comment and your cursor is somewhere on that line. Now, do comment-dwim, it =20 doesn't uncomment the line. It just moves the cursor to the =E2=80=9CT=E2=80= =9D =20 in =E2=80=9CThis=E2=80=9D. Same behavior in cperl mode and probably all others. I think this might be by design, but it seems counter-intuitive. In GNU Emacs 22.2.1 (powerpc-apple-darwin8.11.0, Carbon Version 1.6.0) of 2008-04-05 on g5.tokyo.stp.isas.jaxa.jp Xah =E2=88=91 http://xahlee.org/ =E2=98=84 From unknown Sat Jun 21 12:12:18 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: don@donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: xah lee Subject: bug#1286 closed by Stefan Monnier (Re: bug#1286: comment-dwim on a comment line does not toggle comment) Message-ID: References: X-Emacs-PR-Message: they-closed 1286 X-Emacs-PR-Package: emacs Reply-To: 1286@debbugs.gnu.org Content-Type: multipart/mixed; boundary="----------=_1225503604-19300-1" This is a multi-part message in MIME format... ------------=_1225503604-19300-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #1286: comment-dwim on a comment line does not toggle comment It has been closed by Stefan Monnier . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Stefan Monnier by replying to this email. --=20 1286: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D1286 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1225503604-19300-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From monnier@iro.umontreal.ca Fri Oct 31 18:33:46 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.4 required=4.0 tests=AWL,BAYES_00,FOURLA, HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1286-done) by emacsbugs.donarmstrong.com; 1 Nov 2008 01:33:47 +0000 Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mA11Xhr0018058 for <1286-done@emacsbugs.donarmstrong.com>; Fri, 31 Oct 2008 18:33:44 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlwFAK1OC0lMCqyo/2dsb2JhbACBdspzg1GBDg X-IronPort-AV: E=Sophos;i="4.33,525,1220241600"; d="scan'208";a="29173534" Received: from 76-10-172-168.dsl.teksavvy.com (HELO pastel.home) ([76.10.172.168]) by ironport2-out.teksavvy.com with ESMTP; 31 Oct 2008 21:33:32 -0400 Received: by pastel.home (Postfix, from userid 20848) id 440C07FF2; Fri, 31 Oct 2008 21:33:32 -0400 (EDT) From: Stefan Monnier To: xah lee Cc: 1286-done@debbugs.gnu.org Subject: Re: bug#1286: comment-dwim on a comment line does not toggle comment Message-ID: References: Date: Fri, 31 Oct 2008 21:33:32 -0400 In-Reply-To: (xah lee's message of "Fri, 31 Oct 2008 14:25:09 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > this appears to be like a bug. > in emacs-lisp-mode, if you have a comment like this: > ;; This is a comment > and your cursor is somewhere on that line. Now, do comment-dwim, it doesn= 't > uncomment the line. It just moves the cursor to the =E2=80=9CT=E2=80=9D = in =E2=80=9CThis=E2=80=9D. > Same behavior in cperl mode and probably all others. > I think this might be by design, but it seems counter-intuitive. This is the way M-; has worked for as long as I can remember. It also re-indents the comment, if needed. If you want to uncomment, then select the line via e.g. C-a C-SPC C-n and then M-; will do what you asked for. Stefan ------------=_1225503604-19300-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From xah@xahlee.org Fri Oct 31 14:25:35 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.3 required=4.0 tests=AWL,BAYES_00, MIME_QP_LONG_LINE,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 31 Oct 2008 21:25:36 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9VLPW5H021272 for ; Fri, 31 Oct 2008 14:25:33 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kw1Uq-0000lI-35 for bug-gnu-emacs@gnu.org; Fri, 31 Oct 2008 17:25:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kw1Un-0000kt-Fm for bug-gnu-emacs@gnu.org; Fri, 31 Oct 2008 17:25:30 -0400 Received: from [199.232.76.173] (port=43676 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kw1Un-0000kq-BR for bug-gnu-emacs@gnu.org; Fri, 31 Oct 2008 17:25:29 -0400 Received: from mout.perfora.net ([74.208.4.194]:59095) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kw1Un-0008Dq-Ku for bug-gnu-emacs@gnu.org; Fri, 31 Oct 2008 17:25:29 -0400 Received: from [192.168.1.2] (c-24-6-185-159.hsd1.ca.comcast.net [24.6.185.159]) by mrelay.perfora.net (node=mrus1) with ESMTP (Nemesis) id 0MKpCa-1Kw1UZ2mna-0007lY; Fri, 31 Oct 2008 17:25:18 -0400 Mime-Version: 1.0 (Apple Message framework v753.1) Content-Transfer-Encoding: quoted-printable Message-Id: Content-Type: text/plain; charset=UTF-8; delsp=yes; format=flowed To: bug-gnu-emacs@gnu.org From: xah lee Subject: comment-dwim on a comment line does not toggle comment Date: Fri, 31 Oct 2008 14:25:09 -0700 X-Mailer: Apple Mail (2.753.1) X-Provags-ID: V01U2FsdGVkX1/xHK+J11a5Q/TVM08eVDZCS7VL53nPsxzsASw SWMntW8dkj72uR87WVWTB5x4V9v5RelS9SHA5r5KpphobV28mX Qd+kSKmRlsHbygO25Rskw== X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. this appears to be like a bug. in emacs-lisp-mode, if you have a comment like this: ;; This is a comment and your cursor is somewhere on that line. Now, do comment-dwim, it =20 doesn't uncomment the line. It just moves the cursor to the =E2=80=9CT=E2=80= =9D =20 in =E2=80=9CThis=E2=80=9D. Same behavior in cperl mode and probably all others. I think this might be by design, but it seems counter-intuitive. In GNU Emacs 22.2.1 (powerpc-apple-darwin8.11.0, Carbon Version 1.6.0) of 2008-04-05 on g5.tokyo.stp.isas.jaxa.jp Xah =E2=88=91 http://xahlee.org/ =E2=98=84 ------------=_1225503604-19300-1-- From unknown Sat Jun 21 12:12:18 2025 X-Loop: don@donarmstrong.com Subject: bug#1286: comment-dwim on a comment line does not toggle comment Reply-To: Xavier Maillard , 1286@debbugs.gnu.org Resent-From: Xavier Maillard Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 03 Nov 2008 11:35:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1286 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 1286-submit@emacsbugs.donarmstrong.com id=B1286.122571167518380 (code B ref 1286); Mon, 03 Nov 2008 11:35:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.4 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1286) by emacsbugs.donarmstrong.com; 3 Nov 2008 11:27:55 +0000 Received: from master.uucpssh.org (master.uucpssh.org [193.218.105.66]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mA3BRoCY018374 for <1286@emacsbugs.donarmstrong.com>; Mon, 3 Nov 2008 03:27:52 -0800 Received: by master.uucpssh.org (Postfix, from userid 10) id 7C467F42DA; Mon, 3 Nov 2008 12:27:35 +0100 (CET) Received: from zogzog.maillard.mobi (IDENT:1000@localhost [127.0.0.1]) by zogzog.maillard.mobi (8.14.2/8.13.8) with ESMTP id mA3BPEx1024508; Mon, 3 Nov 2008 12:25:14 +0100 Received: (from xma@localhost) by zogzog.maillard.mobi (8.14.2/8.13.8/Submit) id mA3BP8eZ024503; Mon, 3 Nov 2008 12:25:08 +0100 Date: Mon, 3 Nov 2008 12:25:08 +0100 Message-Id: <200811031125.mA3BP8eZ024503@zogzog.maillard.mobi> From: Xavier Maillard To: xah lee , 1286@debbugs.gnu.org CC: bug-gnu-emacs@gnu.org, bug-submit-list@donarmstrong.com, bug-gnu-emacs@gnu.org In-reply-to: (message from xah lee on Fri, 31 Oct 2008 14:25:09 -0700) Organization: GNU's Not UNIX! User-Agent: Rmail in GNU Emacs 23.0.60.12 on GNU/Linux Jabber-ID: xma01@jabber.fr References: X-uucpssh: Found to be clean X-uucpssh-SpamCheck: not spam, SpamAssassin (SpamAssassin rebuilding) X-uucpssh-From: xma@gnu.org this appears to be like a bug. in emacs-lisp-mode, if you have a comment like this: ;; This is a comment and your cursor is somewhere on that line. Now, do comment-dwim, it doesn't uncomment the line. It just moves the cursor to the T in This . Same behavior in cperl mode and probably all others. I think this might be by design, but it seems counter-intuitive. I am sure you read it but just in case: comment-dwim is an interactive autoloaded Lisp function in `newcomment.el'. It is bound to M-;. (comment-dwim ARG) Call the comment command you want (Do What I Mean). If the region is active and `transient-mark-mode' is on, call `comment-region' (unless it only consists of comments, in which case it calls `uncomment-region'). Else, if the current line is empty, call `comment-insert-comment-function' if it is defined, otherwise insert a comment and indent it. Else if a prefix ARG is specified, call `comment-kill'. Else, call `comment-indent'. You can configure `comment-style' to change the way regions are commented. For my point of view, this is well defined here and it behaves just as described. Xavier -- http://www.gnu.org http://www.april.org http://www.lolica.org From unknown Sat Jun 21 12:12:18 2025 X-Loop: don@donarmstrong.com Subject: bug#1286: comment-dwim on a comment line does not toggle comment Reply-To: xah lee , 1286@debbugs.gnu.org Resent-From: xah lee Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 03 Nov 2008 21:20:02 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1286 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12257466523300 (code B ref -1); Mon, 03 Nov 2008 21:20:02 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.6 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 3 Nov 2008 21:10:52 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mA3LAniR003293 for ; Mon, 3 Nov 2008 13:10:50 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kx6hE-0008HF-NA for bug-gnu-emacs@gnu.org; Mon, 03 Nov 2008 16:10:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kx6hD-0008H2-AX for bug-gnu-emacs@gnu.org; Mon, 03 Nov 2008 16:10:48 -0500 Received: from [199.232.76.173] (port=33772 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kx6hD-0008Gz-7U for bug-gnu-emacs@gnu.org; Mon, 03 Nov 2008 16:10:47 -0500 Received: from mout.perfora.net ([74.208.4.196]:57889) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kx6hB-0007sz-HR; Mon, 03 Nov 2008 16:10:45 -0500 Received: from [192.168.1.2] (c-24-6-185-159.hsd1.ca.comcast.net [24.6.185.159]) by mrelay.perfora.net (node=mrus0) with ESMTP (Nemesis) id 0MKp8S-1Kx6gp07Pw-0001X7; Mon, 03 Nov 2008 16:10:27 -0500 In-Reply-To: <200811031125.mA3BP8eZ024503@zogzog.maillard.mobi> References: <200811031125.mA3BP8eZ024503@zogzog.maillard.mobi> Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=UTF-8; delsp=yes; format=flowed Message-Id: <244A228E-2192-4165-8495-C760C253DE9E@xahlee.org> Cc: 1286@debbugs.gnu.org, bug-gnu-emacs@gnu.org, bug-submit-list@donarmstrong.com Content-Transfer-Encoding: quoted-printable From: xah lee Date: Mon, 3 Nov 2008 13:10:24 -0800 To: Xavier Maillard X-Mailer: Apple Mail (2.753.1) X-Provags-ID: V01U2FsdGVkX19NXsP9pDy/SMDmi/n+hKbFywTszQF4LC/jR1i K+TnwMj6vpn/Rm04RMFa2hHphw0ph88zK8C1cQBWydUsu0/dFL n7+xwyrjqy9ineTPr5DJQ== X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-CrossAssassin-Score: 2 Xavier Maillard wrote: =C2=ABFor my point of view, this is well defined here and it behaves = just =20 as described.=C2=BB I agree it's well defined and documented. However, i think it is not =20 intuitive, even people who have used emacs for 3 or more years and =20 are familiar with its terminologies and behaviors. when a cursor is on a comment line (whole line is comment) and =20 there's no active region, i don't see any reason it shouldn't just =20 uncomment the line when calling comment-dwim. I would say that, any =20 person, including those using emacs for 3 or more years, who are =20 using comment-dwim for the first time, would expect it to uncomment it. is there a reason why it shouldn't uncomment other than =E2=80=9Cit's = that =20 way for long=E2=80=9D? PS I only started to use comment-dwim in this or last year. In the =20 past, i've always used string-rectangle and kill-rectangle. I started =20= to use emacs daily in a day job since 1998, and for the first 7 years =20= i use it exclusively in terminals. Xah =E2=88=91 http://xahlee.org/ =E2=98=84 ---------------------------------- On Nov 3, 2008, at 3:25 AM, Xavier Maillard wrote: this appears to be like a bug. in emacs-lisp-mode, if you have a comment like this: ;; This is a comment and your cursor is somewhere on that line. Now, do comment-dwim, it doesn't uncomment the line. It just moves the cursor to the T in This . Same behavior in cperl mode and probably all others. I think this might be by design, but it seems counter-intuitive. I am sure you read it but just in case: comment-dwim is an interactive autoloaded Lisp function in `newcomment.el'. It is bound to M-;. (comment-dwim ARG) Call the comment command you want (Do What I Mean). If the region is active and `transient-mark-mode' is on, call `comment-region' (unless it only consists of comments, in which case it calls `uncomment-region'). Else, if the current line is empty, call `comment-insert-comment-=20 function' if it is defined, otherwise insert a comment and indent it. Else if a prefix ARG is specified, call `comment-kill'. Else, call `comment-indent'. You can configure `comment-style' to change the way regions are =20 commented. For my point of view, this is well defined here and it behaves just as described. ----------------------- From unknown Sat Jun 21 12:12:18 2025 X-Loop: don@donarmstrong.com Subject: bug#1286: comment-dwim on a comment line does not toggle comment Reply-To: Stefan Monnier , 1286@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 04 Nov 2008 16:40:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1286 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12258164922441 (code B ref -1); Tue, 04 Nov 2008 16:40:04 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.5 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 4 Nov 2008 16:34:52 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mA4GYnvr002435 for ; Tue, 4 Nov 2008 08:34:50 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KxOrg-00008i-UD for bug-gnu-emacs@gnu.org; Tue, 04 Nov 2008 11:34:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KxOrf-00008N-GF for bug-gnu-emacs@gnu.org; Tue, 04 Nov 2008 11:34:48 -0500 Received: from [199.232.76.173] (port=48570 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KxOrf-00008K-Ak for bug-gnu-emacs@gnu.org; Tue, 04 Nov 2008 11:34:47 -0500 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:47565) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KxOre-0003lW-BL; Tue, 04 Nov 2008 11:34:46 -0500 Received: from alfajor.home (vpn-132-204-232-40.acd.umontreal.ca [132.204.232.40]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id mA4GZ7hI003160; Tue, 4 Nov 2008 11:35:09 -0500 Received: by alfajor.home (Postfix, from userid 20848) id 264041C44D; Tue, 4 Nov 2008 11:34:33 -0500 (EST) From: Stefan Monnier To: xah lee Cc: 1286@debbugs.gnu.org, Xavier Maillard , bug-gnu-emacs@gnu.org, bug-submit-list@donarmstrong.com Message-ID: References: <200811031125.mA3BP8eZ024503@zogzog.maillard.mobi> <244A228E-2192-4165-8495-C760C253DE9E@xahlee.org> Date: Tue, 04 Nov 2008 11:34:33 -0500 In-Reply-To: <244A228E-2192-4165-8495-C760C253DE9E@xahlee.org> (xah lee's message of "Mon, 3 Nov 2008 13:10:24 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3139=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-CrossAssassin-Score: 2 > when a cursor is on a comment line (whole line is comment) and there's no > active region, i don't see any reason it shouldn't just uncomment the line > when calling comment-dwim. I would say that, any person, including those I, on the other hand, don't see why it should do that. What would be the logic behind it? And according to that logic what should it do if the line contains a comment as well as some code? As explained, the M-; behavior you're seeing has been with us for many many years, so there needs to be a good reason for the change (and the previous behavior of inserting a comment marker and/or reindenting a preexisting comment marker, should still be available somewhere). Stefan From unknown Sat Jun 21 12:12:18 2025 X-Loop: don@donarmstrong.com Subject: bug#1286: comment-dwim on a comment line does not toggle comment Reply-To: Xavier Maillard , 1286@debbugs.gnu.org Resent-From: Xavier Maillard Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 06 Nov 2008 06:35:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1286 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122595294416110 (code B ref -1); Thu, 06 Nov 2008 06:35:04 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-9.5 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 6 Nov 2008 06:29:04 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mA66T0vs016090 for ; Wed, 5 Nov 2008 22:29:01 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KxyMV-0008Se-U4 for bug-gnu-emacs@gnu.org; Thu, 06 Nov 2008 01:29:00 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KxyMU-0008Rc-01 for bug-gnu-emacs@gnu.org; Thu, 06 Nov 2008 01:28:59 -0500 Received: from [199.232.76.173] (port=47353 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KxyMT-0008RQ-HV for bug-gnu-emacs@gnu.org; Thu, 06 Nov 2008 01:28:57 -0500 Received: from master.uucpssh.org ([193.218.105.66]:38707) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KxyMT-0001pD-GT for bug-gnu-emacs@gnu.org; Thu, 06 Nov 2008 01:28:57 -0500 Received: by master.uucpssh.org (Postfix, from userid 10) id E6A7DF3467; Thu, 6 Nov 2008 07:27:34 +0100 (CET) Received: from zogzog.maillard.mobi (IDENT:1000@localhost [127.0.0.1]) by zogzog.maillard.mobi (8.14.2/8.13.8) with ESMTP id mA57P4bw028078; Wed, 5 Nov 2008 08:25:04 +0100 Received: (from xma@localhost) by zogzog.maillard.mobi (8.14.2/8.13.8/Submit) id mA57P3dM028074; Wed, 5 Nov 2008 08:25:03 +0100 Date: Wed, 5 Nov 2008 08:25:03 +0100 Message-Id: <200811050725.mA57P3dM028074@zogzog.maillard.mobi> From: Xavier Maillard To: xah lee CC: 1286@debbugs.gnu.org, bug-gnu-emacs@gnu.org, bug-submit-list@donarmstrong.com In-reply-to: <244A228E-2192-4165-8495-C760C253DE9E@xahlee.org> (message from xah lee on Mon, 3 Nov 2008 13:10:24 -0800) Organization: GNU's Not UNIX! User-Agent: Rmail in GNU Emacs 23.0.60.12 on GNU/Linux Jabber-ID: xma01@jabber.fr References: <200811031125.mA3BP8eZ024503@zogzog.maillard.mobi> <244A228E-2192-4165-8495-C760C253DE9E@xahlee.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 X-uucpssh: Found to be clean X-uucpssh-SpamCheck: not spam, SpamAssassin (not cached, score=-4.345, required 4.6, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.06, BAYES_00 -2.60, SPF_HELO_PASS -0.00) X-uucpssh-From: xma@gnu.org Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Xavier Maillard wrote: =ABFor my point of view, this is well defined here and it behaves just= =20 as described.=BB I agree it's well defined and documented. However, i think it is not =20 intuitive, even people who have used emacs for 3 or more years and =20 are familiar with its terminologies and behaviors. when a cursor is on a comment line (whole line is comment) and =20 there's no active region, i don't see any reason it shouldn't just =20 uncomment the line when calling comment-dwim. I would say that, any =20 person, including those using emacs for 3 or more years, who are =20 using comment-dwim for the first time, would expect it to uncomment it= . Speaking for myself, as a more-than-3-years emacs user, I do not see why it should uncomment anything here. I am used to activate a commented region and then M-; to uncomment it. M-; has always done the right thing: comment and indent. Dunno what other people think about that though. Xavier --=20 http://www.gnu.org http://www.april.org http://www.lolica.org