all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#64752: 30.0.50; proced: text-scale-adjust leads to wrong header alignment
@ 2023-07-20 19:43 Matthias Meulien
  2023-07-20 20:12 ` Stephen Berman
  2023-07-21 12:25 ` Eli Zaretskii
  0 siblings, 2 replies; 15+ messages in thread
From: Matthias Meulien @ 2023-07-20 19:43 UTC (permalink / raw)
  To: 64752


Step to reproduce:

1. M-x proced

2. C-x C-- (to call text-scale-adjust)

3. Observe the header text scale has not changed while the columns text
scale has. This leads in wrong alignment of columns labels.

Note that buffer list and bookmark menu don't have this problem.  Would
it make sense to make proced-mode derive tabulate-list-mode?



In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.37, cairo version 1.16.0) of 2023-07-20 built on carbon
Repository revision: 5513f72d3c85ce770a89dc598d2c0b903f0a0b2b
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101007
System Description: Debian GNU/Linux 12 (bookworm)

Configured using:
 'configure --with-json --with-native-compilation --with-x-toolkit=gtk
 --with-tree-sitter'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3
THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2
XPM GTK3 ZLIB

Important settings:
  value of $LANG: fr_FR.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Proced: user by -1PU

Minor modes in effect:
  highlight-changes-visible-mode: t
  breadcrumb-mode: t
  minions-mode: t
  global-company-mode: t
  company-mode: t
  desktop-save-mode: t
  server-mode: t
  pixel-scroll-precision-mode: t
  save-place-mode: t
  electric-pair-mode: t
  icomplete-mode: t
  global-so-long-mode: t
  global-auto-revert-mode: t
  auto-insert-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-layout-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tab-bar-mode: t
  file-name-shadow-mode: t
  context-menu-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  window-divider-mode: t
  buffer-read-only: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/home/matthias/.config/emacs/elpa/dictionary-20201001.1727/dictionary hides /usr/local/share/emacs/30.0.50/lisp/net/dictionary

Features:
(shadow sort gnus-cite mail-extr emacsbug shortdoc misearch
multi-isearch help-fns radix-tree proced gnus-async qp gnus-ml
disp-table gnus-topic nndraft nnmh nnfolder utf-7 epa-file gnus-agent
gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-cache conf-mode
smerge-mode diff add-log log-view pcvs-util modus-operandi-tinted-theme
modus-vivendi-tinted-theme modus-themes css-mode smie rng-xsd xsd-regexp
rng-cmpct rng-nxml rng-valid nxml-mode nxml-outln nxml-rap sgml-mode
facemenu rst mm-archive package-vc lisp-mnt network-stream url-cache
url-http url-auth url-gw nsm finder-inf image-dired image-dired-tags
image-dired-external image-dired-util man hl-line bug-reference
mule-util dired-aux yaml-mode flyspell ox-odt rng-loc rng-uri rng-parse
rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok
nxml-util ox-latex ox-icalendar org-agenda ox-html table ox-ascii
ox-publish ox goto-addr oc-basic org-element org-persist org-id avl-tree
ol-eww eww url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus
nnselect gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig
gnus-sum shr pixel-fill kinsoku url-file svg dom ol-docview doc-view
jka-compr image-mode exif ol-bibtex bibtex ol-bbdb ol-w3m ol-doi
org-link-doi follow display-line-numbers hilit-chg vc-dir vc eglot
external-completion jsonrpc flymake-proc flymake ert ewoc debug
backtrace breadcrumb imenu company-oddmuse company-keywords
company-etags etags fileloop generator xref company-gtags
company-dabbrev-code company-dabbrev company-files company-clang
company-capf company-cmake company-semantic company-template
company-bbdb ob-python python project treesit minions compat company
pcase carbon-custom cus-edit cus-load gnus-demon nntp gnus-group
gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail
mail-source utf7 gnus-spec gnus-win nnoo gnus-int gnus-range message
sendmail yank-media puny rfc822 mml mml-sec epa derived epg rfc6068
epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047
rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus nnheader
gnus-util mail-utils range mm-util mail-prsvr wid-edit gnus-dired
dired-x dired dired-loaddefs org-capture org-refile org ob ob-tangle
ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint org-pcomplete
org-list org-footnote org-faces org-entities ob-emacs-lisp ob-core
ob-eval org-cycle org-table ol org-fold org-fold-core org-keys oc
org-loaddefs find-func cal-menu calendar cal-loaddefs org-compat
org-version org-macs dictionary link connection advice markdown-mode
color thingatpt noutline outline skeleton find-file vc-git diff-mode
easy-mmode vc-dispatcher ispell compile comp comp-cstr warnings icons
cl-extra help-mode desktop frameset server bookmark text-property-search
pp pixel-scroll cua-base saveplace tramp-sh tramp rx tramp-loaddefs
trampver tramp-integration files-x tramp-compat xdg shell pcomplete
comint ansi-osc ring parse-time iso8601 time-date format-spec ansi-color
elec-pair icomplete so-long autorevert filenotify autoinsert cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars
cc-defs generic-x face-remap breadcrumb-autoloads caml-autoloads
company-autoloads csv-mode-autoloads debbugs-autoloads
dockerfile-mode-autoloads flymake-easy-autoloads git-link-autoloads
go-mode-autoloads mallard-mode-autoloads markdown-mode-autoloads
minions-autoloads compat-autoloads modus-themes-autoloads
proof-general-autoloads proof-site proof-autoloads
restclient-jq-autoloads jq-mode-autoloads restclient-autoloads
rfc-mode-autoloads mmm-mode-autoloads terraform-mode-autoloads info
dash-autoloads hcl-mode-autoloads typescript-mode-autoloads
yaml-autoloads yaml-mode-autoloads yasnippet-snippets-autoloads package
browse-url url url-proxy url-privacy url-expand url-methods url-history
url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers
url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache
json subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs
cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify
ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar
make-network-process native-compile emacs)

