diff options
| author | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2023-03-25 09:52:58 +0200 |
|---|---|---|
| committer | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2023-03-25 09:52:58 +0200 |
| commit | 93336ae17193fe37ddfcc81f2840836926527b47 (patch) | |
| tree | fc648951b879bbef18ba159fa8e3f70a05d0e60b | |
| parent | f3c38118188afcbdab20a8844e948b6b465ec22d (diff) | |
mu4e: remove example with internal function
Shouldn't promote their use.
| -rw-r--r-- | mu4e/mu4e.texi | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/mu4e/mu4e.texi b/mu4e/mu4e.texi index d87c166..e9bcc0f 100644 --- a/mu4e/mu4e.texi +++ b/mu4e/mu4e.texi @@ -2371,33 +2371,18 @@ loading @t{mu4e}): (mu4e-action-retag-message msg (concat "+" target))))) @end lisp -As another example, suppose we would like to ``archive and mark read'' -a message (GMail-style), then we can run the following code (after -loading @t{mu4e}): - -@lisp -(add-to-list 'mu4e-marks - '(archive - :char "A" - :prompt "Archive" - :show-target (lambda (target) "archive") - :action (lambda (docid msg target) - ;; must come before proc-move since retag runs - ;; 'sed' on the file - (mu4e-action-retag-message msg "-\\Inbox") - (mu4e--server-move docid nil "+S-u-N")))) -@end lisp - Adding to @code{mu4e-marks} list allows to use the mark in bulk operations (for example when tagging a whole thread), but does not bind the mark to a key to use at the top-level. This must be done separately. In our example: @lisp -(mu4e~headers-defun-mark-for tag) -(mu4e~headers-defun-mark-for archive) +(defun my-mu4e-mark-add-tag() + "Add a tag to the message." + (interactive) + (mu4e-headers-mark-and-next 'tag)) + (define-key mu4e-headers-mode-map (kbd "g") 'mu4e-headers-mark-for-tag) -(define-key mu4e-headers-mode-map (kbd "A") 'mu4e-headers-mark-for-archive) @end lisp @node Contexts |
