From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: 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 Message-ID: <83zg1rny08.fsf@gnu.org> References: <83o7i7pr44.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26681"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65877-done@debbugs.gnu.org To: =?UTF-8?Q?Micha=C3=ABl?= Cadilhac Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 12 18:44:19 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qg6Ut-0006lb-CL for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Sep 2023 18:44:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qg6Ua-0005f0-6w; Tue, 12 Sep 2023 12:44:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qg6UY-0005eq-RA for bug-gnu-emacs@gnu.org; Tue, 12 Sep 2023 12:43:58 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qg6UY-0005a1-HC for bug-gnu-emacs@gnu.org; Tue, 12 Sep 2023 12:43:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qg6Uc-0005LC-OX for bug-gnu-emacs@gnu.org; Tue, 12 Sep 2023 12:44:02 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Sep 2023 16:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 65877 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Mail-Followup-To: 65877@debbugs.gnu.org, eliz@gnu.org, michael@cadilhac.name Original-Received: via spool by 65877-done@debbugs.gnu.org id=D65877.169453701420475 (code D ref 65877); Tue, 12 Sep 2023 16:44:02 +0000 Original-Received: (at 65877-done) by debbugs.gnu.org; 12 Sep 2023 16:43:34 +0000 Original-Received: from localhost ([127.0.0.1]:59869 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qg6UA-0005KA-BC for submit@debbugs.gnu.org; Tue, 12 Sep 2023 12:43:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36516) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qg6U5-0005Jt-IR for 65877-done@debbugs.gnu.org; Tue, 12 Sep 2023 12:43:33 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qg6Tv-0005V9-6Y; Tue, 12 Sep 2023 12:43:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=AqXaxa5RC8qG4IZts86o3quKW7FhqSwVX4hdwfiIAsU=; b=Iy4LJfCuoto86Yh53+ZT EM3jD/NH3h3UnZVCMrix0CwH8aMdmtKgZN3+hbCAUg0cERcOn9uV6Udia7GeOe9I1SbV8oivGiRjR w7Xju4m7n+ehdHHRVQ5pOrGjhCbRBVWfIhUUSWpJ2kZHSsqrbj3U9aCo+3cODB93webpYoTpvEWcC d3OJHBH8hP+AdiDxfm5pAoSKuIsAI4sO+lcYvCJZcwhfkatCqoRaQDxTGJkjZmCTdRMFP+RYbx1Qp i2Eun9lg/8llVzRL3Q8QAg3SQUAGtqnT0MxV0KMEOI8wrHZbBtIGZGX6LtfD+V2dQqKfF2XMs64Di cgyYr+vkUFgTLQ==; In-Reply-To: (message from =?UTF-8?Q?Micha=C3=ABl?= Cadilhac on Tue, 12 Sep 2023 10:59:08 -0500) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:270194 Archived-At: > From: Michaël Cadilhac > Date: Tue, 12 Sep 2023 10:59:08 -0500 > Cc: 65877@debbugs.gnu.org > > On Tue, Sep 12, 2023 at 6:29 AM Eli Zaretskii 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.