Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 4B6A240DBC8 for ; Mon, 15 Nov 2010 06:24:25 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IPsbRgGfK9+r for ; Mon, 15 Nov 2010 06:24:13 -0800 (PST) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) by olra.theworths.org (Postfix) with ESMTP id 954AC40DDC5 for ; Mon, 15 Nov 2010 06:24:13 -0800 (PST) Received: by wwb31 with SMTP id 31so2625817wwb.2 for ; Mon, 15 Nov 2010 06:24:12 -0800 (PST) Received: by 10.227.196.74 with SMTP id ef10mr6159653wbb.18.1289831052078; Mon, 15 Nov 2010 06:24:12 -0800 (PST) Received: from ut.hh.sledj.net (host81-149-164-25.in-addr.btopenworld.com [81.149.164.25]) by mx.google.com with ESMTPS id ga16sm18127wbb.1.2010.11.15.06.24.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 15 Nov 2010 06:24:11 -0800 (PST) Received: by ut.hh.sledj.net (Postfix, from userid 1000) id 80984594056; Mon, 15 Nov 2010 14:21:54 +0000 (GMT) From: David Edmondson To: notmuch@notmuchmail.org Subject: [PATCH] emacs: Use `view-mode' when examining raw messages. Date: Mon, 15 Nov 2010 14:21:53 +0000 Message-Id: <1289830913-9650-1-git-send-email-dme@dme.org> X-Mailer: git-send-email 1.7.2.3 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 14:24:25 -0000 --- emacs/notmuch-show.el | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index c9d086c..cd35f48 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -1048,11 +1048,13 @@ any effects from previous calls to (defun notmuch-show-view-raw-message () "View the file holding the current message." (interactive) - (let ((id (notmuch-show-get-message-id))) - (let ((buf (get-buffer-create (concat "*notmuch-raw-" id "*")))) - (switch-to-buffer buf) - (save-excursion - (call-process notmuch-command nil t nil "show" "--format=raw" id))))) + (let* ((id (notmuch-show-get-message-id)) + (buf (get-buffer-create (concat "*notmuch-raw-" id "*")))) + (call-process notmuch-command nil buf nil "show" "--format=raw" id) + (switch-to-buffer buf) + (goto-char (point-min)) + (set-buffer-modified-p nil) + (view-buffer buf 'kill-buffer-if-not-modified))) (defun notmuch-show-pipe-message (entire-thread command) "Pipe the contents of the current message (or thread) to the given command. -- 1.7.2.3