From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robert Thorpe Newsgroups: gmane.emacs.help Subject: Re: Counting SLOC in Emacs Date: Tue, 02 Dec 2014 20:43:48 +0000 Message-ID: <87fvcxg4u3.fsf@robertthorpeconsulting.com> References: <871tonjpuw.fsf@wmi.amu.edu.pl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1417553061 25291 80.91.229.3 (2 Dec 2014 20:44:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 2 Dec 2014 20:44:21 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Marcin Borkowski Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 02 21:44:14 2014 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 1XvuIw-0005qr-17 for geh-help-gnu-emacs@m.gmane.org; Tue, 02 Dec 2014 21:44:14 +0100 Original-Received: from localhost ([::1]:38735 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvuIv-0005ad-Lt for geh-help-gnu-emacs@m.gmane.org; Tue, 02 Dec 2014 15:44:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvuIf-0005aO-4K for help-gnu-emacs@gnu.org; Tue, 02 Dec 2014 15:44:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XvuIY-0002f6-9U for help-gnu-emacs@gnu.org; Tue, 02 Dec 2014 15:43:57 -0500 Original-Received: from outbound-smtp01.blacknight.com ([81.17.249.7]:47532) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvuIY-0002ey-3h for help-gnu-emacs@gnu.org; Tue, 02 Dec 2014 15:43:50 -0500 Original-Received: from mail.blacknight.com (pemlinmail03.blacknight.ie [81.17.254.16]) by outbound-smtp01.blacknight.com (Postfix) with ESMTP id 7B6AD98C0E for ; Tue, 2 Dec 2014 20:40:26 +0000 (UTC) Original-Received: (qmail 12567 invoked from network); 2 Dec 2014 20:43:49 -0000 Original-Received: from unknown (HELO RTLaptop) (rt@robertthorpeconsulting.com@[109.76.254.213]) by 81.17.254.9 with ESMTPSA (DHE-RSA-AES128-SHA encrypted, authenticated); 2 Dec 2014 20:43:49 -0000 In-Reply-To: <871tonjpuw.fsf@wmi.amu.edu.pl> (message from Marcin Borkowski on Fri, 28 Nov 2014 17:00:42 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 81.17.249.7 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:101376 Archived-At: Marcin Borkowski writes: >> (* foo bar >> * baz *) >> >> will count as 1 lines, IIUC. And similarly >> >> printf ("toto\n"); (* foo bar >> * baz *) >> >> will count as 2 lines. You might want to try something like: > > Hm. Didn't think of this. (I'm not really accustomed to multi-line > comments, I guess.) I think for practical purposes it's best to use script like David Wheeler's SLOCount called from Emacs. Re-writing it in Elisp is an interesting exercise though. BR, Robert Thorpe