X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch.el;h=93f3914fb7ded43b8913a6b7cfcae036e7778102;hp=cd3780fae8acadd59a3a52514ac52817e16918bb;hb=89f55ab84b77f7b3a58b8ad56734613a2803bc2b;hpb=882a58de5fdfb8500ef3d75189299dadba2c96d0 diff --git a/notmuch.el b/notmuch.el index cd3780fa..93f3914f 100644 --- a/notmuch.el +++ b/notmuch.el @@ -19,6 +19,34 @@ ; ; Authors: Carl Worth +; This is an emacs-based interface to the notmuch mail system. +; +; You will first need to have the notmuch program installed and have a +; notmuch database built in order to use this. See +; http://notmuchmail.org for details. +; +; To install this software, copy it to a directory that is on the +; `load-path' variable within emacs (a good candidate is +; /usr/local/share/emacs/site-lisp). If you are viewing this from the +; notmuch source distribution then you can simply run: +; +; sudo make install-emacs +; +; to install it. +; +; Then, to actually run it, add: +; +; (require 'notmuch) +; +; to your ~/.emacs file, and then run "M-x notmuch" from within emacs, +; or run: +; +; emacs -f notmuch +; +; Have fun, and let us know if you have any comment, questions, or +; kudos: Notmuch list (subscription is not +; required, but is available from http://notmuchmail.org). + (require 'cl) (require 'mm-view) @@ -462,10 +490,17 @@ which this thread was originally shown." (forward-line)) (let ((overlay (make-overlay beg-sub (point)))) (overlay-put overlay 'invisible 'notmuch-show-citation) - (overlay-put overlay 'before-string - (concat indent - "[" (number-to-string (count-lines beg-sub (point))) - "-line citation. Press 'c' to show.]\n"))))) + (let ( + (p (point)) + (cite-button-text (concat "[" (number-to-string (count-lines beg-sub (point))) + "-line citation. Press 'c' to show.]")) + ) + (goto-char (- beg-sub 1)) + (insert (concat "\n" indent)) + (insert-button cite-button-text) + (insert "\n") + (goto-char (+ (length cite-button-text) p)) + )))) (move-to-column depth) (if (looking-at notmuch-show-signature-regexp) (let ((sig-lines (- (count-lines beg-sub end) 1))) @@ -473,11 +508,11 @@ which this thread was originally shown." (progn (overlay-put (make-overlay beg-sub end) 'invisible 'notmuch-show-signature) - (overlay-put (make-overlay beg (- beg-sub 1)) - 'after-string - (concat "\n" indent - "[" (number-to-string sig-lines) - "-line signature. Press 's' to show.]")) + (goto-char (- beg-sub 1)) + (insert (concat "\n" indent)) + (insert-button (concat "[" (number-to-string sig-lines) + "-line signature. Press 's' to show.]")) + (insert "\n") (goto-char end))))) (forward-line)))) @@ -525,7 +560,7 @@ which this thread was originally shown." (let ((beg (point-marker))) (end-of-line) ; Inverse video for subject - (overlay-put (make-overlay beg (point)) 'face '((cons :inverse-video t))) + (overlay-put (make-overlay beg (point)) 'face '(:inverse-video t)) (forward-line 2) (let ((beg-hidden (point-marker))) (re-search-forward notmuch-show-header-end-regexp)