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: Re: comment-kill can't deal with following situation Date: Mon, 03 Mar 2008 09:10:16 -0500 Message-ID: References: <198A33EB1E9E344EBC566802C7761D6B4ACE3C@CNSHGSMBS04.ad4.ad.alcatel.com> <86tzjsqb47.fsf@163.com> <86hcfps0c2.fsf@163.com> <86fxv8ui7m.fsf@163.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204553463 1376 80.91.229.12 (3 Mar 2008 14:11:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 3 Mar 2008 14:11:03 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: lgfang Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 03 15:11:20 2008 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 1JWBNa-0007GA-AH for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Mar 2008 15:10:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JWBN3-0004Ma-8f for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Mar 2008 09:10:25 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JWBMx-0004LU-Qe for bug-gnu-emacs@gnu.org; Mon, 03 Mar 2008 09:10:19 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JWBMv-0004KX-Mc for bug-gnu-emacs@gnu.org; Mon, 03 Mar 2008 09:10:18 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JWBMv-0004KU-Ga for bug-gnu-emacs@gnu.org; Mon, 03 Mar 2008 09:10:17 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JWBMv-0000Sa-7O for bug-gnu-emacs@gnu.org; Mon, 03 Mar 2008 09:10:17 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAMKVy0fO+LKX/2dsb2JhbACsOIEA X-IronPort-AV: E=Sophos;i="4.25,438,1199682000"; d="scan'208";a="15488026" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 03 Mar 2008 09:10:16 -0500 Original-Received: from pastel.home ([206.248.178.151]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id JRN21916; Mon, 03 Mar 2008 09:10:16 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 857608279; Mon, 3 Mar 2008 09:10:16 -0500 (EST) In-Reply-To: <86fxv8ui7m.fsf@163.com> (lgfang's message of "Mon, 03 Mar 2008 20:04:29 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:17643 Archived-At: Stefan> Here I disagree. I find it more useful to only kill one Stefan> comment at a time (you can always choose to run the Stefan> command 2 times, but you cannot run it 1/2 a time). Also > I agree with you. I didn't think of that. So, it is not a bug. I > just misunderstood the document. Glad we agree. I'll improve the docstring to remove this ambiguity. > In case you are interested, I'm NOT calling comment-kill > interactively. I wrote a elisp script to count NCSL. The basic idea > is to delete all comment lines using comment-kill and delete all blank > lines using flush-lines. Then, the number of lines is just the number > of NCSL. I see. I guess what we be better is to change `comment-kill' (when called with an argument) such that it kills all the comments on the N following lines. Better yet: let it take a region as argument. Stefan