[notmuch] [PATCH] Goto-Address mode hides the body toggle button on messages of zero depth.
pablo at sifflez.org
Wed Dec 30 04:25:40 PST 2009
In this patch we increment depth by one for all messages, so that the
first character of the header is always a space. Without this patch,
the first character may be part of the sender email address, which is
buttonized by Goto-Address minor mode, therefore hiding the
notmuch-button-body-toggle-type button, and forcing us to do an
additional C-e to hit it.
Signed-off-by: Pablo Oliveira <pablo at sifflez.org>
notmuch.el | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/notmuch.el b/notmuch.el
index 97914f2..93f61c5 100644
@@ -774,7 +774,11 @@ and each reply increases depth by 1)."
(if (re-search-forward notmuch-show-message-begin-regexp nil t)
(let ((message-begin (match-beginning 0)))
- (let ((depth (string-to-number (buffer-substring (match-beginning 1) (match-end 1))))
+ ;; We increment depth by one, so that the first character of the header
+ ;; is a space. Before this, the first character was part of the sender
+ ;; email address, which is buttonized by Goto-Address minor mode,
+ ;; therefore hiding the notmuch-button-body-toggle-type button.
+ (let ((depth (1+ (string-to-number (buffer-substring (match-beginning 1) (match-end 1)))))
(match (string= "1" (buffer-substring (match-beginning 2) (match-end 2))))
(setq btn (notmuch-show-markup-header message-begin depth))
More information about the notmuch