From 89eb9ee2d0f1476f0a541f4734e7f6f7e0c827a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 8 Dec 2015 20:20:37 +0100 Subject: [PATCH 1/3] mu4e-mark: Make indentation in mu4e-mark-at-point consistent I don't care for this mixing of tabs and spaces, but this at least makes it consistent with the rest of the function. --- mu4e/mu4e-mark.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mu4e/mu4e-mark.el b/mu4e/mu4e-mark.el index 0b21ef09..f32030e8 100644 --- a/mu4e/mu4e-mark.el +++ b/mu4e/mu4e-mark.el @@ -236,8 +236,8 @@ The following marks are available, and the corresponding props: ;; info for the user. (markdesc (cdr (or (assq mark mu4e-marks) (mu4e-error "Invalid mark %S" mark)))) (markkar (plist-get markdesc :char)) - (target (mu4e~mark-get-dyn-target mark target)) - (show-fct (plist-get markdesc :show-target)) + (target (mu4e~mark-get-dyn-target mark target)) + (show-fct (plist-get markdesc :show-target)) (shown-target (if show-fct (funcall show-fct target) (if target (format "%S" target))))) From df77f7cb20d83f1fffef30be99282c16e4f139c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 8 Dec 2015 20:38:25 +0100 Subject: [PATCH 2/3] mu4e-mark: Add ability to use mu4e-use-fancy-chars for marking Right now we have this for showing the status of messages, e.g. whether it has an attachment etc. But not for the "d", "D" etc. in the leftmost column of the headers view. This adds support for that, while bending over backwards to ensure that anyone who's customized this in the past won't have their customizations broken, i.e. like `mu4e-headers-trashed-mark` we can set this to a cons cell of basic/fancy characters, but we also continue to support this just being a string for existing users. The next patch in this series adds a couple of non-ASCII characters to be used for the trash / delete mark. --- mu4e/mu4e-mark.el | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/mu4e/mu4e-mark.el b/mu4e/mu4e-mark.el index f32030e8..94bbf981 100644 --- a/mu4e/mu4e-mark.el +++ b/mu4e/mu4e-mark.el @@ -124,7 +124,13 @@ is either a headers or view buffer." "The list of all the possible marks. This is an alist mapping mark symbols to their properties. The properties are: - :char (string) The character to display in the headers view + :char (string) or (basic . fancy) The character to display in + the headers view. Either a single-character string, or a + dotted-pair cons cell where the second item will be used if + `mu4e-use-fancy-chars' is `t' or `marks', otherwise we'll use + the first one. It can also be a plain string for backwards + compatibility since we didn't always support + `mu4e-use-fancy-chars' here. :prompt (string) The prompt to use when asking for marks (used for example when marking a whole thread) :ask-target (function returning a string) Get the target. This @@ -235,7 +241,14 @@ The following marks are available, and the corresponding props: ;; target (the target folder) the other ones get a pseudo "target", as ;; info for the user. (markdesc (cdr (or (assq mark mu4e-marks) (mu4e-error "Invalid mark %S" mark)))) - (markkar (plist-get markdesc :char)) + (get-markkar + (lambda (char) + (if (listp char) + (if (or (eq mu4e-use-fancy-chars t) + (eq mu4e-use-fancy-chars 'marks)) + (cdr char) (car char)) + char))) + (markkar (funcall get-markkar (plist-get markdesc :char))) (target (mu4e~mark-get-dyn-target mark target)) (show-fct (plist-get markdesc :show-target)) (shown-target (if show-fct From b88cc400e74ed0f8924fe60e5d86eb5c7e7e9c7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 8 Dec 2015 20:40:41 +0100 Subject: [PATCH 3/3] mu4e-mark: Add fancy characters for trash / delete As threatened in my last commit. I found this via https://en.wikipedia.org/wiki/Miscellaneous_Symbols_and_Pictographs & http://www.unicode.org/charts/PDF/U1F300.pdf I could never remember which thing d and D were, this makes it easier to remember that. I split off this patch because maybe this doesn't belong in mu4e since some might not like the characters, but I just wanted to be able to have this customizable. --- mu4e/mu4e-mark.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mu4e/mu4e-mark.el b/mu4e/mu4e-mark.el index 94bbf981..30fa2fed 100644 --- a/mu4e/mu4e-mark.el +++ b/mu4e/mu4e-mark.el @@ -153,7 +153,7 @@ properties are: :dyn-target (lambda (target msg) (mu4e-get-refile-folder msg)) :action (lambda (docid msg target) (mu4e~proc-move docid (mu4e~mark-check-target target) "-N"))) (delete - :char "D" + :char ("D" . "🗙") :prompt "Delete" :show-target (lambda (target) "delete") :action (lambda (docid msg target) (mu4e~proc-remove docid))) @@ -173,7 +173,7 @@ properties are: :show-target (lambda (target) "read") :action (lambda (docid msg target) (mu4e~proc-move docid nil "+S-u-N"))) (trash - :char "d" + :char ("d" . "🗑") :prompt "dtrash" :dyn-target (lambda (target msg) (mu4e-get-trash-folder msg)) :action (lambda (docid msg target) (mu4e~proc-move docid (mu4e~mark-check-target target) "+T-N")))