From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vincent Lefevre Newsgroups: gmane.emacs.bugs Subject: bug#75352: 29.4; end-of-buffer is buggy after set-mark-command with some fonts Date: Sun, 5 Jan 2025 23:55:26 +0100 Message-ID: <20250105225526.GA2577744@qaa.vinc17.org> References: <87y0zqvfct.fsf@qaa.vinc17.org> <8634hyd4t7.fsf@gnu.org> <20250104192504.GB2167271@qaa.vinc17.org> <86ed1ibb8b.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25954"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.2.13+79 (f87ab401) vl-169878 (2024-11-04) Cc: 75352@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 05 23:56:25 2025 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 1tUZXl-0006as-Ed for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Jan 2025 23:56:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUZXQ-0006HS-D7; Sun, 05 Jan 2025 17:56:04 -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 1tUZXO-0006H8-7i for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 17:56:02 -0500 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 1tUZXN-00038Q-Vr for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 17:56:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:MIME-Version:References:From:Date:To:Subject; bh=lq0ibM7w/nwqL/SMRT94r/uF9bvw4xiC8V6Y72tRLs8=; b=BxwcK192XyHhWj0LnMpnZxZaiy8RiPcaWp+aos885VFoBHYpxMyzYBBoSrG1oVYm8+0MH+wN7HczOZFq61sv31wsIEY4xL+JvKcpPdDW+CmXeroAenJCSCEMxcTN2EJgZCKPo5XEeBHr5H/S1kwttJMyNBh9Ve9Ar1bRG4kr2sx2z9XqoTQFHaXvin+pvm3agTzAGFl0+CguYP9gO80q77PQicyZ5ydZNlNYzBpL0fhQa+fKcR8qS4RxWac0b1/i6/9ZOn/9yRBUF2SR1Am17YZ/QV01G9cSSK0C4P6tBtqnI3yyan2Spouv3u3Q8lFxZYmgIQZHrTjAOEeHRLQcng==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUZXN-0001VZ-Q1 for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 17:56:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Vincent Lefevre Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jan 2025 22:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75352 X-GNU-PR-Package: emacs Original-Received: via spool by 75352-submit@debbugs.gnu.org id=B75352.17361177425760 (code B ref 75352); Sun, 05 Jan 2025 22:56:01 +0000 Original-Received: (at 75352) by debbugs.gnu.org; 5 Jan 2025 22:55:42 +0000 Original-Received: from localhost ([127.0.0.1]:35768 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUZX4-0001Uq-4G for submit@debbugs.gnu.org; Sun, 05 Jan 2025 17:55:42 -0500 Original-Received: from joooj.vinc17.net ([155.133.131.76]:38860) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUZWu-0001UU-Uv for 75352@debbugs.gnu.org; Sun, 05 Jan 2025 17:55:39 -0500 Original-Received: from smtp-qaa.vinc17.net (135.197.67.86.rev.sfr.net [86.67.197.135]) by joooj.vinc17.net (Postfix) with ESMTPSA id 7F10C6B4; Sun, 5 Jan 2025 23:55:27 +0100 (CET) Original-Received: by qaa.vinc17.org (Postfix, from userid 1000) id CF12FCA00AD; Sun, 05 Jan 2025 23:55:26 +0100 (CET) Content-Disposition: inline In-Reply-To: <86ed1ibb8b.fsf@gnu.org> X-Mailer-Info: https://www.vinc17.net/mutt/ 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:298620 Archived-At: On 2025-01-04 22:00:36 +0200, Eli Zaretskii wrote: > > Date: Sat, 4 Jan 2025 20:25:04 +0100 > > From: Vincent Lefevre > > Cc: 75352@debbugs.gnu.org > > > > On 2025-01-04 16:36:20 +0200, Eli Zaretskii wrote: > > > > With the Noto Mono font and a file with some Japanese characters > > > > (I suspect that the reason of the need of such characters is that > > > > they slightly modify the cell height, and the font can change by > > > > just moving the cursor; see below), after set-mark-command (C-SPC), > > > > end-of-buffer (M->) does not go to the end of the buffer. > > > > > > end-of-buffer scrolls the window to show EOB not-quite-at-the-bottom > > > of the window. So what you describe can happen with unusual fonts. > > > > > > Why is that a problem? > > > > The main problem is not a display problem, but the fact that the > > cursor (point) is not at the end of the buffer. > > My point is that M-> doesn't guarantee that. For the end user, this is very surprising (even with strange font settings, something that is not documented, AFAIK, and for which one gets no errors or warnings). > > I've attached a screenshot to show what I get. The cursor (not visible > > on the screenshot) is just below the yellow area, on the first column. > > Note that the last line is only partly visible: one just has the top > > of the "x". > > Didn't you say that point then moves back into the viewport, and is > set to line 35? Or what am I missing. I just said that the cursor was on line 35, which is the line that is just below the yellow area (unless Emacs gives incorrect information on the line number). > > > > $ emacs -Q --eval="(set-fontset-font t 'unicode (font-spec :name \"Noto Mono\"))" file > > > > > > This set-fontset-font setting is not a good idea: it tells Emacs that > > > the named font can display _any_ Unicode character, which is usually > > > not true: almost all fonts support only a subset of Unicode. > > > > This was taken from https://emacs.stackexchange.com/q/17205/29118 > > (the goal was to prevent a fallback to a font with different metrics, > > breaking column alignments; well, at least this was working for > > math characters, IIRC). > > That is not how you do that. You should instead use set-fontset-font > to specify a particular suitable font for the 'mathematical' script. I want something that would be applied for every available glyphs, so that the display looks somewhat typographically consistent. Note that the line I gave was just for a simple example. In my actual settings, I provide other fonts: DejaVu Sans Mono and DejaVu Sans. Since DejaVu Sans provides a lot of glyphs for various scripts, I had initially thought that this would be complete for my needs (though DejaVu Sans has the drawback to change the width of the cells). [...] > And yes, if the font changes, what was inside the viewport can become > outside, and that could cause Emacs move point. IMHO, in such a case (when used with end-of-buffer), Emacs should scroll, keeping the point position. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)