[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#30834: 27.0.50; posn-at-point and display-line-numbers-mode

From: Andreas Röhler
Subject: bug#30834: 27.0.50; posn-at-point and display-line-numbers-mode
Date: Fri, 16 Mar 2018 22:41:10 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

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";
   (let ((beg (or beg (point-min)))
        (end (or end (point)))
     (if (bolp)
        (setq erg (1+ (count-lines beg end)))
       (setq erg (count-lines beg end)))
     (when (called-interactively-p 'any) (message "%s" 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]