Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xuchunyang/setup-org-protocol-on-mac
Setting Up org-protocol on Mac
https://github.com/xuchunyang/setup-org-protocol-on-mac
Last synced: about 2 months ago
JSON representation
Setting Up org-protocol on Mac
- Host: GitHub
- URL: https://github.com/xuchunyang/setup-org-protocol-on-mac
- Owner: xuchunyang
- Created: 2016-06-20T09:41:25.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-11-04T17:31:19.000Z (about 3 years ago)
- Last Synced: 2024-10-31T22:42:03.738Z (2 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 64
- Watchers: 5
- Forks: 6
- Open Issues: 5
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
README
* Setting Up org-protocol on Mac
[[http://orgmode.org/worg/org-contrib/org-protocol.html#orgheadline6][org-protocol.el – Mac OS X setup]] doesn't work anymore according to [[https://github.com/neil-smithline-elisp/EmacsClient.app/issues/3][Issue #3 ·
neil-smithline-elisp/EmacsClient.app]].** Step 1. Create an application
- Launch the Script Editor application and create a new document
- Copy-and-paste the following code into the new document
- Change "/usr/local/bin/emacsclient" to path to =emacsclient= on your system
- Save it in /Application/ (not the default /Script/) File Format as
=org-protocol.app=#+BEGIN_SRC applescript
on open location this_URL
do shell script "/Applications/Emacs.app/Contents/MacOS/bin-x86_64-10_14/emacsclient \"" & this_URL & "\""
tell application "Emacs" to activate
end open location
#+END_SRC** Step 2. Configure the application
- Navigate to the application (i.e., =org-protocol.app=) in the Finder, then
right-click on it and select =Show Package Contents=. Now go into the
=Contents= folder and open =Info.plist=
- Add the following code to the file, making sure to keep all existing
key/string pairs intact:#+BEGIN_SRC xml
CFBundleURLTypes
CFBundleURLName
org-protocol handler
CFBundleURLSchemes
org-protocol
#+END_SRC** Step 3. Test your results
See http://orgmode.org/worg/org-contrib/org-protocol.html#orgheadline8
* Notes
** Emacs doesn't activate?
I use graphical Emacs and start Emacs server from there, however after clicking
some org-protocol link, Emacs doesn't activate. I don't know the cause. If you
encounter the same issue AND don't like it, you can try this instead#+BEGIN_SRC applescript
on open location this_URL
do shell script "/usr/local/bin/emacsclient \"" & this_URL & "\" && open -a Emacs"
end open location
#+END_SRC** User Script
On web browser, besides bookmarklets, you can also use User Script, for example,
[[./org-protocol.user.js]] binds two keys to Org: store-link and Org: capture.