Update mailboxes in sidebar
This commit is contained in:
parent
1747b866e2
commit
e8247e225c
@ -547,6 +547,8 @@ Documentation:
|
||||
|
||||
*** Generic
|
||||
#+begin_src conf
|
||||
bind generic Q exit
|
||||
|
||||
bind generic <Return> select-entry
|
||||
bind generic l select-entry
|
||||
|
||||
@ -778,6 +780,7 @@ Use =urlview= to extract urls from the mail.
|
||||
#+begin_src conf
|
||||
macro index,pager S "<pipe-message>$HOME/scripts/mutt-save-org-link.py\n"
|
||||
#+end_src
|
||||
|
||||
**** Link mail to orgmode - Script
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/scripts/mutt-save-org-link.py
|
||||
@ -796,12 +799,13 @@ Use =urlview= to extract urls from the mail.
|
||||
|
||||
# Grab the relevant message headers
|
||||
message_id = urllib.parse.quote(message['message-id'].strip()[1:-1])
|
||||
subject = message['subject'].replace('[', '{').replace(']', '}')
|
||||
subject = message['subject'].replace('[', '{').replace(']', '}').replace('\n', ' ')
|
||||
subject = (subject[:75] + '..') if len(subject) > 75 else subject
|
||||
|
||||
# Ask emacsclient to save a link to the message
|
||||
p = subprocess.Popen([
|
||||
'emacsclient',
|
||||
f'org-protocol://store-link?url=message://{message_id}&title={subject}'
|
||||
f'org-protocol://capture?template=pm&url={message_id}&title={subject}'
|
||||
])
|
||||
|
||||
p.wait()
|
||||
@ -1191,7 +1195,8 @@ This empty code block is used to add a new line after signatude
|
||||
set mail_check_stats
|
||||
|
||||
# Display the Sidebar mailboxes using this format string.
|
||||
set sidebar_format = '%B %?N?(%N)?%* %S'
|
||||
# set sidebar_format = '%B %?N?(%N)?%* %S'
|
||||
set sidebar_format = '%B %* %?N?[%N]?'
|
||||
|
||||
# Sort the mailboxes in the Sidebar using this method:
|
||||
# count - total number of messages
|
||||
@ -1204,26 +1209,43 @@ This empty code block is used to add a new line after signatude
|
||||
|
||||
*** Mailboxes to show in the sidebar.
|
||||
#+BEGIN_SRC conf
|
||||
mailboxes \
|
||||
+search \
|
||||
"+Google" \
|
||||
+gmail/Inbox \
|
||||
+gmail/Archive \
|
||||
+gmail/Drafts \
|
||||
+gmail/Sent \
|
||||
+gmail/Trash \
|
||||
"+ESRF" \
|
||||
+esrf/Inbox \
|
||||
+esrf/Archive \
|
||||
+esrf/Drafts \
|
||||
+esrf/Sent \
|
||||
+esrf/Trash \
|
||||
"+ULG" \
|
||||
+ulg/Inbox \
|
||||
+ulg/Archive \
|
||||
+ulg/Drafts \
|
||||
+ulg/Sent \
|
||||
+ulg/Trash \
|
||||
# mailboxes \
|
||||
# +search \
|
||||
# +gmail/Inbox \
|
||||
# +gmail/Archive \
|
||||
# +gmail/Drafts \
|
||||
# +gmail/Sent \
|
||||
# +gmail/Trash \
|
||||
# +esrf/Inbox \
|
||||
# +esrf/Archive \
|
||||
# +esrf/Drafts \
|
||||
# +esrf/Sent \
|
||||
# +esrf/Trash \
|
||||
# +ulg/Inbox \
|
||||
# +ulg/Archive \
|
||||
# +ulg/Drafts \
|
||||
# +ulg/Sent \
|
||||
# +ulg/Trash \
|
||||
|
||||
named-mailboxes " Search" =search
|
||||
named-mailboxes " GMAIL" =empty/gmail
|
||||
named-mailboxes " Inbox" =gmail/Inbox
|
||||
named-mailboxes " Sent" =gmail/Sent
|
||||
named-mailboxes " Drafts" =gmail/Drafts
|
||||
named-mailboxes " ﮊ Archive" =gmail/Archive
|
||||
named-mailboxes " Trash" =gmail/Trash
|
||||
named-mailboxes " ESRF" =empty/esrf
|
||||
named-mailboxes " Inbox" =esrf/Inbox
|
||||
named-mailboxes " Sent" =esrf/Sent
|
||||
named-mailboxes " Drafts" =esrf/Drafts
|
||||
named-mailboxes " ﮊ Archive" =esrf/Archive
|
||||
named-mailboxes " Trash" =esrf/Trash
|
||||
named-mailboxes " ULG" =empty/ulg
|
||||
named-mailboxes " Inbox" =ulg/Inbox
|
||||
named-mailboxes " Sent" =ulg/Sent
|
||||
named-mailboxes " Drafts" =ulg/Drafts
|
||||
named-mailboxes " ﮊ Archive" =ulg/Archive
|
||||
named-mailboxes " Trash" =ulg/Trash
|
||||
|
||||
set sendmail_wait = 0 # no please don't silently fail, email is important
|
||||
unset move
|
||||
|
Loading…
Reference in New Issue
Block a user