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.help Subject: Re: Correct use of text properties? Date: Thu, 02 Mar 2023 17:47:19 +0200 Message-ID: <83y1ofcfzs.fsf@gnu.org> References: <83sfenei8u.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36973"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 02 16:48:09 2023 Return-path: Envelope-to: geh-help-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 1pXlA8-0009Pg-3t for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 02 Mar 2023 16:48:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXl9a-0002PN-EB; Thu, 02 Mar 2023 10:47:34 -0500 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 1pXl9V-0002N3-8I for help-gnu-emacs@gnu.org; Thu, 02 Mar 2023 10:47:29 -0500 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 1pXl9U-000266-IA for help-gnu-emacs@gnu.org; Thu, 02 Mar 2023 10:47:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=FzVxKSTYECWUlPfcw4PJq7h0YfAuSyUleV/NB1SUlFE=; b=km9AF96ihgA+ HGZ4Ri3OerDV5ZmfH2grw4MgkQGdiI1i/SiaXcPqL6am67gFiMEulGsXbJWgIZ+YTI7TLYwOIk6zJ uEvNaJ6ybhgm4mt7NU3AtpJx0uKZ0zIGDORvyfGkKLzqp6P42be4dIwdF/xT5T7zfGIaBwlQHRjGx YGM4DTfWkQso22nfErqFO0L7HK98UhKrR91/aLUoBa8Sz43V7aSEprWQ7NRhZjM9Kak5CZa99xXQd RY7RH2IMEs2hgFafz74DB0igDDqgF0QcZVnoY85nKLy3WMl5ey9kIKn0xGvLcLYukhhDx6fRVDvKH TVwl9tQq1Qrk8HDdXkKvmg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXl9T-0006yk-QB for help-gnu-emacs@gnu.org; Thu, 02 Mar 2023 10:47:28 -0500 In-Reply-To: (message from Joshua Lambert on Thu, 2 Mar 2023 09:25:20 -0600) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142890 Archived-At: > From: Joshua Lambert > Date: Thu, 2 Mar 2023 09:25:20 -0600 > Cc: help-gnu-emacs@gnu.org > > > Probably. But you don't describe the behavior you found surprising, > > so it is hard to tell whether what you see is expected. Please tell > > more about the behavior you observe that surprised you. > > In the modeline and with display-line-numbers-mode the line number is always 1. That is expected. If you want to count screen lines, try setting display-line-numbers to the value 'visual'. However, that will display numbers relative to the current line, so maybe this is not what you want. > Also, pointer motions such as move-end-of-line and forward-paragraph jump to > the end of the file. This is also expected. > Since I was adding newline characters as text properties, I > thought the line numbers might increment as I moved point down past those > newlines. No, these properties only affect the display, not how Emacs counts lines or moves point: those are still done on the actual buffer text.