{"id":543,"date":"2010-07-24T01:32:59","date_gmt":"2010-07-24T09:32:59","guid":{"rendered":"http:\/\/www.visophyte.org\/blog\/?p=543"},"modified":"2010-07-24T01:32:59","modified_gmt":"2010-07-24T09:32:59","slug":"ediosk-an-emacs-buffer-switcher-for-the-rest-of-us","status":"publish","type":"post","link":"https:\/\/www.visophyte.org\/blog\/2010\/07\/24\/ediosk-an-emacs-buffer-switcher-for-the-rest-of-us\/","title":{"rendered":"ediosk: an emacs buffer switcher for the rest of us"},"content":{"rendered":"<p><a href=\"http:\/\/www.visophyte.org\/blog\/wp-content\/uploads\/2010\/07\/ediosk-emacs-buffer-switcher.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-thumbnail wp-image-544\" title=\"ediosk-emacs-buffer-switcher\" src=\"http:\/\/www.visophyte.org\/blog\/wp-content\/uploads\/2010\/07\/ediosk-emacs-buffer-switcher-600x325.png\" alt=\"\" width=\"600\" height=\"325\" srcset=\"https:\/\/www.visophyte.org\/blog\/wp-content\/uploads\/2010\/07\/ediosk-emacs-buffer-switcher-600x325.png 600w, https:\/\/www.visophyte.org\/blog\/wp-content\/uploads\/2010\/07\/ediosk-emacs-buffer-switcher-300x162.png 300w, https:\/\/www.visophyte.org\/blog\/wp-content\/uploads\/2010\/07\/ediosk-emacs-buffer-switcher-1024x555.png 1024w, https:\/\/www.visophyte.org\/blog\/wp-content\/uploads\/2010\/07\/ediosk-emacs-buffer-switcher.png 1190w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>Emacs users and would-be emacs users, are you tired of those emacs developers in their ivory towers not supporting buffer switching via touch-screen on a computer that&#8217;s not running emacs and using modern web browser technology instead of disproven parentheses-based technology?\u00a0 Be tired no more!*<\/p>\n<p>Thanks to <a href=\"http:\/\/nullprogram.com\/blog\/2009\/11\/\">Christopher Wellons and Chunye Wang&#8217;s work on emacs-httpd<\/a> it is a <a href=\"http:\/\/hg.mozilla.org\/users\/bugmail_asutherland.org\/ediosk\/file\/c09d7b1fbacf\/emacs\/httpd-json-control.el\">simple matter<\/a> to expose a JSON representation of the current set of frames\/windows\/buffers in your emacs session and provide non-REST manipulation mechanisms via a webserver implemented in elisp.<\/p>\n<p>Once you have exposed an API, it is a subsequent <a href=\"http:\/\/hg.mozilla.org\/users\/bugmail_asutherland.org\/ediosk\/\">simple matter<\/a> to implement some JavaScript that understands these things and presents a nice UI.\u00a0 In this case, we have used the <a href=\"https:\/\/jetpack.mozillalabs.com\/\">Jetpack SDK<\/a>, wmsy (the Widget Manifesting SYstem, an widgeting framework I am developing), and <a href=\"http:\/\/vis.stanford.edu\/protovis\/\">protovis<\/a>.<\/p>\n<p>The screenshot basically captures the entire feature-set:<\/p>\n<ul>\n<li>A protovis-based visualization that shows the location of all of the emacs &#8220;windows&#8221; (the things that show buffers).\u00a0 Emacs reports to us the pixel-space coordinates\/sizes of the &#8220;frames&#8221; (GUI windows) and &#8220;windows&#8221;, so this all comes magically for free.\u00a0 The downside is your emacs windows need to be in the same coordinate space, so use of multiple X displays without use of DMX will likely lead to weird overlap.\n<ul>\n<li>The selected &#8220;window&#8221; in each &#8220;frame&#8221; gets a diamond.\u00a0 The active frame&#8217;s diamond gets to be black instead of gray.<\/li>\n<li>Clicking on a &#8220;window&#8221; focuses\/raises the containing &#8220;frame&#8221; and selects the &#8220;window&#8221;.<\/li>\n<\/ul>\n<\/li>\n<li>Buffers grouped by the directory they live in (if they have a backing file).\n<ul>\n<li>Buffers visible in windows have their background composed of the colors for all the windows they are in.<\/li>\n<li>Buffers that are modified have their text colored red.<\/li>\n<li>Buffers that have not been freshly displayed in a window recently have their text colored grey.<\/li>\n<li>Clicking on a buffer displays it in what the UI believes to be the currently selected frame&#8217;s currently selected window.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>* This entire paragraph is a joke**; no flaming necessary.<\/p>\n<p>** ediosk is not a joke though.\u00a0 I seriously have a touch-screen monitor hooked up to my windows build machine to the right of my two monitors hooked up to my linux\/primary development machine.\u00a0 While c-x b (<a href=\"http:\/\/www.emacswiki.org\/emacs\/Icicles\">icicle<\/a> mode) will still be my dominant buffer switching mechanism, I expect ediosk to prove useful\/amusing for cases where the number of buffers greatly exceeds my mental stack, when I am switching contexts, or when I am working in multiple branches simultaneously.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Emacs users and would-be emacs users, are you tired of those emacs developers in their ivory towers not supporting buffer switching via touch-screen on a computer that&#8217;s not running emacs and using modern web browser technology instead of disproven parentheses-based &hellip; <a href=\"https:\/\/www.visophyte.org\/blog\/2010\/07\/24\/ediosk-an-emacs-buffer-switcher-for-the-rest-of-us\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[11],"tags":[79,67,56,75],"class_list":["post-543","post","type-post","status-publish","format-standard","hentry","category-software","tag-emacs","tag-jetpack","tag-protovis","tag-wmsy"],"_links":{"self":[{"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/posts\/543","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/comments?post=543"}],"version-history":[{"count":6,"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/posts\/543\/revisions"}],"predecessor-version":[{"id":550,"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/posts\/543\/revisions\/550"}],"wp:attachment":[{"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/media?parent=543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/categories?post=543"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/tags?post=543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}