From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id OOTTHnamAWDeQAAA0tVLHw (envelope-from ) for ; Fri, 15 Jan 2021 14:28:06 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id uOWNGnamAWADJwAAbx9fmQ (envelope-from ) for ; Fri, 15 Jan 2021 14:28:06 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DA6849403AA for ; Fri, 15 Jan 2021 14:28:05 +0000 (UTC) Received: from localhost ([::1]:52782 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0Q56-0007zR-MZ for larch@yhetil.org; Fri, 15 Jan 2021 09:28:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0PqG-0007Ec-Cu for emacs-orgmode@gnu.org; Fri, 15 Jan 2021 09:12:44 -0500 Received: from smtprelay04.ispgateway.de ([80.67.31.31]:61115) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0PqB-0007V2-9q for emacs-orgmode@gnu.org; Fri, 15 Jan 2021 09:12:44 -0500 Received: from [46.244.223.62] (helo=condition-alpha.com) by smtprelay04.ispgateway.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1l0PoZ-00068H-B6; Fri, 15 Jan 2021 15:10:59 +0100 Message-Id: <2acd022ab06f7f7e2fbe74a6b42d816a@condition-alpha.com> From: Alexander Adolf To: Tim Visher , Emacs Org Mode mailing list Subject: Re: How to use `open` to handle `message:*` links on macOS In-Reply-To: References: Date: Fri, 15 Jan 2021 15:12:34 +0100 MIME-Version: 1.0 Content-Type: text/plain X-Df-Sender: YWxleGFuZGVyLmFkb2xmQGNvbmRpdGlvbi1hbHBoYS5jb20= Received-SPF: pass client-ip=80.67.31.31; envelope-from=alexander.adolf@condition-alpha.com; helo=smtprelay04.ispgateway.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.36 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: DA6849403AA X-Spam-Score: -2.36 X-Migadu-Scanner: scn0.migadu.com X-TUID: zJnTJWMPrqlb Hello Tim, Tim Visher writes: > [...] > I'd like to be able to whack `C-c C-o` on `message:*` links on macOS and > have it call `open` on the contents. Is there a way to make that happen? > > My intent is to be able to save a deep link to a Mail.app message in an org > document. > [...] In my setup, I'm using this: ---------------------------- Begin Quote ----------------------------- (org-add-link-type "mac-mail" 'org-mac-mail-link-open) (defun org-mac-mail-link-open (mid) "Visit the email message with message id MID." (start-process "open-mail" nil "open" (format "message:%%3C%s%%3E" mid))) ----------------------------- End Quote ------------------------------ It gives me a new link type "mac-mail" for org-insert-link. Copy the message ID (without the angle brackets) from Mail.app, and insert it as the link location. This is a manual process, of course, but then I'm not using it often, and I don't need it for anything else but Mail.app. org-mac-link as suggested by Diego offers much more convenience by automating the entire process, and by giving you access to many other apps, too. So you might prefer that if you are going to use it often. Hoping to have helped, --alex