]> git.notmuchmail.org Git - notmuch/commitdiff
notmuch-el: Fix implementation of show/hide-thread-ids.
authorCarl Worth <cworth@cworth.org>
Wed, 4 Nov 2009 00:46:27 +0000 (16:46 -0800)
committerCarl Worth <cworth@cworth.org>
Wed, 4 Nov 2009 00:46:27 +0000 (16:46 -0800)
I'm definitely more comfortable with the add-to-invisibility-spec
now than I was when I first wrote these functions, (which weren't
working at all).

notmuch.el

index 0fb6e5f8a8aa59b7c5f4fe705472721f18f2c5f9..3193ddb411d1188310277beafaf3553b669be56e 100644 (file)
@@ -363,6 +363,7 @@ Does nothing if already on the first message in the buffer."
   (interactive)
   (kill-all-local-variables)
   (make-local-variable 'notmuch-search-query-string)
   (interactive)
   (kill-all-local-variables)
   (make-local-variable 'notmuch-search-query-string)
+  (add-to-invisibility-spec 'notmuch-search)
   (use-local-map notmuch-search-mode-map)
   (setq major-mode 'notmuch-search-mode
        mode-name "notmuch-search")
   (use-local-map notmuch-search-mode-map)
   (setq major-mode 'notmuch-search-mode
        mode-name "notmuch-search")
@@ -391,11 +392,15 @@ Does nothing if already on the first message in the buffer."
 
 (defun notmuch-search-hide-thread-ids ()
   (interactive)
 
 (defun notmuch-search-hide-thread-ids ()
   (interactive)
-  (add-to-invisibility-spec 'notmuch-search))
+  (add-to-invisibility-spec 'notmuch-search)
+  (force-window-update)
+  (redisplay t))
 
 (defun notmuch-search-show-thread-ids ()
   (interactive)
 
 (defun notmuch-search-show-thread-ids ()
   (interactive)
-  (remove-from-invisibility-spec 'notmuch-search))
+  (remove-from-invisibility-spec 'notmuch-search)
+  (force-window-update)
+  (redisplay t))
 
 (defun notmuch-search-show-thread ()
   (interactive)
 
 (defun notmuch-search-show-thread ()
   (interactive)