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: Possibly Weird Behavior Regarding First Lines Which are Invisible? Date: Sun, 04 Feb 2024 15:42:17 +0200 Message-ID: <86a5og2vnq.fsf@gnu.org> References: <1623180934.4325548.1706854404633.ref@mail.yahoo.com> 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="16220"; 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 Sun Feb 04 14:42:49 2024 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 1rWcll-000414-7d for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 04 Feb 2024 14:42:49 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rWclJ-0002ro-Ml; Sun, 04 Feb 2024 08:42:21 -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 1rWclH-0002rN-7j for help-gnu-emacs@gnu.org; Sun, 04 Feb 2024 08:42:19 -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 1rWclG-0002xg-Vk for help-gnu-emacs@gnu.org; Sun, 04 Feb 2024 08:42:18 -0500 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=EI9yQo4rS6RMuzDTYb2E0mZzezaCFZfz8qEPXejldoQ=; b=fWvSmsFwPKhn0InjIFUP CUC8RuNLLalSgZjj8xmUbNThUBRKsKBSMydRGft7TVpjcoxD+mjUJ2mYoNqs0uvIKaOUqiCmrJJUu iajgCclxB/r1HeNIgZdW1bAv0nJTkmgE2tVb1MUmoDr3sTZGDj6UyO4bhg+zcWSujlDTugk38jpWA OPsyVkbO203KlJUWnomR1SU/3j2sePn4q83EEJsGGcotXO8JkgFBEynrSKkp1MS15i0T7Ueb3j3jo vb4xOmRv49cChUh1bVYvH2DbB5CfuWEw+5C7//nbL+OiAYYXJstI9q81Sk6qRDcE979xgYbCNrnBR Vcj0Oomr/HH8Nw==; In-Reply-To: (message from Jaft on Fri, 2 Feb 2024 06:13:24 +0000 (UTC)) 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:145878 Archived-At: > Date: Fri, 2 Feb 2024 06:13:24 +0000 (UTC) > From: Jaft > > So I have a buffer; let's say 9 lines. And I have a function which runs (previous-line) (beginning-of-line 1) and said function is bound to a key (let's say ). > So I apply a text-property of 'invisible using (pos-bol) of the first line and (1+ (pos-eol)) in order to get the first line to disappear, like it's not even there. > If I'm on line 3 and M-: my function, it does what I'd expect and (point) will return the (pos-bol) of the second line. But, if I execute my function by pressing from line 3, (point) keeps returning back 1, the point of the beginning of line 1 rather than the point at the beginning of line 2. > Is this expected behavior? Yes, it is. After you press , the automatic point-adjustment moves point to before the invisible text. If you want to disable that, set global-disable-point-adjustment to a non-nil value.