Received: (at 37858) by debbugs.gnu.org; 7 May 2022 16:20:52 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 07 12:20:52 2022 Received: from localhost ([127.0.0.1]:52827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1nnNAp-0006c1-Mm for submit <at> debbugs.gnu.org; Sat, 07 May 2022 12:20:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45338) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1nnNAn-0006bl-IR; Sat, 07 May 2022 12:20:50 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41420) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1nnNAh-0004LK-C8; Sat, 07 May 2022 12:20:43 -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=/K0+23AQ5uHMu9t1oHXUOowUfHPxJNKVvPRk6bdw55g=; b=kX+SBKe07L5M xKbqhtqS1wNJC6QUwxtemKRJlMQr5hJeX8XGnz3GiRolWxy6AyzmXyjcCwlgUciYcvib+S3B7z4yM aNLInj0NKF1isd3aoc/yDjD9a4Py0XCEDsN9o1kb97Z6vUgI2R6eWc6XRudTxPIbZEt1qyUQ8TmIZ +2giH+bxi/uBYostKKOZgEi3N2RhcZetpnAF4qGzkQ1d+/I2bruf3VWOUs57+mCxXyJZ/wlHEGi9/ ZSIk2PpRsX3JmXP9Cuv12MpYJepk0tIC05W3zyag9+IHi+Mr2h+VDBsTXxrD4hvcqtV6E9G3A1rrQ YPcz59iE3A1m5f4a2qGGyA==; Received: from [87.69.77.57] (port=3009 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1nnNAg-0005y8-SR; Sat, 07 May 2022 12:20:43 -0400 Date: Sat, 07 May 2022 19:20:33 +0300 Message-Id: <83fsllxqjy.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: monnier@HIDDEN In-Reply-To: <83k0axxr6o.fsf@HIDDEN> (message from Eli Zaretskii on Sat, 07 May 2022 19:06:55 +0300) Subject: Re: bug#37858: bug#37880: 27.0.50; Changing font size in Info-mode messes up formatting References: <jwvy2xdams1.fsf@HIDDEN> <87o809pmv7.fsf@HIDDEN> <jwvo809h11s.fsf-monnier+emacs@HIDDEN> <83o809xval.fsf@HIDDEN> <jwvzgjt2val.fsf-monnier+emacs@HIDDEN> <83k0axxr6o.fsf@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37858 Cc: larsi@HIDDEN, 37880 <at> debbugs.gnu.org, 37858 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Cc: larsi@HIDDEN, 37880 <at> debbugs.gnu.org, 37858 <at> debbugs.gnu.org > Date: Sat, 07 May 2022 19:06:55 +0300 > From: Eli Zaretskii <eliz@HIDDEN> > > > From: Stefan Monnier <monnier@HIDDEN> > > Cc: larsi@HIDDEN, 37880 <at> debbugs.gnu.org, 37858 <at> debbugs.gnu.org > > Date: Sat, 07 May 2022 11:58:41 -0400 > > > > I haven't looked at recent changes in this area, so maybe things would > > be a bit easier now, tho looking at `scan_for_column` in `master`, > > I still see that we re-implement in `check_display_width` (part of) the > > code used in `xdisp.c` to handle the display property, so AFAICT the > > duplication is still present. > > There's no duplication. We simply use the same infrastructure as the > display code does. And, btw, I don't think I agree with your assertion that we should use the display routines for current-column and friends. The column-oriented functions count actual (not canonical) columns, whereas display code counts pixels. It makes little sense to me to call the display code, which will load fonts, call jit-lock, and whatnot, just to count columns like current-column expects.
bug-gnu-emacs@HIDDEN
:bug#37858
; Package emacs
.
Full text available.Received: (at 37858) by debbugs.gnu.org; 7 May 2022 16:07:12 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 07 12:07:12 2022 Received: from localhost ([127.0.0.1]:52760 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1nnMxc-0006DF-HB for submit <at> debbugs.gnu.org; Sat, 07 May 2022 12:07:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43286) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1nnMxb-0006Cz-4C; Sat, 07 May 2022 12:07:11 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40786) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1nnMxV-0002DL-Jy; Sat, 07 May 2022 12:07:05 -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=bYb+1BItsM1l1BuJ1Kp0hpw1fYA9hxuUabGQo0Ys0zU=; b=bs1r180nHMih 9355OEj8CED5NyfhhqFBzDTq4kNU+EKGlE3yMa7EUSmIZO6prVJNywuGPSFf1BivijBU30a0FSLFl j0Ajr6IIRGCV/MOXV2/KsVhNVUTE9ErNL08tshN9p1LwMVi0F3suBkwKvPbn5MGrvKRJc/yP+DsNe vwnP4gs99ReBzJt7R6NfnOfaY70VNewDeZyMlQlQiqJ7eYW5Jy85gg+fnbqv1rdCtPpkR3pM9jFjv Oaj19zIos2s40rp3jRzsJa7bRUkqu0DVeJ+l5yDjmuKbnVLAQlCXztTMPmHlQ2a+O06FYtJQceAjo B5DgHRtlPz3pcQ4DZ4k/sA==; Received: from [87.69.77.57] (port=2170 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1nnMxV-0004I1-3e; Sat, 07 May 2022 12:07:05 -0400 Date: Sat, 07 May 2022 19:06:55 +0300 Message-Id: <83k0axxr6o.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Stefan Monnier <monnier@HIDDEN> In-Reply-To: <jwvzgjt2val.fsf-monnier+emacs@HIDDEN> (message from Stefan Monnier on Sat, 07 May 2022 11:58:41 -0400) Subject: Re: bug#37858: bug#37880: 27.0.50; Changing font size in Info-mode messes up formatting References: <jwvy2xdams1.fsf@HIDDEN> <87o809pmv7.fsf@HIDDEN> <jwvo809h11s.fsf-monnier+emacs@HIDDEN> <83o809xval.fsf@HIDDEN> <jwvzgjt2val.fsf-monnier+emacs@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37858 Cc: larsi@HIDDEN, 37880 <at> debbugs.gnu.org, 37858 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: Stefan Monnier <monnier@HIDDEN> > Cc: larsi@HIDDEN, 37880 <at> debbugs.gnu.org, 37858 <at> debbugs.gnu.org > Date: Sat, 07 May 2022 11:58:41 -0400 > > I haven't looked at recent changes in this area, so maybe things would > be a bit easier now, tho looking at `scan_for_column` in `master`, > I still see that we re-implement in `check_display_width` (part of) the > code used in `xdisp.c` to handle the display property, so AFAICT the > duplication is still present. There's no duplication. We simply use the same infrastructure as the display code does.
bug-gnu-emacs@HIDDEN
:bug#37858
; Package emacs
.
Full text available.Received: (at 37858) by debbugs.gnu.org; 7 May 2022 15:58:51 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 07 11:58:51 2022 Received: from localhost ([127.0.0.1]:52737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1nnMpX-0003mm-KW for submit <at> debbugs.gnu.org; Sat, 07 May 2022 11:58:51 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:51273) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <monnier@HIDDEN>) id 1nnMpW-0003mV-Iw; Sat, 07 May 2022 11:58:50 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D4869441133; Sat, 7 May 2022 11:58:44 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 6739E440F24; Sat, 7 May 2022 11:58:43 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1651939123; bh=uQWEj59+C64PCE4lSHYJYgMnducMD3TCNBXDsh6lkUc=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=QfFBnyzcnepBEUIF1wVThc0e1KRwihhKsv6kPhZmMaueNkjtWsxmmcKsSjj74M/yA quBaBbX/9lyqNeH3yvD+PmAic/9I+C/qh/B93EOzl5mOsxhrvsi9QFBNe3ccxh08EO EnM101CIeeDKDzixZpvTHyP0h6U4JHk0rsIOR7ioVrRu7fTjNicHlYZbVNjlpJeJNn gWSUgmK7qU9+yOrcNfESGn3mTugJb6rnBcrc5yhHuTb6CwHxYYQSmVZ+M6Zs26P71m 3aKmWLHRueMNoXGpb2ca0kbH5axpwc0xine/1z2PX8nNbzaNiSdaNa/7liaA/T7m9b wYbotY9WQv5PQ== Received: from pastel (unknown [45.72.221.51]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 2CE58120315; Sat, 7 May 2022 11:58:43 -0400 (EDT) From: Stefan Monnier <monnier@HIDDEN> To: Eli Zaretskii <eliz@HIDDEN> Subject: Re: bug#37858: bug#37880: 27.0.50; Changing font size in Info-mode messes up formatting Message-ID: <jwvzgjt2val.fsf-monnier+emacs@HIDDEN> References: <jwvy2xdams1.fsf@HIDDEN> <87o809pmv7.fsf@HIDDEN> <jwvo809h11s.fsf-monnier+emacs@HIDDEN> <83o809xval.fsf@HIDDEN> Date: Sat, 07 May 2022 11:58:41 -0400 In-Reply-To: <83o809xval.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 07 May 2022 17:38:10 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.051 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37858 Cc: larsi@HIDDEN, 37880 <at> debbugs.gnu.org, 37858 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Eli Zaretskii [2022-05-07 17:38:10] wrote: > When did you last look at what current-column does in the context of > the issue being discussed here? It was soon after I posted this bug report. > I'm not sure it does what you had in mind, but some changes were done > there recently, and the behavior in similar contexts did change. I haven't looked at recent changes in this area, so maybe things would be a bit easier now, tho looking at `scan_for_column` in `master`, I still see that we re-implement in `check_display_width` (part of) the code used in `xdisp.c` to handle the display property, so AFAICT the duplication is still present. Stefan
bug-gnu-emacs@HIDDEN
:bug#37858
; Package emacs
.
Full text available.Received: (at 37858) by debbugs.gnu.org; 7 May 2022 14:38:29 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 07 10:38:29 2022 Received: from localhost ([127.0.0.1]:52676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1nnLZk-0007y6-SY for submit <at> debbugs.gnu.org; Sat, 07 May 2022 10:38:29 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33656) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1nnLZi-0007xr-LZ; Sat, 07 May 2022 10:38:26 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39988) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1nnLZc-0007Dz-NP; Sat, 07 May 2022 10:38:20 -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=VH6BwBfsz2Va5j0BycRvvQUYQ4uMhlbufIaHnyruae8=; b=cdXllzmm0Fkb wWvYQdEDBl/tbwRjksVHWHJoEErN2IHBszdiJ3D9RuVLPpOoJkdj7vmv2T0zcL9rjnshU3ZhtcY7C PM0VzKcc8JunNVfnf4zJJramCNkVjdT4C1tsSb0ROWzxfTHx6IiC1bzrYA5uQORZPrCqS2m8RUK6B NFJiZX7aCmXlFMhpHX7z4zq+mVfWwgaMfLNhE3IjweEbJzcncKmyfDp0QBY3CvcaXdEs5WfCyq3Eq MLPRq5BV9epu9Io0sKijdQ6bnbej0IP9XH9rywogqE6dCUwh8aq5/k43J9D1ISELLVfUhsPh7igX1 6GKQU1M7Vnif9GHSi/WiJQ==; Received: from [87.69.77.57] (port=4350 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1nnLZc-0008Cx-75; Sat, 07 May 2022 10:38:20 -0400 Date: Sat, 07 May 2022 17:38:10 +0300 Message-Id: <83o809xval.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Stefan Monnier <monnier@HIDDEN> In-Reply-To: <jwvo809h11s.fsf-monnier+emacs@HIDDEN> (bug-gnu-emacs@HIDDEN) Subject: Re: bug#37858: bug#37880: 27.0.50; Changing font size in Info-mode messes up formatting References: <jwvy2xdams1.fsf@HIDDEN> <87o809pmv7.fsf@HIDDEN> <jwvo809h11s.fsf-monnier+emacs@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37858 Cc: larsi@HIDDEN, 37880 <at> debbugs.gnu.org, 37858 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Cc: 37880 <at> debbugs.gnu.org, 37858 <at> debbugs.gnu.org > Date: Sat, 07 May 2022 10:29:54 -0400 > From: Stefan Monnier via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN> > > The patch I came up with back then doesn't work right. IIRC it's > because we need to change both the redisplay code and the > `current-column` code and it only changed one of the two. > > IIRC, I decided then that the right fix is to rewrite the > `current-column` code to use the redisplay code (instead of trying to > mimic it), but I didn't get around to that (and IIRC it's not > completely straightforward because `current-column` currently behaves > differently *on purpose* in some cases (most importantly w.r.t treating > ellipsis-erased text) so fixing it right will imply changes in behavior > and figuring out how to do it without breaking existing uses). When did you last look at what current-column does in the context of the issue being discussed here? I'm not sure it does what you had in mind, but some changes were done there recently, and the behavior in similar contexts did change.
bug-gnu-emacs@HIDDEN
:bug#37858
; Package emacs
.
Full text available.Received: (at 37858) by debbugs.gnu.org; 7 May 2022 14:30:10 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 07 10:30:09 2022 Received: from localhost ([127.0.0.1]:52659 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1nnLRc-0007j9-Hg for submit <at> debbugs.gnu.org; Sat, 07 May 2022 10:30:09 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:34204) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <monnier@HIDDEN>) id 1nnLRa-0007i9-K2; Sat, 07 May 2022 10:30:03 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 27AD9100280; Sat, 7 May 2022 10:29:57 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 877B6100138; Sat, 7 May 2022 10:29:55 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1651933795; bh=JArbycOeo6+rxif5bCw9yLzop1flCaV2A4ZGcsYY0KI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=S+FYSFrsC/e5+0M4Zli3atQFljucaOsxxiHMW9r+VWx5p/T8/AHnRSCp8kbg8ipoc jkE8nEeJcDLxT+x/kVBIV0dp4JmI21BHAmLyXrptZ9QNGvqkp3cb55UEOJf4dtiEqy GdpZRQ9LOoo2A6F+q8GNN6LniHfaMPqImz++8CRAq+xHuImP/DeI1sIgIqhHar2z2L jzasy2ZUi2pHatSuE8d/bRq9kRjbVFY6jdetFSH30quTfbGztpBQZzyEW/Ys1tfGto sfPHYhMPhkwAuEgMMasO2I0F1T0msisNbbmwSylRiMHh1grfRHEc+dtOwUwRE1LPC/ RDf0kC3NY7Pqw== Received: from alfajor (modemcable034.207-20-96.mc.videotron.ca [96.20.207.34]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 5F0D512082C; Sat, 7 May 2022 10:29:55 -0400 (EDT) From: Stefan Monnier <monnier@HIDDEN> To: Lars Ingebrigtsen <larsi@HIDDEN> Subject: Re: bug#37880: 27.0.50; Changing font size in Info-mode messes up formatting Message-ID: <jwvo809h11s.fsf-monnier+emacs@HIDDEN> References: <jwvy2xdams1.fsf@HIDDEN> <87o809pmv7.fsf@HIDDEN> Date: Sat, 07 May 2022 10:29:54 -0400 In-Reply-To: <87o809pmv7.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Sat, 07 May 2022 14:07:24 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.075 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37858 Cc: 37880 <at> debbugs.gnu.org, 37858 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Lars Ingebrigtsen [2022-05-07 14:07:24] wrote: > Stefan Monnier <monnier@HIDDEN> writes: >> So, I'd like to extend our `space` specifications so as to be able to >> specify a minimum width. I came up with the patch below which lets you >> write: >> >> (space :align-to FOO :min-width BAR) >> >> which seems to work fine, but while trying to update the Elisp doc for >> it I realized that maybe a better option is to extend the acceptable >> forms for FOO so it can be of the form: >> >> (space :align-to (max FOO (+ BAR current-x))) > > I think I'd actually prefer the first form -- it's easy to reason about, > and does what most usage cases want (i.e., align if possible, but if > not, then at least leave some space so that things don't run into each > other). The patch I came up with back then doesn't work right. IIRC it's because we need to change both the redisplay code and the `current-column` code and it only changed one of the two. IIRC, I decided then that the right fix is to rewrite the `current-column` code to use the redisplay code (instead of trying to mimic it), but I didn't get around to that (and IIRC it's not completely straightforward because `current-column` currently behaves differently *on purpose* in some cases (most importantly w.r.t treating ellipsis-erased text) so fixing it right will imply changes in behavior and figuring out how to do it without breaking existing uses). Stefan
bug-gnu-emacs@HIDDEN
:bug#37858
; Package emacs
.
Full text available.Received: (at 37858) by debbugs.gnu.org; 7 May 2022 12:07:38 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 07 08:07:38 2022 Received: from localhost ([127.0.0.1]:50703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1nnJDl-0003Mg-Kf for submit <at> debbugs.gnu.org; Sat, 07 May 2022 08:07:37 -0400 Received: from quimby.gnus.org ([95.216.78.240]:47578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <larsi@HIDDEN>) id 1nnJDj-0003MO-Ob; Sat, 07 May 2022 08:07:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ehkNe1p7lyCiP/LZNYMNny34hxJYNZKct19/ZF22gpI=; b=TA099xlZDx5/O8GPTNej+B8ql5 8Ym5Wb2wz+5XO21GQgi4aCIq3ygIpZg5WFOkp7xlzUIk0wxxB4kxrWd1F0TCy1pdujB/aYEThY92a Fx0LwwLN8Jcwoeb+7Vi7l1TmvDZE5GTlsJUhYIqu2Dpe4EHD2jYxjjSbiAJIsKifmqu8=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <larsi@HIDDEN>) id 1nnJDa-0002UA-72; Sat, 07 May 2022 14:07:28 +0200 From: Lars Ingebrigtsen <larsi@HIDDEN> To: Stefan Monnier <monnier@HIDDEN> Subject: Re: bug#37880: 27.0.50; Changing font size in Info-mode messes up formatting References: <jwvy2xdams1.fsf@HIDDEN> X-Now-Playing: Neil Young with Crazy Horse's _Archives Vol. II (10): Odeon Budokan (1976)_: "Cortez the Killer" Date: Sat, 07 May 2022 14:07:24 +0200 In-Reply-To: <jwvy2xdams1.fsf@HIDDEN> (Stefan Monnier's message of "Mon, 21 Oct 2019 16:03:58 -0400") Message-ID: <87o809pmv7.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Monnier <monnier@HIDDEN> writes: > So, I'd like to extend our `space` specifications so as to be able to > specify a minimum width. I came up with the patch below which lets you > write: > > (space :align-to FOO :min-width BAR) > > w [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37858 Cc: 37880 <at> debbugs.gnu.org, 37858 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Stefan Monnier <monnier@HIDDEN> writes: > So, I'd like to extend our `space` specifications so as to be able to > specify a minimum width. I came up with the patch below which lets you > write: > > (space :align-to FOO :min-width BAR) > > which seems to work fine, but while trying to update the Elisp doc for > it I realized that maybe a better option is to extend the acceptable > forms for FOO so it can be of the form: > > (space :align-to (max FOO (+ BAR current-x))) I think I'd actually prefer the first form -- it's easy to reason about, and does what most usage cases want (i.e., align if possible, but if not, then at least leave some space so that things don't run into each other). -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no
bug-gnu-emacs@HIDDEN
:bug#37858
; Package emacs
.
Full text available.Stefan Kangas <stefan@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Received: (at 37858) by debbugs.gnu.org; 22 Oct 2019 15:08:56 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 22 11:08:56 2019 Received: from localhost ([127.0.0.1]:60314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1iMvmK-0005sn-Be for submit <at> debbugs.gnu.org; Tue, 22 Oct 2019 11:08:56 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1iMvmI-0005sa-Dr for 37858 <at> debbugs.gnu.org; Tue, 22 Oct 2019 11:08:54 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58458) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>) id 1iMvmD-00008b-5c; Tue, 22 Oct 2019 11:08:49 -0400 Received: from [176.228.60.248] (port=4171 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from <eliz@HIDDEN>) id 1iMvmC-0005zI-BK; Tue, 22 Oct 2019 11:08:48 -0400 Date: Tue, 22 Oct 2019 18:08:43 +0300 Message-Id: <837e4w24xw.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Stefan Monnier <monnier@HIDDEN> In-reply-to: <jwvy2xdams1.fsf@HIDDEN> (message from Stefan Monnier on Mon, 21 Oct 2019 16:03:58 -0400) Subject: Re: bug#37858: 27.0.50; Ensure a minimum width for `space` display prop References: <jwvy2xdams1.fsf@HIDDEN> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37858 Cc: 37858 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: Stefan Monnier <monnier@HIDDEN> > Date: Mon, 21 Oct 2019 16:03:58 -0400 > > So, I'd like to extend our `space` specifications so as to be able to > specify a minimum width. I came up with the patch below which lets you > write: > > (space :align-to FOO :min-width BAR) > > which seems to work fine, but while trying to update the Elisp doc for > it I realized that maybe a better option is to extend the acceptable > forms for FOO so it can be of the form: > > (space :align-to (max FOO (+ BAR current-x))) Since :align-to already supports expressions of the forms described in the node "Pixel Specification", to have the latter you'd need: . implement a new OP called 'max' (and probably also 'min' for a good measure); . implement a new POS called, say, 'beg', which will evaluate to the x coordinate of where the space display property begins and then you will have your feature for free, I think.
bug-gnu-emacs@HIDDEN
:bug#37858
; Package emacs
.
Full text available.Received: (at 37858) by debbugs.gnu.org; 22 Oct 2019 08:03:56 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 22 04:03:56 2019 Received: from localhost ([127.0.0.1]:58199 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1iMp92-0007bQ-Hl for submit <at> debbugs.gnu.org; Tue, 22 Oct 2019 04:03:56 -0400 Received: from mail-wm1-f47.google.com ([209.85.128.47]:55208) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <rpluim@HIDDEN>) id 1iMp90-0007bB-FU for 37858 <at> debbugs.gnu.org; Tue, 22 Oct 2019 04:03:54 -0400 Received: by mail-wm1-f47.google.com with SMTP id p7so16055528wmp.4 for <37858 <at> debbugs.gnu.org>; Tue, 22 Oct 2019 01:03:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:mail-copies-to:gmane-reply-to-list :date:in-reply-to:message-id:mime-version:content-transfer-encoding; bh=w5rWEuC5SQ/xd0BUyhvPJrUYt/wugWYCX7fi8DEdPgU=; b=q9JKxS9BXGWSckPVDdcEaN+Mw8yOVJkF7aQfiGMEi9pAyC5Soqin2Ot8yU7lX5+Ak9 ketUNoZbIKJp5/sJDhAEx5M3jVxq35Igk2WvFg/R95GhF8HSfT3/tErx0oP8QgeFshki KcHtAi8cqZ8nEZD6tVMYfUlKElWq+sfd5/BkYBdbFvp/WU9wi4ewAMG5WTDe5txPoIw2 CecTwEPJtGz5HG7nOPGAJecJKtwcS5FBbq6u9joZlHxGOu3kxzeB9RJRQgHBt/YOVlgX R9HP8F3W75Hf+0oRUeeE+4ALo06ohgQ4NuS2ArOECIZxaRuDvnyiT7G8nAruw73B1duo 4f3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=w5rWEuC5SQ/xd0BUyhvPJrUYt/wugWYCX7fi8DEdPgU=; b=KotO0nBCJ8U1/vqyilQzx+B3J6fqZneyHSTnf5qWd384nQX/O2I6oBQr6p4bRWE3vk X/biBJe1oKCDsqUUfCvcKr32cNUtNEe8ZfWsETHDjqtE3JhdRLNhV0cRxoBkB16poOQR i/Rp0zlBknPFCU3YMMUr+VgWLWXUlj/smvrf8U8CuQGcVzbPgRdKnwmeiptcNZOAQRln 5PrwxixxikI92nU4h4jOnjmtEc+TLqilngcuH3f4gR1CvdxrPX/Dq4xMwcC9UFPKrSV5 rX7saIXVR9dx/BAeCieiht10gE5r/ncYi5S+GjnRVcpsesoIGOYPNiABNAwH2ThAHVHp qPNQ== X-Gm-Message-State: APjAAAXD7GIPk9tDfLly4LmePVWn35tzJyz07dZyKbqgb6NxC1qfvWgc 2mlPZxFCZVh6pbPteHlQ9eaU3jZL X-Google-Smtp-Source: APXvYqyALAj2DSY5y3ixDopOgNRx2rDbTsDT862ABFW+4x627Lh2dg0qVkOKTW/7K7jtcuo273W13A== X-Received: by 2002:a1c:a70e:: with SMTP id q14mr1601436wme.86.1571731428220; Tue, 22 Oct 2019 01:03:48 -0700 (PDT) Received: from rpluim-mac ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id t10sm21213321wrw.23.2019.10.22.01.03.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2019 01:03:47 -0700 (PDT) From: Robert Pluim <rpluim@HIDDEN> To: Stefan Monnier <monnier@HIDDEN> Subject: Re: bug#37858: 27.0.50; Ensure a minimum width for `space` display prop References: <jwvy2xdams1.fsf@HIDDEN> X-Debbugs-No-Ack: yes Mail-Copies-To: never Gmane-Reply-To-List: yes Date: Tue, 22 Oct 2019 10:03:46 +0200 In-Reply-To: <jwvy2xdams1.fsf@HIDDEN> (Stefan Monnier's message of "Mon, 21 Oct 2019 16:03:58 -0400") Message-ID: <m2ftjlurz1.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37858 Cc: 37858 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) >>>>> On Mon, 21 Oct 2019 16:03:58 -0400, Stefan Monnier <monnier@HIDDEN= real.ca> said: Stefan> Package: Emacs Stefan> Version: 27.0.50 Stefan> For text displayed in columns, alignment is generally obtained = with Stefan> a `display` text-property of the form Stefan> (space :align-to FOO) Stefan> This works great when the previous text ends before FOO, but wh= en we Stefan> mis-calculate (or didn't calculate at all) and the previous tex= t already Stefan> extends further than the desired alignment of the following tex= t, such Stefan> space is reduced down to 0 pixels which is often not what we wa= nt. Stefan> Sometimes one can workaround this by placing 2 spaces in the bu= ffer: one Stefan> with the :align-to and another fixed size space. But it can be Stefan> cumbersome to do that and it leads to undesirable artifacts (e.= g. the Stefan> cursor can be placed between the two space). Stefan> So, I'd like to extend our `space` specifications so as to be a= ble to Stefan> specify a minimum width. I came up with the patch below which = lets you Stefan> write: Stefan> (space :align-to FOO :min-width BAR) Stefan> which seems to work fine, but while trying to update the Elisp = doc for Stefan> it I realized that maybe a better option is to extend the accep= table Stefan> forms for FOO so it can be of the form: Stefan> (space :align-to (max FOO (+ BAR current-x))) Hmm, I think I probably prefer the former. Perhaps when you've documented the semantics of your :min-relative-width addition I=CA=BCll be able to judge better :-) Robert
bug-gnu-emacs@HIDDEN
:bug#37858
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 21 Oct 2019 20:04:18 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 21 16:04:18 2019 Received: from localhost ([127.0.0.1]:57884 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1iMduc-0005zZ-7t for submit <at> debbugs.gnu.org; Mon, 21 Oct 2019 16:04:18 -0400 Received: from lists.gnu.org ([209.51.188.17]:60737) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <monnier@HIDDEN>) id 1iMdua-0005zQ-6s for submit <at> debbugs.gnu.org; Mon, 21 Oct 2019 16:04:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37056) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <monnier@HIDDEN>) id 1iMduY-000174-Ro for bug-gnu-emacs@HIDDEN; Mon, 21 Oct 2019 16:04:16 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <monnier@HIDDEN>) id 1iMduW-0005Cm-Mh for bug-gnu-emacs@HIDDEN; Mon, 21 Oct 2019 16:04:13 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:57577) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <monnier@HIDDEN>) id 1iMduW-0005CO-FY for bug-gnu-emacs@HIDDEN; Mon, 21 Oct 2019 16:04:12 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 5DDC810079A for <bug-gnu-emacs@HIDDEN>; Mon, 21 Oct 2019 16:04:11 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 08B561002CF for <bug-gnu-emacs@HIDDEN>; Mon, 21 Oct 2019 16:04:10 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1571688250; bh=18B0FzfBdQEix8NasBq59NxnRvs8kFgaxy8JvGReXYk=; h=From:To:Subject:Date:From; b=kSOesySqmhZ2bsGDQluP9lyrLvG6B00UZu2+b1LuMIOit8UHVKYxEYuOuz0BZg2w8 CsSdxNTkuFOx+N2a2LymWWP2e39Y60KGxgCYYiIbKNpvsYZdf5iffSM9WXjrFb+wv9 FOiiKuWIJrLPS5dq0ayQVJGByn527AjafIuu0YsDhnX4V5YYy3fZcCd6YnDJFDDDST xjAy/2Nq0K0r5hECFdV0uhTVvMcro8EAne4kVWIrW2pmrpqvdmma2xaq6XqHDbV2LJ gIlc+XwdzbpOQEQkvzxoLRqd9CJSorNTM1sO1YQju1IQKO7fAJW/rZEXQY4zkIGbqt 9Kun+lAGjrPUg== Received: from alfajor (unknown [216.154.30.71]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A00CF120BB5 for <bug-gnu-emacs@HIDDEN>; Mon, 21 Oct 2019 16:04:09 -0400 (EDT) From: Stefan Monnier <monnier@HIDDEN> To: bug-gnu-emacs@HIDDEN Subject: 27.0.50; Ensure a minimum width for `space` display prop Date: Mon, 21 Oct 2019 16:03:58 -0400 Message-ID: <jwvy2xdams1.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 132.204.25.50 X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) Package: Emacs Version: 27.0.50 For text displayed in columns, alignment is generally obtained with a `display` text-property of the form (space :align-to FOO) This works great when the previous text ends before FOO, but when we mis-calculate (or didn't calculate at all) and the previous text already extends further than the desired alignment of the following text, such space is reduced down to 0 pixels which is often not what we want. Sometimes one can workaround this by placing 2 spaces in the buffer: one with the :align-to and another fixed size space. But it can be cumbersome to do that and it leads to undesirable artifacts (e.g. the cursor can be placed between the two space). So, I'd like to extend our `space` specifications so as to be able to specify a minimum width. I came up with the patch below which lets you write: (space :align-to FOO :min-width BAR) which seems to work fine, but while trying to update the Elisp doc for it I realized that maybe a better option is to extend the acceptable forms for FOO so it can be of the form: (space :align-to (max FOO (+ BAR current-x))) WDYT? Stefan diff --git a/src/xdisp.c b/src/xdisp.c index be1c209553..fd825d2dfe 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -29218,6 +29218,28 @@ append_stretch_glyph (struct it *it, Lisp_Object object, #endif /* HAVE_WINDOW_SYSTEM */ +static int +compute_relative_width (struct it *it, Lisp_Object prop) +{ + struct it it2; + unsigned char *p = BYTE_POS_ADDR (IT_BYTEPOS (*it)); + + it2 = *it; + if (it->multibyte_p) + it2.c = it2.char_to_display = STRING_CHAR_AND_LENGTH (p, it2.len); + else + { + it2.c = it2.char_to_display = *p, it2.len = 1; + if (! ASCII_CHAR_P (it2.c)) + it2.char_to_display = BYTE8_TO_CHAR (it2.c); + } + + it2.glyph_row = NULL; + it2.what = IT_CHARACTER; + PRODUCE_GLYPHS (&it2); + return NUMVAL (prop) * it2.pixel_width; +} + /* Produce a stretch glyph for iterator IT. IT->object is the value of the glyph property displayed. The value must be a list `(space KEYWORD VALUE ...)' with the following KEYWORD/VALUE pairs @@ -29288,23 +29310,7 @@ produce_stretch_glyph (struct it *it) /* Relative width `:relative-width FACTOR' specified and valid. Compute the width of the characters having the `glyph' property. */ - struct it it2; - unsigned char *p = BYTE_POS_ADDR (IT_BYTEPOS (*it)); - - it2 = *it; - if (it->multibyte_p) - it2.c = it2.char_to_display = STRING_CHAR_AND_LENGTH (p, it2.len); - else - { - it2.c = it2.char_to_display = *p, it2.len = 1; - if (! ASCII_CHAR_P (it2.c)) - it2.char_to_display = BYTE8_TO_CHAR (it2.c); - } - - it2.glyph_row = NULL; - it2.what = IT_CHARACTER; - PRODUCE_GLYPHS (&it2); - width = NUMVAL (prop) * it2.pixel_width; + width = compute_relative_width (it, prop); } else if ((prop = Fplist_get (plist, QCalign_to), !NILP (prop)) && calc_pixel_width_or_height (&tem, it, prop, font, true, @@ -29323,6 +29329,21 @@ produce_stretch_glyph (struct it *it) /* Nothing specified -> width defaults to canonical char width. */ width = FRAME_COLUMN_WIDTH (it->f); + if ((prop = Fplist_get (plist, QCmin_width), !NILP (prop)) + && calc_pixel_width_or_height (&tem, it, prop, font, true, 0)) + { + /* Absolute minimum width `:min-width WIDTH' specified and valid. */ + if (width < tem) + width = tem; + } + else if (prop = Fplist_get (plist, QCmin_relative_width), NUMVAL (prop) > 0) + { + /* Relative width `:min-relative-width FACTOR' specified and valid. */ + int tem = compute_relative_width (it, prop); + if (width < tem) + width = tem; + } + if (width <= 0 && (width < 0 || !zero_width_ok_p)) width = 1; @@ -34275,6 +34296,8 @@ syms_of_xdisp (void) DEFSYM (QCalign_to, ":align-to"); DEFSYM (QCrelative_width, ":relative-width"); DEFSYM (QCrelative_height, ":relative-height"); + DEFSYM (QCmin_relative_width, ":min-relative-width"); + DEFSYM (QCmin_width, ":min-width"); DEFSYM (QCeval, ":eval"); DEFSYM (QCpropertize, ":propertize"); DEFSYM (QCfile, ":file");
Stefan Monnier <monnier@HIDDEN>
:bug-gnu-emacs@HIDDEN
.
Full text available.bug-gnu-emacs@HIDDEN
:bug#37858
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.