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#36970: 26.2; invalid-read-syntax could print the location of the error Date: Sun, 31 Jan 2021 16:57:54 +0200 Message-ID: <831re1887h.fsf@gnu.org> References: <87tuqyx3ki.fsf@gnus.org> <87wnvttqlo.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9822"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacsuser@freemail.hu, 36970@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 31 15:58:09 2021 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 1l6EAz-0002R8-2E for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 31 Jan 2021 15:58:09 +0100 Original-Received: from localhost ([::1]:48764 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6EAx-0005yf-Tx for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 31 Jan 2021 09:58:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53478) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6EAr-0005yY-VL for bug-gnu-emacs@gnu.org; Sun, 31 Jan 2021 09:58:01 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46113) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6EAr-00080Y-NW for bug-gnu-emacs@gnu.org; Sun, 31 Jan 2021 09:58:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l6EAr-0003To-L3 for bug-gnu-emacs@gnu.org; Sun, 31 Jan 2021 09:58:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 31 Jan 2021 14:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36970 X-GNU-PR-Package: emacs Original-Received: via spool by 36970-submit@debbugs.gnu.org id=B36970.161210506613356 (code B ref 36970); Sun, 31 Jan 2021 14:58:01 +0000 Original-Received: (at 36970) by debbugs.gnu.org; 31 Jan 2021 14:57:46 +0000 Original-Received: from localhost ([127.0.0.1]:57659 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6EAZ-0003TJ-VM for submit@debbugs.gnu.org; Sun, 31 Jan 2021 09:57:46 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35582) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6EAV-0003T2-5r for 36970@debbugs.gnu.org; Sun, 31 Jan 2021 09:57:42 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:33842) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6EAO-0007pb-WF; Sun, 31 Jan 2021 09:57:33 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4660 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l6EAN-00040B-QJ; Sun, 31 Jan 2021 09:57:32 -0500 In-Reply-To: <87wnvttqlo.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun, 31 Jan 2021 10:14:59 +0100) 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" Xref: news.gmane.io gmane.emacs.bugs:199006 Archived-At: > From: Lars Ingebrigtsen > Date: Sun, 31 Jan 2021 10:14:59 +0100 > Cc: 36970@debbugs.gnu.org > > Should the line/column numbers be based on what Fcount_lines return, or > should they be the actual line number of the buffer? That is, taking > selective display etc into consideration or not? Ignoring all that and > just counting newlines would make sense in many situations (it's more > like when compiling a file), but not in others? > > And... I'm slightly nervous about calling out to something as > complicated as Fcount_lines. What is Fcount_lines? > So I was poking through the Emacs lisp code to see whether there's any > function that will just tell me what line I'm on, and there's... > display_count_lines in xdisp.c, but that doesn't really seem like a good > fit, since that's in redisplay, and not lread.c context. Can you tell why did you think display_count_lines will not do the job you need it to do? > Isn't there any function that will just return the line number at point? That's display_count_lines, IMO.