From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 17692 invoked from network); 29 Jul 2023 23:22:33 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 29 Jul 2023 23:22:33 -0000 Received: from mail.9lab.org ([168.119.8.41]) by 9front; Sat Jul 29 19:19:27 -0400 2023 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=9lab.org; s=20210803; t=1690671973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=7mkd7yfZRQO7WSo5nZA1UK226doOMm4rosDZ/XWHG+A=; b=DyFgojJZe1sw+5Lk/P8AiL3B9IobV3FNLZjDyQLhthqfihNKTmHVlz6rCZyKXVR++Yw7Ri 3hlaX/dath/wuNL46pgFjXmkCArdszmNhQyO0PG5yzBNDXr+8qF9Nlf2jqltFZXuykVlBA unPTpQp/l5zkmw1EBfLZZuJDrp3E/20= Received: from rob.9lab.home ( [162.213.162.246]) by mail.9lab.org (OpenSMTPD) with ESMTPSA id 8b792e10 (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256:NO); Sun, 30 Jul 2023 01:06:13 +0200 (CEST) Message-ID: To: 9front@9front.org CC: igor@9lab.org Date: Sun, 30 Jul 2023 01:06:11 +0200 From: igor@9lab.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-nxddenhwsjoaeabgtuzntpfyid" List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: deep-learning-aware API CMS control Subject: [9front] =?utf-8?q?[PATCH]_Mail:_when_space_is_tight_use_ellipsis_(=E2=80=A6)_instead_of_3_dots_(...)?= Reply-To: 9front@9front.org Precedence: bulk This is a multi-part message in MIME format. --upas-nxddenhwsjoaeabgtuzntpfyid Content-Disposition: inline Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Unless there is any objection I would like to merge the below patch aimed at improving usability of acme Mail. See http://mux.9lab.org/img/scratch/acme-Mail-dots-vs-ellipsis.png for an illustration. Please let me know if you disagree. Cheers, Igor From: Igor Böhm Date: Sat, 29 Jul 2023 21:45:26 +0000 Subject: [PATCH] Mail: when space is tight use ellipsis (…) instead of 3 dots (...) … see http://mux.9lab.org/img/scratch/acme-Mail-dots-vs-ellipsis.png as an illustration. --- diff e52c3b4a5ba1574b1ff65e134fb9118fe2a86bba 85d70636e05a86cea32e2babf57e6344ed91da86 --- a/sys/src/cmd/upas/Mail/mbox.c +++ b/sys/src/cmd/upas/Mail/mbox.c @@ -461,8 +461,8 @@ else{ dots = ""; if(utflen(s) > width){ - width -= 3; - dots = "..."; + width -= 1; + dots = "…"; } Bprint(bp, "%*.*s%s", -width, width, s, dots); } @@ -471,7 +471,7 @@ /* * Message format string: * ====================== - * %s: subject + * %s: subject * %f: from address * %F: name + from address * %t: to address --upas-nxddenhwsjoaeabgtuzntpfyid Content-Disposition: attachment; filename=acme-Mail-dots-vs-ellipsis.patch Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit From: Igor Böhm Date: Sat, 29 Jul 2023 21:45:26 +0000 Subject: [PATCH] Mail: when space is tight use ellipsis (…) instead of 3 dots (...) … see http://mux.9lab.org/img/scratch/acme-Mail-dots-vs-ellipsis.png as an illustration. --- diff e52c3b4a5ba1574b1ff65e134fb9118fe2a86bba 85d70636e05a86cea32e2babf57e6344ed91da86 --- a/sys/src/cmd/upas/Mail/mbox.c +++ b/sys/src/cmd/upas/Mail/mbox.c @@ -461,8 +461,8 @@ else{ dots = ""; if(utflen(s) > width){ - width -= 3; - dots = "..."; + width -= 1; + dots = "…"; } Bprint(bp, "%*.*s%s", -width, width, s, dots); } @@ -471,7 +471,7 @@ /* * Message format string: * ====================== - * %s: subject + * %s: subject * %f: from address * %F: name + from address * %t: to address --upas-nxddenhwsjoaeabgtuzntpfyid--