From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: 7115@debbugs.gnu.org
Subject: bug#7115: 23.1; count-lines
Date: Mon, 27 Sep 2010 13:15:46 +0200 [thread overview]
Message-ID: <4CA07CE2.7090401@easy-emacs.de> (raw)
Hi,
`count-lines' returns different values
if cursor is at the bol or not.
The bug is reffered to in the docu already,
"...but can be one more if START is not equal to END
and the greater of them is not at the start of a line."
Looks like a doku bug too: if start is equal to end,
which lines are to count?
IMHO there is no need for these bugs.
Also `count-lines' should have a default value for it's
arguments,
(point-min) (point) for example.
What about to implement it simply
(1+ (count-matches "[\n\C-m]" start end))
Thanks
Andreas
GNU Emacs 23.1.1 (i586-suse-linux-gnu, GTK+ Version 2.20.1) of 2010-07-05
--
https://code.launchpad.net/~a-roehler/python-mode
https://code.launchpad.net/s-x-emacs-werkstatt/
next reply other threads:[~2010-09-27 11:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-27 11:15 Andreas Röhler [this message]
2010-09-27 17:24 ` bug#7115: 23.1; count-lines Andreas Schwab
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=4CA07CE2.7090401@easy-emacs.de \
--to=andreas.roehler@easy-emacs.de \
--cc=7115@debbugs.gnu.org \
/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.