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.bugs Subject: bug#73032: 31.0.50; vtable header is not aligned Date: Sat, 07 Sep 2024 11:28:37 +0300 Message-ID: <86wmjnyiiy.fsf@gnu.org> References: <87cyljt4w5.fsf@disroot.org> <86mskm4knp.fsf@gnu.org> <878qw6t5py.fsf@disroot.org> 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="35396"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73032-done@debbugs.gnu.org To: Aleksandr Vityazev Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 07 10:29:20 2024 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 1smqoq-00097P-IU for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Sep 2024 10:29:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smqoZ-0007G9-7H; Sat, 07 Sep 2024 04:29:03 -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 1smqoX-0007Fa-M6 for bug-gnu-emacs@gnu.org; Sat, 07 Sep 2024 04:29:01 -0400 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 1smqoX-0005EG-DH for bug-gnu-emacs@gnu.org; Sat, 07 Sep 2024 04:29:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=+RCYVwtQxm7KWy9ApNXYF+HjMSPGZLaKvUCxdK6uMwk=; b=CAKDv7EePmmtvTpnlIfOlEnZsvckgbboBHDUSYIhjOKGhDyk+wsZ242qxVp/e1hoB22QHB/AgBz3i5IVszxuRkeAGmQEyMfM+hS5Ha/Mrckf87WEiGM1biQpwvawqVzv3JP77YOLyf2hMrXHu7i5o2GVxy2KoaqZHUdRHMlWHqxpn77Ps4kt3hMVXonGxlGrbkiN4bU4qtojKC6m+UEArOvW9vx38Z/0vVySQjwZ+Oi417ZVxRrSLMq7tmXKDrLFt4hagPVhQDwpDW7ogKiiu486TLMsRSoagkj47ln3TgbPmC8lMGBdnxwt665ZiX7YnLOkpt3Pos2IHEgExk6bTA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1smqoX-0004Dm-PE for bug-gnu-emacs@gnu.org; Sat, 07 Sep 2024 04:29:01 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Sep 2024 08:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 73032 X-GNU-PR-Package: emacs Mail-Followup-To: 73032@debbugs.gnu.org, eliz@gnu.org, avityazev@disroot.org Original-Received: via spool by 73032-done@debbugs.gnu.org id=D73032.172569772916201 (code D ref 73032); Sat, 07 Sep 2024 08:29:01 +0000 Original-Received: (at 73032-done) by debbugs.gnu.org; 7 Sep 2024 08:28:49 +0000 Original-Received: from localhost ([127.0.0.1]:54775 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smqoL-0004DE-0o for submit@debbugs.gnu.org; Sat, 07 Sep 2024 04:28:49 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smqoJ-0004D0-BC for 73032-done@debbugs.gnu.org; Sat, 07 Sep 2024 04:28:47 -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 1smqoC-0005C0-RV; Sat, 07 Sep 2024 04:28:40 -0400 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=+RCYVwtQxm7KWy9ApNXYF+HjMSPGZLaKvUCxdK6uMwk=; b=OaxZIdSQzn0Tij9sd0+g L5KzB7pnpjpif+dcUJScHg8vuNqvi3w8iFbAPKOI0mRwLA0lsKFwwXVnpp1KiSA2yQwA4ETYmxs/7 WUun5+JNLgKozmqEpwWmo28hTmNfuIJXO9kUjCi5YnTspNSX9pui8RALMHrWRBXBX4dTDa+20x5tl +wPM5W44dIk3OdbsP8M1F/eiFE+XjeoaBQs8NtYl5aQ2NR+TQK86z7QL9+j8YAhAOXBClT6wzv82x L8mZnRw7XI2o4yyU6FhoVYoVFxK449T4WR9x6++cZjlHnEN5dDt+f2hBpWPb0UfrrfUzkZUaHtig5 5niabe6jtd0q6w==; In-Reply-To: <878qw6t5py.fsf@disroot.org> (message from Aleksandr Vityazev on Thu, 05 Sep 2024 19:39:37 +0300) 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:291365 Archived-At: > From: Aleksandr Vityazev > Cc: 73032@debbugs.gnu.org > Date: Thu, 05 Sep 2024 19:39:37 +0300 > > On 2024-09-05 10:36, Eli Zaretskii wrote: > > >> Date: Thu, 05 Sep 2024 01:45:14 +0300 > >> From: Aleksandr Vityazev via "Bug reports for GNU Emacs, > >> the Swiss army knife of text editors" > >> > >> There is a problem in vtable.el when an emoji is specified as a delimiter; the > >> header and row delimiters are not aligned. > >> > >> Minimal reproducer for emacs -Q: > >> > >> (require 'vtable) > >> (with-current-buffer (get-buffer-create "*test*") > >> (make-vtable > >> :columns '((:name "Name" :width 20) "Size" "File") > >> :objects (buffer-list) > >> :actions '("k" kill-buffer > >> "RET" display-buffer) > >> :divider " 🍉 " > >> :getter (lambda (object column vtable) > >> (pcase (vtable-column vtable column) > >> ("Name" (buffer-name object)) > >> ("Size" (buffer-size object)) > >> ("File" (or (buffer-file-name object) ""))))) > >> (switch-to-buffer "*test*")) > >> > >> Screenshot is attached. > > > > I cannot get them aligned even if I replace the Emoji character with > > an ASCII character, like 'x'. Can you? > No, I can't. > > > AFAICT, there's inconsistency in whitespace calculation between the > > header line and the body of the table, due to the desire to display > > the sorting indicator not quite right-aligned. The patch below > > attempts to fix that; does it give good results? > > The patch helped, but there are still some issues. I was able to achieve > alignment with the following settings: > (set-face-attribute 'default nil :family "monospace" :height 210) > > With: (set-face-attribute 'default nil :family "monospace" :height 220) > the header separators are also misaligned. My patch is based on the one > that was sent; I just commented out the insertion of an extra space > after the column name. Thanks, I've now installed the changes with your modification, and I'm therefore closing this bug.