From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Federico Tedin Newsgroups: gmane.emacs.bugs Subject: bug#34654: Attaching a file with a new name in a message Date: Sat, 30 Mar 2019 22:23:45 -0300 Message-ID: <87ftr3j0pq.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="51611"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: 34654@debbugs.gnu.org To: Abdo Haji-Ali Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Mar 31 03:24:14 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hAPCm-000DJ1-IF for geb-bug-gnu-emacs@m.gmane.org; Sun, 31 Mar 2019 03:24:12 +0200 Original-Received: from localhost ([127.0.0.1]:46157 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hAPCl-0003K1-Ii for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Mar 2019 21:24:11 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40516) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hAPCd-0003Hn-Sy for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2019 21:24:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hAPCc-0003r1-V1 for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2019 21:24:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52383) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hAPCc-0003qf-LG for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2019 21:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hAPCc-0001Eo-Dr for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2019 21:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Federico Tedin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 31 Mar 2019 01:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34654 X-GNU-PR-Package: emacs Original-Received: via spool by 34654-submit@debbugs.gnu.org id=B34654.15539954364746 (code B ref 34654); Sun, 31 Mar 2019 01:24:02 +0000 Original-Received: (at 34654) by debbugs.gnu.org; 31 Mar 2019 01:23:56 +0000 Original-Received: from localhost ([127.0.0.1]:37694 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hAPCW-0001EU-7x for submit@debbugs.gnu.org; Sat, 30 Mar 2019 21:23:56 -0400 Original-Received: from mail-qt1-f174.google.com ([209.85.160.174]:37802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hAPCU-0001EF-JI for 34654@debbugs.gnu.org; Sat, 30 Mar 2019 21:23:55 -0400 Original-Received: by mail-qt1-f174.google.com with SMTP id z16so6966811qtn.4 for <34654@debbugs.gnu.org>; Sat, 30 Mar 2019 18:23:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=lmWWVgaUe4mvNY3RvmRhKio0wMDluSMeEKVdfwOBBLc=; b=ar/B6yZB//UZDO0rcSXvwb4uTnZnDdQbadag7S4g+rZ2LiNRHGwXJVrx8pOphpsvOU X60dsi4d4MNCAPMCCZJaXlxs/Ed+NHqq3P9ezY7P+zN4PCpC7Nb0Ux8xxCh16obmJkAk AQY+JD5SbSA0KscaG0cATi7E+y6amPM7Lbojz4INhYPVgtLkaDiusgV98EF2hvhRXT3V 6vIkumyPgPIOi/31l7OHaywGKOIVLUdfu1o7OeKx4z3wnspGIV1bKPtQppmFt40kWX88 f1R03/JWvqdGx/9fjlOJtllN+R7InbbHUlLvyMh2njP7iJxHmCwowW+sdp67v7XB27Tv lI6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=lmWWVgaUe4mvNY3RvmRhKio0wMDluSMeEKVdfwOBBLc=; b=b62DNqeQKWVtzxYBLip2HYnkbDbPx9dsuYFzFPqMnYuSu/DCb7SulS5o4ESpTBbDWA vz3Lp1PF5F+8AbsRNa6wt6I7mfWoIYrmIqAvbQ1nUNpJCza/epl3yxjGsLPTF2gd7eL5 1aipaM7Ks+WDll2FF4bwV/PGbw0pPoMa2eO8MvJX/SS926oXMOo1Hk8E5duG1yiDSyU5 FhjxHap9A9mThve1pqDKvJyS1P53xxpwf+Ev2lx3By9IchW1BeFRDfPr75qTF8OdX6vs yz8DCP3Gi0qLMa19TTJajLyAJTz1HRArqqcLDBQclpSHWCMBQNuSCir5VZ5ngNfGY+On 3h3A== X-Gm-Message-State: APjAAAVakC1MBDiV6WjL+C+vq/zriDyIOVYxTPnTav3yHQWUwpVNETsT YE4dVoOvPdf4OwTPtucB4zK+/McL X-Google-Smtp-Source: APXvYqws7qrLaDevtO81JyuPPe0DiAPey5oAOs+YW4zkDJUSfLzZLDUp9DeW4Bw9ge3qvpUH7QIf7Q== X-Received: by 2002:a0c:ba0f:: with SMTP id w15mr11621053qvf.20.1553995428915; Sat, 30 Mar 2019 18:23:48 -0700 (PDT) Original-Received: from lead ([186.141.133.170]) by smtp.gmail.com with ESMTPSA id h22sm4758557qth.68.2019.03.30.18.23.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 30 Mar 2019 18:23:48 -0700 (PDT) In-Reply-To: (Abdo Haji-Ali's message of "Mon, 25 Feb 2019 18:42:05 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:156963 Archived-At: Abdo Haji-Ali writes: > Hello, > > I am using Emacs 26.1 to send my emails. While writing an email, I > attach files by calling > `mail-attach-file` (bound to C-c C-a on my setup) > I usually want to rename the file before sending so that my local file > name doesn't appear to the recipient. I found in the docs that setting > the properties 'recipient-filename' or 'name' in the tag should > do the trick. However, this doesn't seem to be the case, since my > recipients are still receiving files with my original filenames. > Looking at the raw message I found in the header > > Content-Disposition: attachment; filename="old-name.pdf" > > Even when I set the 'recipient-filename' and 'name' properties. > Looking through the source, it seems that line 904 in mml.el always > sets the Content-Disposition filename to the original filename, > disregarding the 'recipient-filename' and 'name' properties. > > Is this intentional? Is there another to achieve what I want? Adding 'recipient-filename to mml-content-disposition-parameters makes future messages include the property in the "Content-Disposition" header. However, the "filename" property is still sent, and my email client (GMail) uses "filename" and not "recipient-filename" to display the attachment file name. Maybe Emacs should replace the contents of "filename" with the ones of "recipient-filename"?