From b672f6bc1d39959e735fc33accc6afc9ed0a77c8 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Wed, 3 Jun 2020 21:19:12 +0300 Subject: [PATCH] mu4e: avoid trouble with truncate-string-to-width Treatment of the 'ellipsis' parameter is a bit unclear, gave errors in some cases. Fixes #1716 --- mu4e/mu4e-compose.el | 4 +--- mu4e/mu4e-headers.el | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/mu4e/mu4e-compose.el b/mu4e/mu4e-compose.el index 5955b865..3c8cd7af 100644 --- a/mu4e/mu4e-compose.el +++ b/mu4e/mu4e-compose.el @@ -603,9 +603,7 @@ buffers; lets remap its faces so it uses the ones for mu4e." (forward "*forward*") (otherwise "*draft*"))))) (rename-buffer (generate-new-buffer-name - (truncate-string-to-width str - mu4e~compose-buffer-max-name-length - nil nil t) + (truncate-string-to-width str mu4e~compose-buffer-max-name-length) (buffer-name))))) (defun mu4e-compose-crypto-message (parent compose-type) diff --git a/mu4e/mu4e-headers.el b/mu4e/mu4e-headers.el index 88006cd7..af83eaf9 100644 --- a/mu4e/mu4e-headers.el +++ b/mu4e/mu4e-headers.el @@ -681,7 +681,7 @@ found." (defun mu4e~headers-field-truncate-to-width (_msg _field val width) "Truncate VAL to WIDTH." (if width - (truncate-string-to-width val width 0 ?\s t) + (truncate-string-to-width val width 0 ?\s truncate-string-ellipsis) val)) (defvar mu4e~headers-field-handler-functions @@ -1032,7 +1032,7 @@ after the end of the search results." (concat (propertize (if width - (truncate-string-to-width name width 0 ?\s t) + (truncate-string-to-width name width 0 ?\s truncate-string-ellipsis) name) 'face (when arrow 'bold) 'help-echo help