GNU bug report logs -
#73032
31.0.50; vtable header is not aligned
Previous Next
Full log
Message #16 received at 73032-done <at> debbugs.gnu.org (full text, mbox):
> From: Aleksandr Vityazev <avityazev <at> disroot.org>
> Cc: 73032 <at> 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" <bug-gnu-emacs <at> gnu.org>
> >>
> >> 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.
This bug report was last modified 312 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.