X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-lib.el;h=65412821251dfa189e16e8f5274f3755bb4a9111;hb=a7964c86d12558396cda0f297ebf8dcc602bab61;hp=2bf1d2f69ccec3516fdf2a8f9838764db385ae16;hpb=c52fee6bcb3565ce19801b86d83d5783e48df320;p=notmuch diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 2bf1d2f6..65412821 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -130,6 +130,12 @@ For example, if you wanted to remove an \"inbox\" tag and add an (defvar notmuch-common-keymap (let ((map (make-sparse-keymap))) + (define-key map "?" 'notmuch-help) + (define-key map "q" 'notmuch-kill-this-buffer) + (define-key map "s" 'notmuch-search) + (define-key map "m" 'notmuch-mua-new-mail) + (define-key map "=" 'notmuch-refresh-this-buffer) + (define-key map "G" 'notmuch-poll-and-refresh-this-buffer) map) "Keymap shared by all notmuch modes.") @@ -237,6 +243,12 @@ depending on the value of `notmuch-poll-script'." "[No Subject]" subject))) +(defun notmuch-sanitize (str) + "Sanitize control character in STR. + +This includes newlines, tabs, and other funny characters." + (replace-regexp-in-string "[[:cntrl:]\x7f\u2028\u2029]+" " " str)) + (defun notmuch-escape-boolean-term (term) "Escape a boolean term for use in a query.