From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Myles English Newsgroups: gmane.emacs.bugs Subject: bug#18173: 24.3; message-sendmail-extra-arguments not applied Date: Sat, 04 Oct 2014 22:25:12 +0100 Message-ID: <87y4suae8p.fsf@gmail.com> References: <8738dfklm8.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1412512530 3533 80.91.229.3 (5 Oct 2014 12:35:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 5 Oct 2014 12:35:30 +0000 (UTC) Cc: 18173@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 05 14:35:23 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xal22-0007cT-CM for geb-bug-gnu-emacs@m.gmane.org; Sun, 05 Oct 2014 14:35:22 +0200 Original-Received: from localhost ([::1]:47393 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xal22-0007Vz-0J for geb-bug-gnu-emacs@m.gmane.org; Sun, 05 Oct 2014 08:35:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xal1q-0007Vb-QI for bug-gnu-emacs@gnu.org; Sun, 05 Oct 2014 08:35:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xal1j-0004AU-6i for bug-gnu-emacs@gnu.org; Sun, 05 Oct 2014 08:35:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41961) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xal1j-00049t-4D for bug-gnu-emacs@gnu.org; Sun, 05 Oct 2014 08:35:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Xal1h-0002eH-Tn; Sun, 05 Oct 2014 08:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Myles English Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Sun, 05 Oct 2014 12:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18173 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: patch Original-Received: via spool by 18173-submit@debbugs.gnu.org id=B18173.141251249010162 (code B ref 18173); Sun, 05 Oct 2014 12:35:01 +0000 Original-Received: (at 18173) by debbugs.gnu.org; 5 Oct 2014 12:34:50 +0000 Original-Received: from localhost ([127.0.0.1]:33524 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xal1V-0002dp-Lz for submit@debbugs.gnu.org; Sun, 05 Oct 2014 08:34:50 -0400 Original-Received: from mail-wg0-f44.google.com ([74.125.82.44]:32943) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xal1S-0002dd-Nf for 18173@debbugs.gnu.org; Sun, 05 Oct 2014 08:34:47 -0400 Original-Received: by mail-wg0-f44.google.com with SMTP id y10so4545276wgg.3 for <18173@debbugs.gnu.org>; Sun, 05 Oct 2014 05:34:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:from:to:cc:subject:date:in-reply-to:message-id :mime-version:content-type; bh=r/66GGDSkov5pc9YAOzXRQmIetyIahZoKMITzP4zKqw=; b=d3wnMUnLRRDbC5nd6pA2LkIbU3zOrK8UKK079jU7yMFVKGtPm2Tq2BqU6Btu6qXI8j j3OnUcL0J+o4DzkF7fNiLf5Ro0PEciPzOSj5iSb8R9A4Z+0YKa+3URTVyv+816Lune0d E5IZ528pVTs1qjUBBijAM0oCIwNvprNJ7EHfdVvsQHYqvYsGAoHRg0QPS/cqVOhssIxM 5MxW826E2y6NPwNPmM0t9cnISNZQDsI9WuMmHorcFIpgpi6FRopfItu+kvalU4Liv3QW Vk1nfeq0LPOCl3z5EkTHJFhXOcD5qQLdpb89EW8CZbn3GpMP+nYXooHt3XKNcXBc8Z7C ZMiQ== X-Received: by 10.194.83.67 with SMTP id o3mr21365464wjy.31.1412512485153; Sun, 05 Oct 2014 05:34:45 -0700 (PDT) Original-Received: from localhost (host217-39-94-5.range217-39.btcentralplus.com. [217.39.94.5]) by mx.google.com with ESMTPSA id i5sm13838743wjz.0.2014.10.05.05.34.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Oct 2014 05:34:44 -0700 (PDT) In-reply-to: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:94158 Archived-At: Glenn Morris writes: > Sorry, I'm being dense, because I cannot see a bug here, or how your > patch makes any difference to anything. Can you explain? I can't reproduce this bug anymore (you can stop reading here). I'll explain what I thought the bug was for posterity. With sendmail-program set to /usr/bin/msmtp. Without the patch below, msmtp finds its config file in the default location ~/.msmtprc . It is possible specify a different config file on the command line using the -C option. However, using this: (setq message-sendmail-extra-arguments '("-C" "/home/myles/.config/msmtp/msmtprc")) did not result in msmtp finding its config file. The doc for message-sendmail-extra-arguments says "Additional arguments to `sendmail-program'". The 'bug' was that the extra argument should be applied but it is not. After applying the patch below, the config file is found in the non-default location. The 'bug' is fixed because the extra argument is applied. I don't know why the patch works or much about elisp (I copied from elsewhere in the source). While debugging, message-sendmail-extra-arguments seemed to be something other than a string, the patch below seamed to cause it to be string consistently. Myles >> --- message.el >> +++ message.el >> @@ -4723,9 +4723,7 @@ >> (erase-buffer)))) >> (let* ((default-directory "/") >> (coding-system-for-write message-send-coding-system) >> - (cpr (apply >> - 'call-process-region >> - (append >> + (args (append >> (list (point-min) (point-max) sendmail-program >> nil errbuf nil "-oi") >> message-sendmail-extra-arguments >> @@ -4745,7 +4743,8 @@ >> ;; For a resend, include the specific addresses. >> (if resend-to-addresses >> (list resend-to-addresses) >> - '("-t")))))) >> + '("-t")))) >> + (cpr (apply 'call-process-region args))) >> (unless (or (null cpr) (and (numberp cpr) (zerop cpr))) >> (if errbuf (pop-to-buffer errbuf)) >> (error "Sending...failed with exit value %d" cpr)))