From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#31351: 27.0; Cannot send bug report with Outlook if text includes backquoted sexps Date: Thu, 03 May 2018 21:13:20 +0300 Message-ID: <8336z8ppz3.fsf@gnu.org> References: <43b34fd6-291d-475d-8c8d-65c58dd0f316@default> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1525371144 16613 195.159.176.226 (3 May 2018 18:12:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 3 May 2018 18:12:24 +0000 (UTC) Cc: 31351@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 03 20:12:19 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fEIiI-00045G-Pd for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 May 2018 20:12:18 +0200 Original-Received: from localhost ([::1]:58124 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fEIkI-0006Nd-OQ for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 May 2018 14:14:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50383) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fEIk1-0006Ia-S2 for bug-gnu-emacs@gnu.org; Thu, 03 May 2018 14:14:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fEIjy-0004f0-KU for bug-gnu-emacs@gnu.org; Thu, 03 May 2018 14:14:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40603) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fEIjy-0004en-F7 for bug-gnu-emacs@gnu.org; Thu, 03 May 2018 14:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fEIjy-0000YB-9c for bug-gnu-emacs@gnu.org; Thu, 03 May 2018 14:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 May 2018 18:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31351 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 31351-submit@debbugs.gnu.org id=B31351.15253712222078 (code B ref 31351); Thu, 03 May 2018 18:14:02 +0000 Original-Received: (at 31351) by debbugs.gnu.org; 3 May 2018 18:13:42 +0000 Original-Received: from localhost ([127.0.0.1]:48500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fEIje-0000XS-A0 for submit@debbugs.gnu.org; Thu, 03 May 2018 14:13:42 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59241) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fEIjc-0000Wd-LY for 31351@debbugs.gnu.org; Thu, 03 May 2018 14:13:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fEIjU-0004WG-4z for 31351@debbugs.gnu.org; Thu, 03 May 2018 14:13:35 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44995) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fEIjU-0004WA-0y; Thu, 03 May 2018 14:13:32 -0400 Original-Received: from [176.228.60.248] (port=2240 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fEIjS-0006rt-Cn; Thu, 03 May 2018 14:13:31 -0400 In-reply-to: <43b34fd6-291d-475d-8c8d-65c58dd0f316@default> (message from Drew Adams on Wed, 2 May 2018 17:55:14 -0700 (PDT)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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: 208.118.235.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:145983 Archived-At: > Date: Wed, 2 May 2018 17:55:14 -0700 (PDT) > From: Drew Adams > > I tried several times to send the bug report that you find in bug > #31350. I could not do so with Emacs 25 or later. My mail client is > Outlook 2016. > > Each time I tried, I got this Outlook error message: > > The command line argument is not valid. > Verify the switch you are using. > > I have no idea what the command line is that is sent to Outlook. > > I finally succeeded in sending the bug report by deleting the two code > lines from it that you see in bug #31350 after this line of text: > > These are the two clauses in question: > > Please refer to that bug for the two lines of code. > > I deleted those two lines and was able to get the bug report from Emacs > to a new Outlook message, and I inserted the two code lines into that > Outlook message, then sent it. I see the problem, but I'm not sure it's the same problem, because it doesn't fit your description in two details: (a) the problem I see is not caused by anything in the message body -- in fact, I can reproduce the problem with a "bug report" whose body consists of just "foo", in addition to the details collected by the command about my system; and (b) sending that problematic bug report works just fine in Emacs 25 and all older versions, and is broken only in Emacs 26 and later. The problem I see is not caused by backticks in the body, it is caused by quotes ".." in the Subject of the bug. (I don't see how the body could have any effect on launching Outlook, since we pass the body through the system clipboard, and Outlook doesn't see it until you paste the body into Outlook. So it cannot possibly prevent Outlook from starting correctly.) To fix the problem I see, I installed on the release branch a fix, which is reproduced below. Please re-verify that you indeed see a different problem -- I expect the patch below not to solve the problem if so. Thanks. diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 98b0acf..a84a7b1 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -878,7 +878,21 @@ browse-url-default-windows-browser (error "Browsing URLs is not supported on this system"))) ((eq system-type 'cygwin) (call-process "cygstart" nil nil nil url)) - (t (w32-shell-execute "open" (url-unhex-string url))))) + (t + (w32-shell-execute "open" + ;; w32-shell-execute passes file:// URLs + ;; to APIs that expect file names, so we + ;; need to unhex any %nn encoded + ;; characters in the URL. We don't do + ;; that for other URLs; in particular, + ;; default Windows mail client barfs on + ;; quotes in the MAILTO URLs, so we prefer + ;; to leave the URL with its embedded %nn + ;; encoding intact. + (if (eq t (compare-strings url nil 7 + "file://" nil nil)) + (url-unhex-string url) + url))))) (defun browse-url-default-macosx-browser (url &optional _new-window) "Invoke the macOS system's default Web browser.