GNU bug report logs - #65877
29.1; line-number-at-pos crashes with args-out-of-range when ran using emacsclient

Previous Next

Package: emacs;

Reported by: Michaël Cadilhac <michael <at> cadilhac.name>

Date: Mon, 11 Sep 2023 21:09:01 UTC

Severity: normal

Tags: notabug

Found in version 29.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #18 received at 65877-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Michaël Cadilhac <michael <at> cadilhac.name>
Cc: 65877-done <at> debbugs.gnu.org
Subject: Re: bug#65877: 29.1; line-number-at-pos crashes with
 args-out-of-range when ran using emacsclient
Date: Tue, 12 Sep 2023 19:43:03 +0300
> From: Michaël Cadilhac <michael <at> cadilhac.name>
> Date: Tue, 12 Sep 2023 10:59:08 -0500
> Cc: 65877 <at> debbugs.gnu.org
> 
> On Tue, Sep 12, 2023 at 6:29 AM Eli Zaretskii <eliz <at> 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.

No sweat; I'm therefore closing this bug.




This bug report was last modified 1 year and 304 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.