From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: Sebastien Chapuis <sebastien@chapu.is>
Cc: 30834@debbugs.gnu.org
Subject: bug#30834: 27.0.50; posn-at-point and display-line-numbers-mode
Date: Fri, 16 Mar 2018 22:41:10 +0100 [thread overview]
Message-ID: <4a62c3c6-6622-6400-ca5a-aa055cb8065e@easy-emacs.de> (raw)
In-Reply-To: <87a7v8gfht.fsf@chapu.is>
On 16.03.2018 17:19, Sebastien Chapuis wrote:
>
>> In use here:
>>
>> (defun ar-count-lines (&optional beg end)
>> "Count lines in accessible part of buffer.
>>
>> See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7115"
>> (interactive)
>> (let ((beg (or beg (point-min)))
>> (end (or end (point)))
>> erg)
>> (if (bolp)
>> (setq erg (1+ (count-lines beg end)))
>> (setq erg (count-lines beg end)))
>> (when (called-interactively-p 'any) (message "%s" erg))
>> erg))
>
> Sorry, I forgot to mention that the interesting value is the X position.
> Is it still related to count-lines ?
>
> --
> Sebastien Chapuis
>
Sorry, my fault. Referred to a bug in count-lines, which occurs at BOL.
As its docu says, the return value may differ: "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."
Seems unrelated here.
next prev parent reply other threads:[~2018-03-16 21:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-16 10:45 bug#30834: 27.0.50; posn-at-point and display-line-numbers-mode Sébastien Chapuis
2018-03-16 15:34 ` Andreas Röhler
2018-03-16 16:19 ` Sebastien Chapuis
2018-03-16 21:41 ` Andreas Röhler [this message]
2018-03-16 17:17 ` Eli Zaretskii
2018-03-17 12:59 ` Sebastien Chapuis
2018-03-17 13:42 ` Eli Zaretskii
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=4a62c3c6-6622-6400-ca5a-aa055cb8065e@easy-emacs.de \
--to=andreas.roehler@easy-emacs.de \
--cc=30834@debbugs.gnu.org \
--cc=sebastien@chapu.is \
/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.