{"id":9971,"date":"2021-09-12T13:31:17","date_gmt":"2021-09-12T17:31:17","guid":{"rendered":"https:\/\/irreal.org\/blog\/?p=9971"},"modified":"2021-09-12T13:31:17","modified_gmt":"2021-09-12T17:31:17","slug":"quitting-safari","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=9971","title":{"rendered":"Quitting Safari"},"content":{"rendered":"<p>Today\u2019s post is specific to those Irreal readers who use the Safari browser. As I\u2019ve written many times, almost all my tube time is spent in either Emacs or Safari. A typical workflow occurs when I\u2019m reading my RSS feed in Emacs with Elfeed. If I see a post that looks interesting, I have Elfeed launch the site in the browser. After I finish with the website, I delete the tab with <kbd>\u2318 Cmd<\/kbd>+<kbd>w<\/kbd>. This same process also happens in many other situations.<\/p>\n<p>The problem is I often type the neighboring key <kbd>\u2318 Cmd<\/kbd>+<kbd>q<\/kbd> instead, which quits Safari and all the open tabs I was working on. That\u2019s not too bad because Safari has an option to reload all the tabs from the previous session so I don\u2019t really lose those tabs.<\/p>\n<p>But there <i>is<\/i> a problem. When I quit Safari like that, I lose the mapping from <kbd>F6<\/kbd> to Emacs and can only get it back by rebooting macOS. That\u2019s a real problem because I\u2019m constantly using <kbd>F6<\/kbd> and <kbd>F7<\/kbd> to switch between Emacs and Safari.<\/p>\n<p>The last time it happened, I\u2019d had enough and decided something had to be done. Surely, I thought, there must be a way to get Safari to query you before quitting. That\u2019s what happens when you spend all your time in Emacs: you expect everything to be configurable. But Safari is not Emacs and there isn\u2019t an option for asking for confirmation before quitting. I asked Duck Duck Go and found <a href=\"https:\/\/daringfireball.net\/2020\/01\/quit_confirmation_for_safari_on_macos\">this post from John Gruber<\/a>, who had similar problems. Gruber provides a bit of Apple Script to provide the confirmation dialogue but he mentions that if all you want to do it avoid confusing <kbd>\u2318 Cmd<\/kbd>+<kbd>q<\/kbd> with <kbd>\u2318 Cmd<\/kbd>+<kbd>w<\/kbd>, you can simply change (or remove) the shortcut for quitting Safari. That\u2019s really easy to do: see Gruber\u2019s post for the details.<\/p>\n<p>Now I\u2019m having the reaction I always have when I trivially solve some longstanding problem: why didn\u2019t I do this earlier? I will, it appears, never learn.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today\u2019s post is specific to those Irreal readers who use the Safari browser. As I\u2019ve written many times, almost all my tube time is spent in either Emacs or Safari. A typical workflow occurs when I\u2019m reading my RSS feed &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=9971\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[21,37],"class_list":["post-9971","post","type-post","status-publish","format-standard","hentry","category-general","tag-apple","tag-tech"],"_links":{"self":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9971","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=9971"}],"version-history":[{"count":1,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9971\/revisions"}],"predecessor-version":[{"id":9972,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9971\/revisions\/9972"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9971"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9971"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9971"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}