* Re: org-mac-link patch
[not found] <F30B342B-77BC-400C-AF52-9333CD3954A5@gmx.de>
@ 2020-12-09 14:01 ` Jan Lübke
2020-12-11 4:30 ` Kyle Meyer
0 siblings, 1 reply; 3+ messages in thread
From: Jan Lübke @ 2020-12-09 14:01 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 398 bytes --]
Good morning,
this is my first time submitting a patch, here. I hope I did everything right. If I made a mistake, please let me know. If you have any questions, feel free to ask.
Not sure if this is even an official bug, yet. However here is a fix for a strange behaviour: Links to mail.app don’t open any more after upgrading to macOS 11.
Thank you for making orgmode!
Jan Lübke
[-- Attachment #2: 0001-contrib-module-org-mac-link.el-open-links-from-Mail..patch --]
[-- Type: application/octet-stream, Size: 1396 bytes --]
From 05ddec9035bcb45dfa0c1bbcae5f74ca6180065b Mon Sep 17 00:00:00 2001
From: raumi75 <@raumi75>
Date: Wed, 9 Dec 2020 09:31:01 +0100
Subject: [PATCH] contrib module org-mac-link.el/open links from Mail.app: fix
compatibility issue with macOS 11 Big Sur.
* org-mac-link.el (org-mac-message-open): replaced angular brackets with encoded version (< to %3C and > to %3E) so macOS 11 Big Sur can open the message in mail.app
TINYCHANGE macOS 11 does not open the mail link with angular brackets any more. This fix is backwards compatible. I have tested it on macOS 10.15.7.
---
contrib/lisp/org-mac-link.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/lisp/org-mac-link.el b/contrib/lisp/org-mac-link.el
index d16190e5a..e692acb3e 100644
--- a/contrib/lisp/org-mac-link.el
+++ b/contrib/lisp/org-mac-link.el
@@ -912,7 +912,7 @@ selected items in DEVONthink Pro Office and make link(s) out of it/them."
"Visit the message with MESSAGE-ID.
This will use the command `open' with the message URL."
(start-process (concat "open message:" message-id) nil
- "open" (concat "message://<" (substring message-id 2) ">")))
+ "open" (concat "message://%3C" (substring message-id 2) "%3E")))
(defun org-as-get-selected-mail ()
"AppleScript to create links to selected messages in Mail.app."
--
2.29.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: org-mac-link patch
2020-12-09 14:01 ` Jan Lübke
@ 2020-12-11 4:30 ` Kyle Meyer
0 siblings, 0 replies; 3+ messages in thread
From: Kyle Meyer @ 2020-12-11 4:30 UTC (permalink / raw)
To: Jan Lübke; +Cc: emacs-orgmode
Jan Lübke writes:
> Good morning,
>
> this is my first time submitting a patch, here.
Thank you!
> I hope I did everything right. If I made a mistake, please let me
> know. If you have any questions, feel free to ask.
The patch format looks good. I have only minor/cosmetic comments.
> Not sure if this is even an official bug, yet. However here is a fix
> for a strange behaviour: Links to mail.app don’t open any more after
> upgrading to macOS 11.
Sounds like a bug. I don't run macOS, so I'd be very grateful if
another macOS/mail.app user could confirm that your patch works on their
end.
> From: raumi75 <@raumi75>
Is it okay if I set this to the sender address of the main message?
> Date: Wed, 9 Dec 2020 09:31:01 +0100
> Subject: [PATCH] contrib module org-mac-link.el/open links from Mail.app: fix
> compatibility issue with macOS 11 Big Sur.
It'd be nice to shorten a bit. Perhaps
contrib/org-mac-link.el: fix Mail.app link compatibility with macOS 11
> * org-mac-link.el (org-mac-message-open): replaced angular brackets with encoded version (< to %3C and > to %3E) so macOS 11 Big Sur can open the message in mail.app
Looks good. Please wrap the commit message lines, something like the
slightly edited
* org-mac-link.el (org-mac-message-open): Replace angular brackets
with encoded version (< to %3C and > to %3E) so macOS 11 Big Sur can
open the message in mail.app.
> TINYCHANGE macOS 11 does not open the mail link with angular brackets any more. This fix is backwards compatible. I have tested it on macOS 10.15.7.
Great, thanks for considering and checking the backwards compatibility.
That was going to be my main question.
> ---
> contrib/lisp/org-mac-link.el | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/contrib/lisp/org-mac-link.el b/contrib/lisp/org-mac-link.el
> index d16190e5a..e692acb3e 100644
> --- a/contrib/lisp/org-mac-link.el
> +++ b/contrib/lisp/org-mac-link.el
> @@ -912,7 +912,7 @@ selected items in DEVONthink Pro Office and make link(s) out of it/them."
> "Visit the message with MESSAGE-ID.
> This will use the command `open' with the message URL."
> (start-process (concat "open message:" message-id) nil
> - "open" (concat "message://<" (substring message-id 2) ">")))
> + "open" (concat "message://%3C" (substring message-id 2) "%3E")))
Looks as advertised :) Again, it'd be good to get another macOS user to
confirm, but if not, I'll go ahead and apply this patch in a few days.
If my suggested commit message edits above look okay to you, there's no
need to resend. I can amend when applying.
Thanks again.
>
> (defun org-as-get-selected-mail ()
> "AppleScript to create links to selected messages in Mail.app."
> --
> 2.29.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org-mac-link patch
[not found] <27B86020-32B1-4DBA-94CE-EA5A52E07DD3@luebke-wohnen.de>
@ 2020-12-16 5:49 ` Kyle Meyer
0 siblings, 0 replies; 3+ messages in thread
From: Kyle Meyer @ 2020-12-16 5:49 UTC (permalink / raw)
To: Jan Lübke; +Cc: emacs-orgmode
Jan Lübke writes:
> Your edits look good to me and you can use this email address. BTW: I
> just upgraded to macOS 11.1 (released yesterday) and my patch is still
> needed. Looks like Apple won’t fix the issue.
Thanks, pushed (a4d0607e1).
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-16 5:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <27B86020-32B1-4DBA-94CE-EA5A52E07DD3@luebke-wohnen.de>
2020-12-16 5:49 ` org-mac-link patch Kyle Meyer
[not found] <F30B342B-77BC-400C-AF52-9333CD3954A5@gmx.de>
2020-12-09 14:01 ` Jan Lübke
2020-12-11 4:30 ` Kyle Meyer
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).