Memory information:
((conses 16 1395861 245120) (symbols 48 44548 4)
 (strings 32 312942 7071) (string-bytes 1 10284194)
 (vectors 16 150484) (vector-slots 8 3011920 121740)
 (floats 8 1616 1645) (intervals 56 37765 9242) (buffers 984 144))

-- 
Matthias





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#64752: 30.0.50; proced: text-scale-adjust leads to wrong header alignment
  2023-07-20 19:43 bug#64752: 30.0.50; proced: text-scale-adjust leads to wrong header alignment Matthias Meulien
@ 2023-07-20 20:12 ` Stephen Berman
  2023-07-21  6:35   ` Matthias Meulien
  2023-07-21 12:25 ` Eli Zaretskii
  1 sibling, 1 reply; 15+ messages in thread
From: Stephen Berman @ 2023-07-20 20:12 UTC (permalink / raw)
  To: Matthias Meulien; +Cc: 64752

On Thu, 20 Jul 2023 21:43:40 +0200 Matthias Meulien <orontee@gmail.com> wrote:

> Step to reproduce:
>
> 1. M-x proced
>
> 2. C-x C-- (to call text-scale-adjust)
>
> 3. Observe the header text scale has not changed while the columns text
> scale has. This leads in wrong alignment of columns labels.
>
> Note that buffer list and bookmark menu don't have this problem.  Would
> it make sense to make proced-mode derive tabulate-list-mode?

There was some discussion related to this in bug#1779,
e.g. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=1779#79:

  > Thanks, I'll have to find out what Tabulated List mode is doing.
  > I am just wondering: In general, proced was much inspired by dired.
  > Would you suggest that dired should likewise use Tabulated List mode?

  T-L mode is not suitable for Dired, because not every line is an
  "entry", i.e. the first two summary lines---which are also the reason
  why Dired does not use the header line.  Other Dired features, like
  showing multiple directories, also break T-L mode assumptions.

Steve Berman





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#64752: 30.0.50; proced: text-scale-adjust leads to wrong header alignment
  2023-07-20 20:12 ` Stephen Berman
@ 2023-07-21  6:35   ` Matthias Meulien
  2023-07-21  7:47     ` Eli Zaretskii
  0 siblings, 1 reply; 15+ messages in thread
From: Matthias Meulien @ 2023-07-21  6:35 UTC (permalink / raw)
  To: Stephen Berman; +Cc: 64752

