{"id":9623,"date":"2021-04-13T15:10:03","date_gmt":"2021-04-13T19:10:03","guid":{"rendered":"https:\/\/irreal.org\/blog\/?p=9623"},"modified":"2021-04-14T18:06:28","modified_gmt":"2021-04-14T22:06:28","slug":"deactivate-mark","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=9623","title":{"rendered":"Deactivate Mark"},"content":{"rendered":"<p>If you\u2019re like me, you probably don\u2019t think very much about activating and deactivating the mark. We know it gets set when we do a large movement or when we set it manually with <kbd>Ctrl<\/kbd>+<kbd>Space<\/kbd>. We know that the current region is defined by the point and mark and maybe even that we can jump to a whole list of current and previous marks.<\/p>\n<p>Leave it to Marcin Borkowski (mbork), who\u2019s an expert at teasing out Emacs minutia, to discover and explain <a href=\"http:\/\/mbork.pl\/2021-04-10_deactivate-mark\">some of the mystery surrounding the deactivation of the mark<\/a>. It turns out that there\u2019s both a function and variable named <code>deactive-mark<\/code>. The function does just what it says on the tin: if you call it, the mark is deactivated.<\/p>\n<p>The use of the variable is a little more complicated. The TL;DR is that Emacs has its own notions about when to deactivate the mark and that this is mediated through the <code>deactivate-mark<\/code> variable. Being Emacs, a user can, of course, change Emacs\u2019 default ideas of mark deactivation. You can read all the details in mbork\u2019s post.<\/p>\n<p>The truth is that you\u2019ll probably never need to fine tune Emacs\u2019 mark activation\/deactivation but if you\u2019re writing a function that depends on the current mark being maintained, you should definitely take a look at mbork\u2019s posts to learn how to avoid having Emacs change it out from under you.<\/p>\n<p><b>Update<\/b> <span class=\"timestamp-wrapper\"><span class=\"timestamp\">[2021-04-14 Wed 18:04]<\/span><\/span>: Added link to mbork\u2019s post.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you\u2019re like me, you probably don\u2019t think very much about activating and deactivating the mark. We know it gets set when we do a large movement or when we set it manually with Ctrl+Space. We know that the current &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=9623\">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":[18],"class_list":["post-9623","post","type-post","status-publish","format-standard","hentry","category-general","tag-emacs"],"_links":{"self":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9623","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=9623"}],"version-history":[{"count":2,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9623\/revisions"}],"predecessor-version":[{"id":9627,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9623\/revisions\/9627"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9623"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9623"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9623"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}