* mu4e: add an 'about mu4e' item to the main view

This commit is contained in:
djcb 2012-06-15 09:57:48 +03:00
parent 2367ab2d67
commit 62efed8772
5 changed files with 61 additions and 4 deletions

View File

@ -38,4 +38,16 @@ dist_lisp_LISP= \
mu4e.el \
org-mu4e.el
EXTRA_DIST=$(elisp_DATA)
BUILT_SOURCES= \
mu4e-about.el
mu4e-about.el: mu4e-about.org
@echo ";; auto-generated" > mu4e-about.el
@echo -n "(defconst mu4e-about \"" >> mu4e-about.el
@sed 's/"/\\"/g' < mu4e-about.org >> mu4e-about.el
@echo "\" \"About mu4e.\")" >> mu4e-about.el
@echo "(provide 'mu4e-about)" >> mu4e-about.el
EXTRA_DIST=$(elisp_DATA) mu4e-about.org
CLEANFILES=*.elc ${BUILT_SOURCES}

18
emacs/mu4e-about.org Normal file
View File

@ -0,0 +1,18 @@
* About mu4e
*mu4e* is an emacs e-mail client based on the [[http://djcbsoftware.nl/code/mu][mu]] email search engine. It was
written & designed by /Dirk-Jan C. Binnema/, with contributions from others.
*mu4e* and *mu* are free software, licensed under the terms of the [[http://www.gnu.org/licenses/gpl-3.0.html][GNU GPLv3]].
You can get the code from [[https://github.com/djcb/mu][the git repository]]; there, you can also [[https://github.com/djcb/mu/issues][file bugs
and feature requests]].
*mu4e* has its own [[info:mu4e][manual]], which includes an [[info:mu4e#FAQ%20-%20Frequently%20Anticipated%20Questions][FAQ]]. If that is not enough,
there's also the [[http://groups.google.com/group/mu-discuss][mu mailing list]].
[Press *q* to quit this buffer]
# Local Variables:
# mode: org; org-startup-folded: nil
# End:

View File

@ -25,6 +25,7 @@
;;; Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(require 'mu4e-utils) ;; utility functions
(require 'mu4e-about)
(defconst mu4e~main-buffer-name "*mu4e-main*"
"*internal* Name of the mu4e main view buffer.")
@ -129,7 +130,7 @@ clicked."
'smtpmail-send-queued-mail))
"")
"\n"
(mu4e~main-action-str "\t* [A]bout mu4e\n" 'mu4e~main-about)
(mu4e~main-action-str "\t* [H]elp\n" 'mu4e-display-manual)
(mu4e~main-action-str "\t* [q]uit\n" 'mu4e-quit))
(mu4e-main-mode)
@ -148,5 +149,22 @@ clicked."
(if smtpmail-queue-mail "queued" "sent directly")))
(mu4e~main-view))
(defconst mu4e~main-about-buffer-name "*mu4e-about*"
"Name for the mu4e-about buffer.")
(defun mu4e~main-about ()
"Create a buffer with the mu4e-about text."
(interactive)
(with-current-buffer
(get-buffer-create mu4e~main-about-buffer-name)
(let ((inhibit-read-only t))
(erase-buffer)
(insert mu4e-about)
(org-mode)))
(switch-to-buffer mu4e~main-about-buffer-name)
(setq buffer-read-only t)
(local-set-key "q" 'bury-buffer)
(goto-char (point-min)))
(provide 'mu4e-main)

View File

@ -81,7 +81,6 @@ where
"Clear the marks subsystem."
(clrhash mu4e~mark-map))
(defun mu4e-mark-at-point (mark &optional target)
"Mark (or unmark) message at point. MARK specifies the
mark-type. For `move'-marks there is also the TARGET argument,
@ -160,6 +159,13 @@ headers in the region."
;; just a single message
(mu4e-mark-at-point mark target)))
(defun mu4e-mark-restore (docid)
"Restore the visual mark for the message with DOCID."
(let ((markcell (gethash docid mu4e~mark-map)))
(when markcell
(save-excursion
(when (mu4e~headers-goto-docid docid)
(mu4e-mark-at-point (car markcell) (cdr markcell)))))))
(defun mu4e-mark-for-move-set (&optional target)
"Mark message at point or, if region is active, all messages in
@ -300,5 +306,6 @@ action', return nil means 'don't do anything'"
(when (eq what 'apply)
(mu4e-mark-execute-all t))))))))
(provide 'mu4e-mark)
;; End of mu4e-mark.el

View File

@ -424,6 +424,7 @@ This looks something like the following:
* toggle [m]ail sending mode (direct)
* [f]lush queued mail
* [A]bout mu4e
* [H]elp
* [q]uit mu4e
----------------------------------------------------------------------------
@ -467,6 +468,7 @@ database; @pxref{Indexing your messages}. See @ref{Getting mail} for details.
mail directly, and queuing it first (for example, when you are offline), and
@t{[f]lush queued mail} will flush any queued mail. This item is visible only
if you have actually set up mail-queuing. @ref{Queuing mail}.
@item @t{[A]bout mu4e} will give some general information about @t{mu4e}.
@item @t{[H]elp} will show help information for this view.
@item Finally, @t{[q]uit mu4e} will quit @t{mu4e}.
@end itemize