From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Perry Smith Newsgroups: gmane.emacs.devel Subject: New URL Scheme Date: Sat, 15 Oct 2022 14:26:00 -0500 Message-ID: <2F3B3F3D-FE1A-4FDB-B385-9AF2C865DB91@easesoftware.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Content-Type: multipart/signed; boundary="Apple-Mail=_AAB647A7-33B7-4FCA-B2CF-BD26A1535A16"; protocol="application/pgp-signature"; micalg=pgp-sha256 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8390"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Oct 15 21:27:44 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ojmoy-00020r-3L for ged-emacs-devel@m.gmane-mx.org; Sat, 15 Oct 2022 21:27:44 +0200 Original-Received: from localhost ([::1]:59962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ojmow-0003yq-PZ for ged-emacs-devel@m.gmane-mx.org; Sat, 15 Oct 2022 15:27:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59606) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojmo3-0003Id-Vf for emacs-devel@gnu.org; Sat, 15 Oct 2022 15:26:48 -0400 Original-Received: from bee.birch.relay.mailchannels.net ([23.83.209.14]:52780) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojmo1-0004I7-Ua for emacs-devel@gnu.org; Sat, 15 Oct 2022 15:26:47 -0400 X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 2F014408D5 for ; Sat, 15 Oct 2022 19:26:03 +0000 (UTC) Original-Received: from mi3-ss4.a2hosting.com (unknown [127.0.0.6]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id 6C693408B2 for ; Sat, 15 Oct 2022 19:26:02 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1665861962; a=rsa-sha256; cv=none; b=z8Y42UtL3zRkE7poimt5BlWmrSkhgrMLnxtYpZRhwcKHoStvhSydNd30dXAiDyDm2v5G0y Vz3i7KWC0c00zwIohhkwoVuplJxaruLwczygVvA78qV3ENRcrrj3lfeHNQW3LeUOf1MHPv DPBJQ5Vie18Kq3YTrT71t5JBfnzrjGS1fVaLPTVSRAQ3pj+oiL5QzY3y15VhfJw0ZL87Oy 7BS5sdL8ryl0HGzSf3Xxd3GXofnLLA+vqrXKYNJRBcZMl+UAQM5MxQWv5B5ajrwRfkJxfr qP/O59zEOzwCpJSP60RQRM4eQOpW8TLGGcydpihjBCcMxup2a/IoM1JNOF01AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1665861962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: dkim-signature; bh=eIGJpX+8TwdD6gXlTSo8V5Bj3ddtxqctaX7nLUISkCk=; b=Pq/t6aCmQNhSLYl3KROun8hdsMW+ZOn/KN48FHgaDu14WyzTJu+rjoD0vO69yAfcj1bHE7 8q3plo6HjvH6/3JeUalTxD9feIOzeOPBqAmzZOpNq4WHyJcjturX0oYBdrxUvOZfrh79Pr o8X/b42U7CsmNKSy2JY+MbEuu3JzpZaEn0J1P350jq2Pkf8LfyXh5BP8Caarvt2EVX+BBH qIjjX8p55PBmYwwSX0MG0hVwcsG0oNNpbLDEs7qawBMIvLxu/Gt2Yhzh6tJWQYiMUXv6pF lopKZgWjX/mv2YT9rrZ16nr+cppnH8wcy0j1Qj4ZxPEIt6uiLML1F9bGERE+yw== ARC-Authentication-Results: i=1; rspamd-6955c7cd5b-964bd; auth=pass smtp.auth=a2hosting smtp.mailfrom=pedz@easesoftware.com X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com X-MailChannels-Auth-Id: a2hosting X-Bottle-Obese: 56f6fce525415eb6_1665861962784_500187841 X-MC-Loop-Signature: 1665861962784:1955465155 X-MC-Ingress-Time: 1665861962783 Original-Received: from mi3-ss4.a2hosting.com (mi3-ss4.a2hosting.com [68.66.200.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.122.234.250 (trex/6.7.1); Sat, 15 Oct 2022 19:26:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=easesoftware.com; s=default; h=To:Date:Message-Id:Subject:Mime-Version: Content-Type:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=eIGJpX+8TwdD6gXlTSo8V5Bj3ddtxqctaX7nLUISkCk=; b=UWZx4i2mqnOm528nE1FaKSUCjl 52JLhDzw/LaYbV0b6enzU5MRMXcqrtHR3W9p7T8/3ihVzBXOYFZ4QUq683KV+OtyyN9VBzPcbwzmW /q22fr34cLEpPf3NmCdj1bqaEwt5EkSf+RM8dpIUnIJlwpLcXDCIMfMQNnQPxO1rUtrM5DN/3xLEh 99XAZN5DbbaLVXqN936MbK+BZOQevZmCe6lONA+Cwjfu9VGfqtmP1XEUIM7gbBoVvoo/Vrs/HXYaL 33PFi63ajGSJFqMEVLp3JMgLbXlE1m/QQV0DUMYDKRROL1OntD6AVpIIqrVr0X0Flgeh1eb7kRu1Z 0M+BzDHQ==; Original-Received: from cpe-70-94-128-193.satx.res.rr.com ([70.94.128.193]:49902 helo=smtpclient.apple) by mi3-ss4.a2hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1ojmnI-0001fb-RN for emacs-devel@gnu.org; Sat, 15 Oct 2022 15:26:00 -0400 X-Mailer: Apple Mail (2.3696.120.41.1.1) X-AuthUser: pedz+easesoftware.com@mi3-ss4.a2hosting.com Received-SPF: pass client-ip=23.83.209.14; envelope-from=pedz@easesoftware.com; helo=bee.birch.relay.mailchannels.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:297811 Archived-At: --Apple-Mail=_AAB647A7-33B7-4FCA-B2CF-BD26A1535A16 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 TL; DR When I do =E2=80=9Copen file:/some/path/to/file.txt=E2=80=9D on macOS, = if file.txt has been set up right, it opens in Emacs. How does that = happen? What is the earliest point I can hook into if I want to create = a new scheme? Long Version: When a Ruby on Rails app throws an exception in development mode, it = creates an error page in the browser. On the page is the exception = stack which is a list of files with line numbers for the stack = traceback. There are add ons that will reformat that list. In the = past, for example, the add on would put =E2=80=98txtmt=E2=80=99 (as I = recall) scheme in front and TextMate was rigged up to accept that when = macOS sent it. If it isn=E2=80=99t obvious yet, I am on macOS and build = emacs using the =E2=80=94with-ns configure option. I=E2=80=99ve edited nextstep/templates/Info.plist.in so it now has: ```xml CFBundleURLTypes CFBundleURLName Email Address URL CFBundleURLSchemes mailto CFBundleTypeRole Editor CFBundleURLName Emacs Local Address URL CFBundleURLSchemes emacs ``` I=E2=80=99m thinking that I can teach the add on to prepend =E2=80=9Cemacs= :=E2=80=9D as the scheme. I think this will be better than using = =E2=80=9Cfile:=E2=80=9D as the scheme since that may or may not be sent = to Emacs =E2=80=94 depending upon how Info is set up for the particular = file. Currently, I can now say =E2=80=9Copen emacs:/some/path/to/file.txt=E2=80=9D= and Emacs is brought to the front so it is being triggered but the file = isn=E2=80=99t loaded. I=E2=80=99m assuming some piece of code is = looking at the =E2=80=9Cemacs=E2=80=9D scheme and going =E2=80=9CNope! = Not me!=E2=80=9D and doing nothing. Lot of assumptions where but my = question is, where is the piece of code that is being given the URL and = deciding to do nothing? Thank you for your time, Perry p.s. I am subscribed to this list do not receive emails so please CC me. = I will also track down any replies in the archive. --Apple-Mail=_AAB647A7-33B7-4FCA-B2CF-BD26A1535A16 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE5yOa/gCtQpb3oCpljxzk9yzE+MAFAmNLCUgACgkQjxzk9yzE +MBtHBAAygb41z/kkWaLKqffjOREWjxsMmTgJH8z4PF2VKBdFtVmF+WlR7ahxrE3 422BMk+UmP3oxVRTZI9bIm+Z7vcNHSE9GQqABEZ/5CrgCUlN4XYxxKg0MnKPsq9b 118aDwlEhbXRXiRBDBpduiCU3Dz1usrpn+avlwrmsV1SuJFofFjr6zFnG2uYMXUC cy5W60Eo6BCloe8m4uQBOKpWjyXkknwk+2zIM/QvKCPKyocrrkwRbNuJBSlaipqb 1xudyKd6AHPuKgLZ0SrBrnqrFiKJVsY/Smx6zmdk8JpT6AIGFToQqcUXwodgE/JX uuXZezHD1dFbh/82Sp+7Va87g0/v9jh9dhFtEEEb4rRwBlbOwoi75eHl2F7m+3Ep kJ54CEja/NpXI8xxdZ/btx/9Wmw9NGSOcKUJ8VqrwCn9OziCI+0+scM9wwytjd3z 3Z3e4WPzou84noUmSXxDrCe4Z9o4C2PM8SrX49rBwKqbvQurd5CggjYWwZWoKfY2 tcuosgmroDmOWGHnPq3zQ2DVqKNimN2I1ZM8aiCkQwR3Tt5ULEjIlf++d3gPMF9C y4Y1wcakIa8cy3ZY27p1wNT4iNpld80A4+O6/ANT4X+JK5EK4Db31IiFFpEe2aqY HzelgVj8k7MpMLXhErdiMzs4ukbzVCRSF3NWljWKmCRAdtW0Xxk= =CtrO -----END PGP SIGNATURE----- --Apple-Mail=_AAB647A7-33B7-4FCA-B2CF-BD26A1535A16--