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.devel Subject: Re: :align-to space spec and line wrap Date: Sun, 30 Apr 2023 14:29:01 +0300 Message-ID: <83edo1pq0y.fsf@gnu.org> References: <83leigwhme.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6221"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Qiantan Hong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Apr 30 13:29:10 2023 Return-path: Envelope-to: ged-emacs-devel@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 1pt5Er-0001MN-B3 for ged-emacs-devel@m.gmane-mx.org; Sun, 30 Apr 2023 13:29:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pt5EG-0002mU-1C; Sun, 30 Apr 2023 07:28:32 -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 1pt5EC-0002m6-W3 for emacs-devel@gnu.org; Sun, 30 Apr 2023 07:28:29 -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 1pt5EC-0000vs-5F; Sun, 30 Apr 2023 07:28:28 -0400 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=AmrgmGW3uCQNOZSArrq8E3QLcd1a+YbRSuyNEMFWRuI=; b=WI94SOb5/A/a jfSlIILc+BRxOEsMaVL1hSMAMh+K0VHA3gAH95Mm95aL0meZLEhY13UfcJqURC8CMeOW7deiSh+iW M7bRT4Ep6+AU/17T74sZk7sBe+2ZlBDM5HnKOj3Rl58MerJUDuMLW9nk5iNQyK0rGd6tjJITHU9WQ 3mr0mYAiHlegMmsW/hCOYhLTI8cXbwtRIJWokhlm0uNYiqpu68lJweqkbJWbCdbsOpKZg+tw26pJj rYuQ9mjfymEtcxdVUl3BHQt0JJ2WgfblYj2/xlwGqkIxZdHqeeCLkYzku7oyyKEcmQ/wWdzUahkOk EEN6H7W5MzHyzw5vNMSMng==; 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 1pt5EA-0004Jp-6W; Sun, 30 Apr 2023 07:28:27 -0400 In-Reply-To: (message from Qiantan Hong on Sun, 30 Apr 2023 10:48:35 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:305731 Archived-At: > From: Qiantan Hong > Date: Sun, 30 Apr 2023 10:48:35 +0000 > > It turns out that similar same thing also happen for horiontally > scroll. Once I horizontally scroll to the right, the space align to > somewhere in the middle of the screen, rather than visually to the > right. Of course. And for the same reason: the columns are still counted from the (now invisible) left edge of the window, i.e. from the very first column of the buffer text. > I understand how current implementation will exhibit such behavior. > Is such behavior desired? The info node "40.16.3 Pixel Specification > for Spaces" says that `:align-to' specifies positions relative to > "text area", which is defined as a concept about window geometry > ("29.1 Basic Concepts of Emacs Windows"). Therefore, I think the > desired behavior is to align to visual positions in the window. Text area begins where text begins, even if that text is not visible due to hscroll. You are interpreting that text in the manual too literally, and try to apply it to situations where the left edge of the text area is not visible. > I'd also argue this is also more useful in practice as it allows one > to display some text in desired horizontal position in the window. > I've yet to encounter a use case where the current buffer > position-based behavior is desired. It's a display property, after > all, and is probably more commonly used for displaying stuff! Sorry, it's too late to change these basics of the window geometry, as they have existed for the last 23 years.