{"id":10628,"date":"2022-06-28T11:44:42","date_gmt":"2022-06-28T15:44:42","guid":{"rendered":"https:\/\/irreal.org\/blog\/?p=10628"},"modified":"2022-06-28T11:44:42","modified_gmt":"2022-06-28T15:44:42","slug":"org-capture-from-anywhere-within-macos","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=10628","title":{"rendered":"Org Capture from Anywhere Within macOS"},"content":{"rendered":"<p>One of the most useful workflow enhancements I\u2019ve made to Emacs is the ability to do initiate an Org capture whether or not I\u2019m in Emacs. That\u2019s important to me because virtually every note I take is stored in Org. For example, if I\u2019m reading something in my browser and it gives me an idea for a blog post, I just press <kbd>F9<\/kbd> and it pops up my capture template menu. From there, I need only specify <kbd>b<\/kbd> and I get my blog capture template with the URL of the site I was reading already filled in. Similarly, if I want to make a journal entry, I just press <kbd>F9<\/kbd> <kbd>j<\/kbd> and I get a template complete with a date\/time stamp.<\/p>\n<p>Aim\u00e9 Bertrand also depends on Org capture and has a post that describes how he <a href=\"https:\/\/macowners.club\/posts\/org-capture-from-everywhere-macos\/\">initiates an Org capture from anywhere within macOS<\/a>. He has some bespoke Elisp that pops up the capture menu and some advice to <code>org-capture-finalize<\/code> and <code>org-capture-destroy<\/code> to delete the capture buffer when the capture is done or aborted.<\/p>\n<p>He uses <code>Automator.app<\/code> to invoke his code as a macOS service. I used to do that but found it to be unreliable. Sometimes it just wouldn\u2019t work when I pressed the hotkey. After trying various things, I settled upon Adam Porter\u2019s (alphapappa) <a href=\"https:\/\/github.com\/alphapapa\/yequake\/blob\/master\/yequake.el\">yequake<\/a> to handle the buffers for me and <a href=\"https:\/\/github.com\/deseven\/icanhazshortcut\">iCanHazShortcut<\/a> to map <kbd>F9<\/kbd> to the call to <code>emacsclient<\/code> and yequake. I wrote about that <a href=\"http:\/\/irreal.org\/blog\/?p=9023\">here<\/a>.<\/p>\n<p>My solution seems a bit more complicated but has the advantage of working on any system. I could, I suppose, use Bertrand\u2019s Elisp code along with iCanHazShortcut to get rid of one dependency but yequake is working well for me so I\u2019ll stick with my current solution.<\/p>\n<p>If you\u2019re interested in invoking Org capture from anywhere on your system, take a look at Bertrand\u2019s post. Even if you\u2019re not on macOS, you can use his code and something like iCanHazShortcut to handle the invocation.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the most useful workflow enhancements I\u2019ve made to Emacs is the ability to do initiate an Org capture whether or not I\u2019m in Emacs. That\u2019s important to me because virtually every note I take is stored in Org. &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=10628\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[18,4],"class_list":["post-10628","post","type-post","status-publish","format-standard","hentry","category-general","tag-emacs","tag-org-mode"],"_links":{"self":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/10628","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10628"}],"version-history":[{"count":1,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/10628\/revisions"}],"predecessor-version":[{"id":10629,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/10628\/revisions\/10629"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10628"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10628"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10628"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}