all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Drew Adams <drew.adams@oracle.com>
Cc: 31351@debbugs.gnu.org
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	[thread overview]
Message-ID: <8336z8ppz3.fsf@gnu.org> (raw)
In-Reply-To: <43b34fd6-291d-475d-8c8d-65c58dd0f316@default> (message from Drew Adams on Wed, 2 May 2018 17:55:14 -0700 (PDT))

> Date: Wed, 2 May 2018 17:55:14 -0700 (PDT)
> From: Drew Adams <drew.adams@oracle.com>
> 
> 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.





  parent reply	other threads:[~2018-05-03 18:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-03  0:55 bug#31351: 27.0; Cannot send bug report with Outlook if text includes backquoted sexps Drew Adams
2018-05-03  1:02 ` Noam Postavsky
2018-05-03  1:18   ` Drew Adams
2018-05-03 18:13 ` Eli Zaretskii [this message]
     [not found] <<43b34fd6-291d-475d-8c8d-65c58dd0f316@default>
     [not found] ` <<8336z8ppz3.fsf@gnu.org>
2018-05-03 18:24   ` Drew Adams
2018-05-03 18:59     ` Eli Zaretskii
     [not found] <<<43b34fd6-291d-475d-8c8d-65c58dd0f316@default>
     [not found] ` <<<8336z8ppz3.fsf@gnu.org>
     [not found]   ` <<d4fa0a90-631b-444a-abe7-0beed40aecf1@default>
     [not found]     ` <<83y3h0o9a7.fsf@gnu.org>
2018-05-03 19:41       ` Drew Adams
2018-05-03 20:01         ` Eli Zaretskii
     [not found] <<<<43b34fd6-291d-475d-8c8d-65c58dd0f316@default>
     [not found] ` <<<<8336z8ppz3.fsf@gnu.org>
     [not found]   ` <<<d4fa0a90-631b-444a-abe7-0beed40aecf1@default>
     [not found]     ` <<<83y3h0o9a7.fsf@gnu.org>
     [not found]       ` <<1d1d9379-4d74-4171-baf6-cead40e47c1d@default>
     [not found]         ` <<83tvroo6ea.fsf@gnu.org>
2018-05-03 20:11           ` Drew Adams
2018-05-04 12:35             ` Eli Zaretskii
     [not found] <<<<<43b34fd6-291d-475d-8c8d-65c58dd0f316@default>
     [not found] ` <<<<<8336z8ppz3.fsf@gnu.org>
     [not found]   ` <<<<d4fa0a90-631b-444a-abe7-0beed40aecf1@default>
     [not found]     ` <<<<83y3h0o9a7.fsf@gnu.org>
     [not found]       ` <<<1d1d9379-4d74-4171-baf6-cead40e47c1d@default>
     [not found]         ` <<<83tvroo6ea.fsf@gnu.org>
     [not found]           ` <<3b184f18-5afe-46fa-a4c7-4cc74d08be57@default>
     [not found]             ` <<83efirtx8q.fsf@gnu.org>
2018-05-04 15:30               ` Drew Adams
2018-05-04 17:35                 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8336z8ppz3.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=31351@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.