9front - general discussion about 9front
 help / color / mirror / Atom feed
From: igor@9lab.org
To: 9front@9front.org
Cc: igor@9lab.org
Subject: [9front] [PATCH] Mail: when space is tight use ellipsis (…) instead of 3 dots (...)
Date: Sun, 30 Jul 2023 01:06:11 +0200	[thread overview]
Message-ID: <BBDA5D867B220EF71AA548F49D6A461E@9lab.org> (raw)

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

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

<patch>
From: Igor Böhm <igor@9lab.org>
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

</patch>

[-- Attachment #2: acme-Mail-dots-vs-ellipsis.patch --]
[-- Type: text/plain, Size: 784 bytes --]

From: Igor Böhm <igor@9lab.org>
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

             reply	other threads:[~2023-07-29 23:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-29 23:06 igor [this message]
2023-07-29 23:40 ` ori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BBDA5D867B220EF71AA548F49D6A461E@9lab.org \
    --to=igor@9lab.org \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).