all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Marcin Borkowski <mbork@wmi.amu.edu.pl>
To: Leo Liu <sdl.web@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Counting SLOC in Emacs
Date: Tue, 30 Dec 2014 15:05:03 +0100	[thread overview]
Message-ID: <87oaqlnshc.fsf@wmi.amu.edu.pl> (raw)
In-Reply-To: <87a9354jr9.fsf@gmail.com>


On 2014-12-03, at 02:14, Leo Liu <sdl.web@gmail.com> wrote:

> On 2014-12-02 09:35 -0500, Ted Zlatanov wrote:
>> This is useful.
>>
>> Could we have this added to `count-lines-region' with an optional
>> parameter, or provided by `prog-mode' specifically? It even merits a
>> modeline indicator that users can enable, I think.
>>
>> Ted
>
> I had such need last year but only used it a few days and then totally
> forgotten (never needed again). The code is still here
> https://github.com/leoliu/sloc.el/blob/master/sloc.el

Hi,

I finally had some time to look into the code.  Could you tell me why
this?

      (unless (looking-at-p "^\\s-*$")

(line 46 in sloc.el)?  If I get it correctly, it ignores blank lines
/ending in any number of hyphens/ (possibly zero).  Why?

Also, this

    (let ((beg (min beg end))
          (end (max beg end))

is probably not necessary, or do I miss something?

> Leo

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



  reply	other threads:[~2014-12-30 14:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-28 11:23 Counting SLOC in Emacs Marcin Borkowski
2014-11-28 13:41 ` Marcin Borkowski
2014-11-28 14:04   ` Stefan Monnier
2014-11-28 14:31     ` Marcin Borkowski
2014-11-28 14:49       ` Stefan Monnier
2014-11-28 16:00         ` Marcin Borkowski
2014-11-29  9:46           ` Thien-Thi Nguyen
2014-11-29 11:49             ` Marcin Borkowski
2014-11-29 14:36               ` Grant Rettke
2014-12-02 20:43           ` Robert Thorpe
2014-12-02 22:10             ` Marcin Borkowski
     [not found]       ` <mailman.14877.1417186246.1147.help-gnu-emacs@gnu.org>
2014-12-02 14:35         ` Ted Zlatanov
2014-12-03  1:14           ` Leo Liu
2014-12-30 14:05             ` Marcin Borkowski [this message]
2014-12-31 11:50               ` Leo Liu
2014-12-31 13:25                 ` Marcin Borkowski
2014-11-28 16:46 ` Phillip Lord

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87oaqlnshc.fsf@wmi.amu.edu.pl \
    --to=mbork@wmi.amu.edu.pl \
    --cc=help-gnu-emacs@gnu.org \
    --cc=sdl.web@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.