summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2010-03-11 15:04:17 -0800
committerCarl Worth <cworth@cworth.org>2010-03-31 13:32:00 -0700
commitb957a1b029d27c6b2ecd352dbacde3d9d164666f (patch)
tree1444ab34dcd406cb2ffacad2ab71dd8be440e4d5
parente002fe8a7adcc8b8df20107e4617be97983662fa (diff)
emacs: Fix the notmuch-search-authors-width variable.
This variable existed previously, but wasn't actually used for anything.
-rw-r--r--emacs/notmuch.el11
-rw-r--r--lib/thread.cc1
2 files changed, 6 insertions, 6 deletions
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 117a365..439303a 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -1213,7 +1213,7 @@ matching this search term are shown if non-nil. "
(notmuch-show-next-open-message))
)))
-(defvar notmuch-search-authors-width 40
+(defvar notmuch-search-authors-width 20
"Number of columns to use to display authors in a notmuch-search buffer.")
(defvar notmuch-search-mode-map
@@ -1507,11 +1507,12 @@ This function advances the next thread when finished."
(authors-length (length authors))
(subject (match-string 5 string))
(tags (match-string 6 string)))
- (if (> authors-length 40)
- (set 'authors (concat (substring authors 0 (- 40 3)) "...")))
+ (if (> authors-length notmuch-search-authors-width)
+ (set 'authors (concat (substring authors 0 (- notmuch-search-authors-width 3)) "...")))
(goto-char (point-max))
- (let ((beg (point-marker)))
- (insert (format "%s %-7s %-40s %s (%s)\n" date count authors subject tags))
+ (let ((beg (point-marker))
+ (format-string (format "%%s %%-7s %%-%ds %%s (%%s)\n" notmuch-search-authors-width)))
+ (insert (format format-string date count authors subject tags))
(put-text-property beg (point-marker) 'notmuch-search-thread-id thread-id)
(put-text-property beg (point-marker) 'notmuch-search-authors authors)
(put-text-property beg (point-marker) 'notmuch-search-subject subject)
diff --git a/lib/thread.cc b/lib/thread.cc
index ec80f85..1c8b39d 100644
--- a/lib/thread.cc
+++ b/lib/thread.cc
@@ -278,7 +278,6 @@ _notmuch_thread_create (void *ctx,
}
notmuch_query_destroy (thread_id_query);
-
for (messages = notmuch_query_search_messages (matched_query);
notmuch_messages_valid (messages);
notmuch_messages_move_to_next (messages))