From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 333FC431FD7 for ; Fri, 12 Dec 2014 11:10:06 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0.001 X-Spam-Level: X-Spam-Status: No, score=0.001 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled 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 8+72mp1DlgnN for ; Fri, 12 Dec 2014 11:10:02 -0800 (PST) X-Greylist: delayed 920 seconds by postgrey-1.32 at olra; Fri, 12 Dec 2014 11:10:02 PST Received: from smtpo.poczta.interia.pl (smtpo.poczta.interia.pl [217.74.65.154]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id B837C431FBC for ; Fri, 12 Dec 2014 11:10:02 -0800 (PST) X-Interia-R: Interia X-Interia-R-IP: 89.65.17.18 X-Interia-R-Helo: Received: from localhost (89-65-17-18.dynamic.chello.pl [89.65.17.18]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by www.poczta.fm (INTERIA.PL) with ESMTPSA; Fri, 12 Dec 2014 19:54:36 +0100 (CET) From: =?UTF-8?q?=C5=81ukasz=20Stelmach?= To: notmuch@notmuchmail.org Subject: [PATCH] emacs: do not change users' mail agent configuration Date: Fri, 12 Dec 2014 19:54:26 +0100 Message-Id: <1418410466-26604-1-git-send-email-stlman@poczta.fm> X-Mailer: git-send-email 2.0.4 X-Interia-Antivirus: OK X-IPL-SAS-SPAS: -4.4 X-IPL-SAS-UREP: 0 X-IPL-Envelope-To: stlman@poczta.fm DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=interia.pl; s=biztos; t=1418410479; bh=L1FgsJxwDdqUKfuvGPJU7YVZWscisuvHX8Vf67dpuBY=; h=X-Interia-R:X-Interia-R-IP:X-Interia-R-Helo:From:To:Cc:Subject: Date:Message-Id:X-Mailer:X-Interia-Antivirus:X-IPL-SAS-SPAS: X-IPL-SAS-UREP:X-IPL-Envelope-To; b=j/6ja8Y4CZMGsKIgeI3SJ3uHtyeHAZDvLbbkwGMHZIAnfimYdvUzuJC61p2UEzJWc JxSPT50vH/1QSqwz+65kgZmYZ2seGCj1qQA7728nVeJsKyekZBCEQa2lTSZRSHP32z QgSrNELkiKeRA/mJYEfaGf4fuS2JlEaZ/yRgjlHg= X-Mailman-Approved-At: Sat, 13 Dec 2014 12:46:16 -0800 Cc: =?UTF-8?q?=C5=81ukasz=20Stelmach?= 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: Fri, 12 Dec 2014 19:10:06 -0000 `mail-user-agent' is defined with defcustom and may be customised by users. It should not be set to arbitrary values in modules. To make use of that configuration value call `compose-mail' which starts user's preferred mail composition package as selected with the variable `mail-user-agent' instead of notmuch's hardcoded `message-mail'. --- NEWS | 10 ++++++++++ emacs/notmuch-mua.el | 2 +- emacs/notmuch.el | 2 -- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 44e8d05..cf5b3c3 100644 --- a/NEWS +++ b/NEWS @@ -64,6 +64,16 @@ Added `notmuch address` subcommand Emacs Interface --------------- +Fixed `mail-user-agent` handling + + The value of the mail-user-agent variable is not forcibly set to + `notmuch-user-agent`, regardles of how a user has customised it, + everytime notmuch.el is loaded. This way, someone who used for example + Gnus has her MUA and notmuch just as a search engine, doesn't have her + configuration broken everytime notmuch.el is loaded. The user can now + use her favourite mail composing package when replying messages in + notmuch too. + Use the `j` key to access saved searches from anywhere in notmuch `j` is now globally bound to `notmuch-jump`, which provides fast, diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index 2c58886..f02c7b5 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -263,7 +263,7 @@ OTHER-ARGS are passed through to `message-mail'." (push (cons 'From (concat (notmuch-user-name) " <" (notmuch-user-primary-email) ">")) other-headers)) - (apply #'message-mail to subject other-headers other-args) + (apply #'compose-mail to subject other-headers other-args) (message-sort-headers) (message-hide-headers) (set-buffer-modified-p nil) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 218486a..80cab57 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -1037,8 +1037,6 @@ notmuch buffers exist, run `notmuch'." (switch-to-buffer first)) (notmuch)))) -(setq mail-user-agent 'notmuch-user-agent) - (provide 'notmuch) ;; After provide to avoid loops if notmuch was require'd via notmuch-init-file. -- 2.0.4