[-- Attachment #1: Type: text/plain, Size: 444 bytes --]

Stephen Berman <stephen.berman@gmx.net> writes:

> There was some discussion related to this in bug#1779,
> e.g. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=1779#79:

Thanks for the reference.

It's clear to me that tabulated-list-mode is not suitable to Dired
buffers but I failed to understand why it's also not suitable for
proced...

By the way, there's no need to play with text-scale-adjust to see
alignment problems in proced buffer:


[-- Attachment #2: Capture d’écran du 2023-07-21 08-30-39.png --]
[-- Type: image/png, Size: 470634 bytes --]

[-- Attachment #3: Type: text/plain, Size: 13 bytes --]

-- 
Matthias

^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#64752: 30.0.50; proced: text-scale-adjust leads to wrong header alignment
  2023-07-21  6:35   ` Matthias Meulien
@ 2023-07-21  7:47     ` Eli Zaretskii
  2023-07-21 12:26       ` Eli Zaretskii
  2023-07-21 14:21       ` Matthias Meulien
  0 siblings, 2 replies; 15+ messages in thread
From: Eli Zaretskii @ 2023-07-21  7:47 UTC (permalink / raw)
  To: Matthias Meulien; +Cc: stephen.berman, 64752

> Cc: 64752@debbugs.gnu.org
> From: Matthias Meulien <orontee@gmail.com>
> Date: Fri, 21 Jul 2023 08:35:19 +0200
> 
> By the way, there's no need to play with text-scale-adjust to see
> alignment problems in proced buffer:

That's obviously a separate problem, right?





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#64752: 30.0.50; proced: text-scale-adjust leads to wrong header alignment
  2023-07-20 19:43 bug#64752: 30.0.50; proced: text-scale-adjust leads to wrong header alignment Matthias Meulien
  2023-07-20 20:12 ` Stephen Berman
@ 2023-07-21 12:25 ` Eli Zaretskii
  2023-07-21 14:27   ` Matthias Meulien
  1 sibling, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2023-07-21 12:25 UTC (permalink / raw)
  To: Matthias Meulien; +Cc: 64752

> From: Matthias Meulien <orontee@gmail.com>
> Date: Thu, 20 Jul 2023 21:43:40 +0200
> 
> 1. M-x proced
> 
> 2. C-x C-- (to call text-scale-adjust)
> 
> 3. Observe the header text scale has not changed while the columns text
> scale has. This leads in wrong alignment of columns labels.

Thanks, should be fixed now on the master branch.  (The fix includes a
change in the display engine, as one of the sub-features of the
:align-to display spec turned out to have a subtle bug which affected
the fix of the Proced display.)

In general, the main reason for this bug is that we don't by default
remap the header-line face (because many Lisp programs don't want
that) under text-scale-adjust.  If a Lisp program wants the
header-line to be scaled together with buffer text, it should request
that explicitly by setting text-scale-remap-header-line non-nil.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#64752: 30.0.50; proced: text-scale-adjust leads to wrong header alignment
  2023-07-21  7:47     ` Eli Zaretskii
@ 2023-07-21 12:26       ` Eli Zaretskii
  2023-07-21 19:14         ` Laurence Warne
  2023-07-21 14:21       ` Matthias Meulien
  1 sibling, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2023-07-21 12:26 UTC (permalink / raw)
  To: Laurence Warne; +Cc: stephen.berman, orontee, 64752

> Cc: stephen.berman@gmx.net, 64752@debbugs.gnu.org
> Date: Fri, 21 Jul 2023 10:47:54 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> 
> > Cc: 64752@debbugs.gnu.org
> > From: Matthias Meulien <orontee@gmail.com>
> > Date: Fri, 21 Jul 2023 08:35:19 +0200
> > 
> > By the way, there's no need to play with text-scale-adjust to see
> > alignment problems in proced buffer:
> 
> That's obviously a separate problem, right?

Laurence, could you please look into fixing this mis-alignment?

Thanks.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#64752: 30.0.50; proced: text-scale-adjust leads to wrong header alignment
  2023-07-21  7:47     ` Eli Zaretskii
  2023-07-21 12:26       ` Eli Zaretskii
@ 2023-07-21 14:21       ` Matthias Meulien
  1 sibling, 0 replies; 15+ messages in thread
From: Matthias Meulien @ 2023-07-21 14:21 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: stephen.berman, 64752

Eli Zaretskii <eliz@gnu.org> writes:

>> Cc: 64752@debbugs.gnu.org
>> From: Matthias Meulien <orontee@gmail.com>
>> Date: Fri, 21 Jul 2023 08:35:19 +0200
>> 
>> By the way, there's no need to play with text-scale-adjust to see
>> alignment problems in proced buffer:
>
> That's obviously a separate problem, right?

Yes, sorry for mixing problems.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#64752: 30.0.50; proced: text-scale-adjust leads to wrong header alignment
  2023-07-21 12:25 ` Eli Zaretskii
@ 2023-07-21 14:27   ` Matthias Meulien
  2023-07-21 14:38     ` Eli Zaretskii
  0 siblings, 1 reply; 15+ messages in thread
From: Matthias Meulien @ 2023-07-21 14:27 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 64752

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Matthias Meulien <orontee@gmail.com>
>> Date: Thu, 20 Jul 2023 21:43:40 +0200
>> 
>> 1. M-x proced
>> 
>> 2. C-x C-- (to call text-scale-adjust)
>> 
>> 3. Observe the header text scale has not changed while the columns text
>> scale has. This leads in wrong alignment of columns labels.
>
> Thanks, should be fixed now on the master branch.

I confirm.  Thanks!





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#64752: 30.0.50; proced: text-scale-adjust leads to wrong header alignment
  2023-07-21 14:27   ` Matthias Meulien
@ 2023-07-21 14:38     ` Eli Zaretskii
  0 siblings, 0 replies; 15+ messages in thread
From: Eli Zaretskii @ 2023-07-21 14:38 UTC (permalink / raw)
  To: Matthias Meulien; +Cc: 64752

> From: Matthias Meulien <orontee@gmail.com>
> Cc: 64752@debbugs.gnu.org
> Date: Fri, 21 Jul 2023 16:27:59 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> From: Matthias Meulien <orontee@gmail.com>
> >> Date: Thu, 20 Jul 2023 21:43:40 +0200
> >> 
> >> 1. M-x proced
> >> 
> >> 2. C-x C-- (to call text-scale-adjust)
> >> 
> >> 3. Observe the header text scale has not changed while the columns text
> >> scale has. This leads in wrong alignment of columns labels.
> >
> > Thanks, should be fixed now on the master branch.
> 
> I confirm.  Thanks!

Thanks for testing the solution.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#64752: 30.0.50; proced: text-scale-adjust leads to wrong header alignment
  2023-07-21 12:26       ` Eli Zaretskii
@ 2023-07-21 19:14         ` Laurence Warne
  2023-07-22  5:19           ` Eli Zaretskii
  2023-07-22  7:09           ` Matthias Meulien
  0 siblings, 2 replies; 15+ messages in thread
From: Laurence Warne @ 2023-07-21 19:14 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: stephen.berman, orontee, 64752

[-- Attachment #1: Type: text/plain, Size: 169 bytes --]

Hi,

I'm having issues viewing the image Matthias shared earlier in the thread.
Would someone be able to attach another or provide steps to reproduce?

Thanks, Laurence

[-- Attachment #2: Type: text/html, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#64752: 30.0.50; proced: text-scale-adjust leads to wrong header alignment
  2023-07-21 19:14         ` Laurence Warne
@ 2023-07-22  5:19           ` Eli Zaretskii
  2023-07-22  7:09           ` Matthias Meulien
  1 sibling, 0 replies; 15+ messages in thread
From: Eli Zaretskii @ 2023-07-22  5:19 UTC (permalink / raw)
  To: Laurence Warne; +Cc: stephen.berman, orontee, 64752

[-- Attachment #1: Type: text/plain, Size: 354 bytes --]

> From: Laurence Warne <laurencewarne@gmail.com>
> Date: Fri, 21 Jul 2023 20:14:27 +0100
> Cc: orontee@gmail.com, stephen.berman@gmx.net, 64752@debbugs.gnu.org
> 
> I'm having issues viewing the image Matthias shared earlier in the thread.  Would someone be able to
> attach another or provide steps to reproduce?

I'm attaching that image again below.


[-- Attachment #2: Capture d’écran du 2023-07-21 08-30-39.png --]
[-- Type: image/png, Size: 470634 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#64752: 30.0.50; proced: text-scale-adjust leads to wrong header alignment
  2023-07-21 19:14         ` Laurence Warne
  2023-07-22  5:19           ` Eli Zaretskii
@ 2023-07-22  7:09           ` Matthias Meulien
  2023-07-22 14:32             ` Laurence Warne
  1 sibling, 1 reply; 15+ messages in thread
From: Matthias Meulien @ 2023-07-22  7:09 UTC (permalink / raw)
  To: Laurence Warne; +Cc: Eli Zaretskii, stephen.berman, 64752

Laurence Warne <laurencewarne@gmail.com> writes:

> Hi,
>
> I'm having issues viewing the image Matthias shared earlier in the thread.  Would someone be able to attach another
> or provide steps to reproduce?

I have not read proced implementation but my understanding is that
entries length depend on the locale.

If you have french locale installed, I guess you can try M-x proced in
Emacs started with:

  LANG=fr_FR.UTF-8 emacs -Q 

Then if you computer uptime is greater than 1 day, the start column of
proced may display durations expressed in hours, minutes, seconds or
using an abbreviated date.  But the length of abbreviated dates depends
on the locale...

Note the impact of the locale on abbreviated month length:

matthias@carbon:~/Sources/emacs$ LANG=en_US.UTF-8 date +%b
Jul
matthias@carbon:~/Sources/emacs$ LANG=fr_FR.UTF-8 date +%b
juil.

and even, for a given locale, but different months:

matthias@carbon:~/Sources/emacs$ LANG=fr_FR.UTF-8 date +%b --date="2023-02-22T08:55:06"
févr.
matthias@carbon:~/Sources/emacs$ LANG=fr_FR.UTF-8 date +%b --date="2023-03-22T08:55:06"
mars

Hope it helps.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#64752: 30.0.50; proced: text-scale-adjust leads to wrong header alignment
  2023-07-22  7:09           ` Matthias Meulien
@ 2023-07-22 14:32             ` Laurence Warne
  2023-07-22 20:44               ` Matthias Meulien
  0 siblings, 1 reply; 15+ messages in thread
From: Laurence Warne @ 2023-07-22 14:32 UTC (permalink / raw)
  To: Matthias Meulien; +Cc: Eli Zaretskii, stephen.berman, 64752


[-- Attachment #1.1: Type: text/plain, Size: 1025 bytes --]

Thanks both, I've attached a patch which should hopefully fix the problem
(and an image of what I get after applying the patch).  Previously, it was
assumed by proced-grammar-alist that the function proced-format-start would
always return a string of length six which is not the case as shown above.

The patch fixes this by changing the justify attribute of 'Start' in
proced-grammar-alist to 'left' instead of '6' (a fixed number means the
attribute widths should always be this value - see the doc of
proced-grammar-alist for more info).

I don't think JUSTIFY supports 'center' which I think would be nicer in
this situation, perhaps this could be done in a future patch.  AFAICS the
only other use of a fixed value for justify is the 'nice' attribute, but I
think this 3 char limit will always hold, at least for nix systems.  Do you
experience formatting issues for any column other than 'Start' Matthias?

I've also found another source of flakiness for the proced tests, but
that's another issue (:

Thanks, Laurence

[-- Attachment #1.2: Type: text/html, Size: 1233 bytes --]

[-- Attachment #2: 0001-Fix-Proced-Start-column-alignment-for-different-loca.patch --]
[-- Type: text/x-patch, Size: 1608 bytes --]

From 24d01c3cfcfd6a833fdeffb09ec6036e4affdc26 Mon Sep 17 00:00:00 2001
From: Laurence Warne <laurencewarne@gmail.com>
Date: Sat, 22 Jul 2023 14:35:15 +0100
Subject: [PATCH] Fix Proced Start column alignment for different locales

* lisp/proced.el (proced-grammar-alist): Change the justify value of
the start attribute to left from the fixed value of six.
(Bug#64752)
(proced-format-start): Remove the assertion that the returned string
will always be of length six from the docstring.
---
 lisp/proced.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lisp/proced.el b/lisp/proced.el
index b3d581a49d1..47de74b0ecb 100644
--- a/lisp/proced.el
+++ b/lisp/proced.el
@@ -152,7 +152,7 @@ proced-grammar-alist
     (pri     "Pr"      "%d" right proced-< t (pri pid) (nil t t))
     (nice    "Ni"      "%3d" 3 proced-< t (nice pid) (t t nil))
     (thcount "THCount" "%d" right proced-< t (thcount pid) (nil t t))
-    (start   "Start"   proced-format-start 6 proced-time-lessp nil (start pid)
+    (start   "Start"   proced-format-start left proced-time-lessp nil (start pid)
                        (t t nil))
     (vsize   "VSize"   proced-format-memory right proced-< t (vsize pid)
                        (nil t t))
@@ -1599,8 +1599,7 @@ proced-format-time
            (format "%02d%s%02d" minutes colon seconds)))))
 
 (defun proced-format-start (start)
-  "Format time START.
-The return string is always 6 characters wide."
+  "Format time START."
   (let ((d-start (decode-time start))
         (d-current (decode-time))
         (colon (if proced-enable-color-flag
-- 
2.30.2


[-- Attachment #3: proced-start-formatting.png --]
[-- Type: image/png, Size: 79686 bytes --]

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* bug#64752: 30.0.50; proced: text-scale-adjust leads to wrong header alignment
  2023-07-22 14:32             ` Laurence Warne
@ 2023-07-22 20:44               ` Matthias Meulien
  2023-07-23  6:42                 ` Eli Zaretskii
  0 siblings, 1 reply; 15+ messages in thread
From: Matthias Meulien @ 2023-07-22 20:44 UTC (permalink / raw)
  To: Laurence Warne; +Cc: Eli Zaretskii, stephen.berman, 64752

Laurence Warne <laurencewarne@gmail.com> writes:

> Thanks both, I've attached a patch which should hopefully fix the
> problem (and an image of what I get after applying the patch).  (...)

I confirm that, after applying your patch to commit b9a910a701a to
master branch, the problem is fixed.

Thank you!





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#64752: 30.0.50; proced: text-scale-adjust leads to wrong header alignment
  2023-07-22 20:44               ` Matthias Meulien
@ 2023-07-23  6:42                 ` Eli Zaretskii
  0 siblings, 0 replies; 15+ messages in thread
From: Eli Zaretskii @ 2023-07-23  6:42 UTC (permalink / raw)
  To: Matthias Meulien; +Cc: laurencewarne, stephen.berman, 64752-done

> From: Matthias Meulien <orontee@gmail.com>
> Cc: Eli Zaretskii <eliz@gnu.org>,  stephen.berman@gmx.net,
>   64752@debbugs.gnu.org
> Date: Sat, 22 Jul 2023 22:44:20 +0200
> 
> Laurence Warne <laurencewarne@gmail.com> writes:
> 
> > Thanks both, I've attached a patch which should hopefully fix the
> > problem (and an image of what I get after applying the patch).  (...)
> 
> I confirm that, after applying your patch to commit b9a910a701a to
> master branch, the problem is fixed.

Thanks, installed on the master branch, and closing the bug.





^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-07-23  6:42 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-20 19:43 bug#64752: 30.0.50; proced: text-scale-adjust leads to wrong header alignment Matthias Meulien
2023-07-20 20:12 ` Stephen Berman
2023-07-21  6:35   ` Matthias Meulien
2023-07-21  7:47     ` Eli Zaretskii
2023-07-21 12:26       ` Eli Zaretskii
2023-07-21 19:14         ` Laurence Warne
2023-07-22  5:19           ` Eli Zaretskii
2023-07-22  7:09           ` Matthias Meulien
2023-07-22 14:32             ` Laurence Warne
2023-07-22 20:44               ` Matthias Meulien
2023-07-23  6:42                 ` Eli Zaretskii
2023-07-21 14:21       ` Matthias Meulien
2023-07-21 12:25 ` Eli Zaretskii
2023-07-21 14:27   ` Matthias Meulien
2023-07-21 14:38     ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.