Skip to content

More customizable maildir shortcuts#2292

Merged
djcb merged 2 commits intodjcb:masterfrom
manufactory:master
Dec 28, 2022
Merged

More customizable maildir shortcuts#2292
djcb merged 2 commits intodjcb:masterfrom
manufactory:master

Conversation

@manufactory
Copy link
Copy Markdown
Contributor

  1. Add a :name attribute to mu4e-maildir-shortcuts to display maildirs with long paths nicely
  2. Add support for maildir shortcuts without a :key. Alternatively, allow :key to be a custom string.
    I find a custom string useful for hinting at hydras.
    This implements [Support maildir shortcuts without keys #2110], which has conflicts with the current code.

I also added support for separator lines with titles to categorizes maildirs. Something like

* -- Private --
* [jp]  /private/inbox                                         (n/N)
* -- Work --
* [jw]  /work/inbox                                            (n/N)

I didn't include it since it's quite hackish, but I'd be prepared to clean it up and submit it if interested.

Sorry for opening/closing two other pull requests. I'm not too used to the Github workflow :)

@djcb
Copy link
Copy Markdown
Owner

djcb commented Aug 11, 2022

Nice work.... I'll get back to this once the 1.9.x work starts. Thank you.

Comment thread mu4e/mu4e-main.el
;; menu entry
(mu4e--main-action-str
(concat "\t* [j" key "] " name)
(concat "j" key))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should wrap in mu4e--main-action-str (since at the least it'll make it look like the rest of mu4e's maildir shortcuts that are specified manually with mu4e-maildir-shortcuts)

@llmII
Copy link
Copy Markdown

llmII commented Dec 22, 2022

There are changes needed for mu4e-ask-maildir (like previously in my prior attempt at a PR #2110). Otherwise you'll get (wrong-type-argument characterp nil) for maildirs where the :key is omitted.

EDIT:
Note, it needs more drastic change if one's using the new keys that are strings actually. Since I'm not I wouldn't know what changes... but I would fathom that a string will not match characterp.

Comment thread mu4e/mu4e-main.el
(concat "\t* [j" (string key) "] " name)
(concat "j" (string key))))
((stringp key) (concat "\t* " key " " name))
(t (concat "\t* " name)))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why so many spaces after \t*? I'm only asking as the space amount seems arbitrary, but perhaps for you it gives you the specific way you want it to look or something (for me it doesn't look as great if I were to take 2 of the spaces out).

@djcb djcb merged commit 5609999 into djcb:master Dec 28, 2022
@djcb
Copy link
Copy Markdown
Owner

djcb commented Dec 28, 2022

Merging this, thanks!

@llmII: it looks good for me, but surely we can tweak the details later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants