GNU bug report logs -
#31351
27.0; Cannot send bug report with Outlook if text includes backquoted sexps
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Thu, 3 May 2018 00:56:01 UTC
Severity: normal
Tags: fixed
Merged with 29074
Found in versions 26.0, 27.0
Fixed in version 26.1
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 31351 in the body.
You can then email your comments to 31351 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#31351
; Package
emacs
.
(Thu, 03 May 2018 00:56:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Drew Adams <drew.adams <at> oracle.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 03 May 2018 00:56:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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.
Something seems wrong in Emacs (or Outlook?) if Emacs cannot get Outlook
to create a message that includes such simple text.
In GNU Emacs 27.0.50 (build 3, x86_64-w64-mingw32)
of 2018-03-21
Repository revision: e70d0c9e66d7a8609450b2889869d16aeb0363b5
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
`configure --without-dbus --host=x86_64-w64-mingw32
--without-compress-install -C 'CFLAGS=-O2 -static -g3''
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#31351
; Package
emacs
.
(Thu, 03 May 2018 01:03:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 31351 <at> debbugs.gnu.org (full text, mbox):
merge 31351 29074
quit
Drew Adams <drew.adams <at> oracle.com> writes:
> 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 guess the request in
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29074#11 would be
relevant.
Merged 29074 31351.
Request was from
Noam Postavsky <npostavs <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Thu, 03 May 2018 01:03:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#31351
; Package
emacs
.
(Thu, 03 May 2018 01:19:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 31351 <at> debbugs.gnu.org (full text, mbox):
> I guess the request in
> https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__debbugs.gnu.org_cgi_bugreport.cgi-3Fbug-3D29074-
> 2311&d=DwIBAg&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=kI3P6ljGv6C
> THIKju0jqInF6AOwMCYRDQUmqX22rJ98&m=RBYxpgDmEPhVfvSYC0Wp4U-
> HWUnAn8jq9ldQWaKXFVc&s=OxslwRdnIIJCpInJ7_HkFZmX1t_WQJiSGuWWvIAJs3k&e=
> would be relevant.
Thanks. I thought it rang a bell, but I couldn't find that.
The new bug is reproducible for me, each time. Hopefully it will help.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#31351
; Package
emacs
.
(Thu, 03 May 2018 18:14:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 31351 <at> debbugs.gnu.org (full text, mbox):
> Date: Wed, 2 May 2018 17:55:14 -0700 (PDT)
> From: Drew Adams <drew.adams <at> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#31351
; Package
emacs
.
(Thu, 03 May 2018 18:25:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 31351 <at> debbugs.gnu.org (full text, mbox):
> 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.
Great. Thanks for taking a closer look.
It's funny though. Before I tried simplifying the body, I did
try simplifying the Subject line, by removing the backquote,
the single quote, and the double-quotes. That didn't fix it
for me. But perhaps I didn't do what I thought I did.
Anyway, if you've found a fix, that's great.
BTW, it wasn't about having an effect on launching Outlook.
I already had Outlook open. It was only about not creating
a new Outlook message with the header filled and the body
ready to be pasted as the bug-report text.
(I don't want to try testing this, as that will likely create
a useless bug report. If you feel this fixes the problem
that's good enough for me, until/unless I run into it again.)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#31351
; Package
emacs
.
(Thu, 03 May 2018 19:00:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 31351 <at> debbugs.gnu.org (full text, mbox):
> Date: Thu, 3 May 2018 11:24:39 -0700 (PDT)
> From: Drew Adams <drew.adams <at> oracle.com>
> Cc: 31351 <at> debbugs.gnu.org
>
> Anyway, if you've found a fix, that's great.
I'd like to close this bug, but it would be good for you to try the
fixed browse-url.el and see if you can still trigger the problem with
that particular bug report.
> BTW, it wasn't about having an effect on launching Outlook.
> I already had Outlook open. It was only about not creating
> a new Outlook message with the header filled and the body
> ready to be pasted as the bug-report text.
That's an implementation detail. From Emacs point of view, it
launches Outlook, passing it the addressee and the subject of the bug.
That the running Outlook intercepts the command and opens a new window
in the same executable is out of Emacs control.
> (I don't want to try testing this, as that will likely create
> a useless bug report.
I don't see why you should worry about that: you can always close the
new Outlook window without clicking "Send". IOW, if you get an
Outlook window with the bug address and the bug title, and can paste
the body with "Ctrl-v", then the bug is fixed, and you don't need to
send anything anywhere (but if you do want to send, you can edit the
addressee).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#31351
; Package
emacs
.
(Thu, 03 May 2018 19:42:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 31351 <at> debbugs.gnu.org (full text, mbox):
> > (I don't want to try testing this, as that will likely create
> > a useless bug report.
>
> I don't see why you should worry about that: you can always close the
> new Outlook window without clicking "Send".
Of course. Dunno what I was thinking.
I did that, use this as Subject:
pcase message: Redundant pcase pattern
And there was no problem.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#31351
; Package
emacs
.
(Thu, 03 May 2018 20:02:01 GMT)
Full text and
rfc822 format available.
Message #28 received at 31351 <at> debbugs.gnu.org (full text, mbox):
> Date: Thu, 3 May 2018 12:41:36 -0700 (PDT)
> From: Drew Adams <drew.adams <at> oracle.com>
> Cc: 31351 <at> debbugs.gnu.org
>
> I did that, use this as Subject:
>
> pcase message: Redundant pcase pattern
>
> And there was no problem.
Great. Could you try patching browse-url.el, and then making a report
with quotes in the Subject? That should work after the patch.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#31351
; Package
emacs
.
(Thu, 03 May 2018 20:12:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 31351 <at> debbugs.gnu.org (full text, mbox):
> Could you try patching browse-url.el, and then making a report
> with quotes in the Subject? That should work after the patch.
I did that, but it did not solve the problem - I get the same error.
I tried with both the original message body and with just aaaaaaa
as the body. So the Subject line is the problem, and it does not
seem to be fixed by your patch.
This is the code I used:
(defun browse-url-default-windows-browser (url &optional _new-window)
"Invoke the MS-Windows system's default Web browser.
The optional NEW-WINDOW argument is not used."
(interactive (browse-url-interactive-arg "URL: "))
(cond ((eq system-type 'ms-dos)
(if dos-windows-version
(shell-command (concat "start " (shell-quote-argument url)))
(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"
;; 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)))))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#31351
; Package
emacs
.
(Fri, 04 May 2018 12:36:01 GMT)
Full text and
rfc822 format available.
Message #34 received at 31351 <at> debbugs.gnu.org (full text, mbox):
> Date: Thu, 3 May 2018 13:11:47 -0700 (PDT)
> From: Drew Adams <drew.adams <at> oracle.com>
> Cc: 31351 <at> debbugs.gnu.org
>
> > Could you try patching browse-url.el, and then making a report
> > with quotes in the Subject? That should work after the patch.
>
> I did that, but it did not solve the problem - I get the same error.
Sorry for asking the trivial: are you sure you byte-compiled the
modified browse-url.el and loaded it into Emacs before trying?
If indeed the modified code still doesn't solve the problem, please
step with Edebug into browse-url-default-windows-browser when it is
called after you tell report-emacs-bug you want to send via
mailclient, and see what URL is being passed to w32-shell-execute. It
should be a mailto URL with all the special characters, including the
quotes, encoded as hex %nn codes. Copy that URL, then paste it into
the Windows Start->Run dialog, and see if that causes the same error
message as you get in your testing.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#31351
; Package
emacs
.
(Fri, 04 May 2018 15:31:01 GMT)
Full text and
rfc822 format available.
Message #37 received at 31351 <at> debbugs.gnu.org (full text, mbox):
> > > Could you try patching browse-url.el, and then making a report
> > > with quotes in the Subject? That should work after the patch.
> >
> > I did that, but it did not solve the problem - I get the same error.
>
> Sorry for asking the trivial: are you sure you byte-compiled the
> modified browse-url.el and loaded it into Emacs before trying?
No. I just modified that function and evaled the updated defun.
I've done what you suggest now - copied the whole file, updated
it, byte-compiled it, and loaded the *.elc.
And yes, that seems to fix the problem. Thx.
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Fri, 04 May 2018 17:36:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Drew Adams <drew.adams <at> oracle.com>
:
bug acknowledged by developer.
(Fri, 04 May 2018 17:36:01 GMT)
Full text and
rfc822 format available.
Message #42 received at 31351-done <at> debbugs.gnu.org (full text, mbox):
> Date: Fri, 4 May 2018 08:30:37 -0700 (PDT)
> From: Drew Adams <drew.adams <at> oracle.com>
> Cc: 31351 <at> debbugs.gnu.org
>
> I've done what you suggest now - copied the whole file, updated
> it, byte-compiled it, and loaded the *.elc.
>
> And yes, that seems to fix the problem. Thx.
Great, thanks. So I'm closing this bug.
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Fri, 04 May 2018 17:36:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Drew Adams <drew.adams <at> oracle.com>
:
bug acknowledged by developer.
(Fri, 04 May 2018 17:36:02 GMT)
Full text and
rfc822 format available.
Added tag(s) fixed; removed tag(s) moreinfo.
Request was from
Noam Postavsky <npostavs <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Sat, 05 May 2018 02:19:02 GMT)
Full text and
rfc822 format available.
bug Marked as fixed in versions 26.1.
Request was from
Noam Postavsky <npostavs <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Sat, 05 May 2018 02:19:02 GMT)
Full text and
rfc822 format available.
Message #52 received at 31351-quiet <at> debbugs.gnu.org (full text, mbox):
tags 31351 = fixed
fixed 31351 26.1
quit
Eli Zaretskii <eliz <at> gnu.org> writes:
> To fix the problem I see, I installed on the release branch a fix,
[1: 91de88bfeb]: 2018-05-03 21:04:17 +0300
Fix report-emacs-bug via mailclient on MS-Windows
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=91de88bfeb759fb36ca12ee829b6d0c6e84fa4ce
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 02 Jun 2018 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 79 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.