]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch.el
buttonize signatures as well
[notmuch] / notmuch.el
index cd3780fae8acadd59a3a52514ac52817e16918bb..93f3914fb7ded43b8913a6b7cfcae036e7778102 100644 (file)
 ;
 ; Authors: Carl Worth <cworth@cworth.org>
 
+; 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 <notmuch@notmuchmail.org> (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)