bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#65877: 29.1; line-number-at-pos crashes with args-out-of-range when


From: Michaël Cadilhac
Subject: bug#65877: 29.1; line-number-at-pos crashes with args-out-of-range when ran using emacsclient
Date: Tue, 12 Sep 2023 10:59:08 -0500

On Tue, Sep 12, 2023 at 6:29 AM Eli Zaretskii <eliz@gnu.org> wrote:

> This is a cockpit error, not a bug.  The doc string of
> line-number-at-pos says:
>
>   line-number-at-pos is a built-in function in ‘src/fns.c’.
>
>   (line-number-at-pos &optional POSITION ABSOLUTE)
>
>   Return the line number at POSITION in the current buffer.
>                                      ^^^^^^^^^^^^^^^^^^^^^
>
> So the correct form to evaluate is this:
>
>   $ emacsclient -e "(with-current-buffer (window-buffer) (line-number-at-pos 
> (window-start)))"

Fantastic, thanks for your help, and apologies for the noise.





reply via email to

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